connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsContainer.cpp
equal
deleted
inserted
replaced
315 |
315 |
316 switch ( aConnMonEvent.EventType() ) |
316 switch ( aConnMonEvent.EventType() ) |
317 { |
317 { |
318 case EConnMonDeleteConnection: |
318 case EConnMonDeleteConnection: |
319 { |
319 { |
320 if ( aIndex == iConnectionIndex ) |
320 // Do nothing |
321 { |
321 } |
322 TUint count = iConnectionArray->MdcaCount(); |
322 break; |
323 switch ( count ) |
|
324 { |
|
325 case 0: |
|
326 { |
|
327 iListBox->Model()->SetItemTextArray( |
|
328 new (ELeave) CDesCArrayFlat( 1 ) ); |
|
329 iListBox->Model()->SetOwnershipType( |
|
330 ELbmOwnsItemArray ); |
|
331 iConnectionIndex = 0; |
|
332 iConnectionInfo = NULL; |
|
333 break; |
|
334 } |
|
335 case 1: |
|
336 { |
|
337 SetSelectedConnectionL( 0 ); |
|
338 break; |
|
339 } |
|
340 default : |
|
341 { |
|
342 TInt index = iConnectionIndex < count ? |
|
343 iConnectionIndex : |
|
344 iConnectionIndex - 1; |
|
345 SetSelectedConnectionL( index ); |
|
346 break; |
|
347 } |
|
348 } |
|
349 iListBox->DrawNow(); |
|
350 iListBox->UpdateScrollBarsL(); |
|
351 } |
|
352 break; |
|
353 } |
|
354 case EConnMonCreateConnection: |
323 case EConnMonCreateConnection: |
355 { |
324 { |
356 CMUILOGGER_WRITE_F( "iConnectionInfo : %d", iConnectionInfo ); |
325 CMUILOGGER_WRITE_F( "iConnectionInfo : %d", iConnectionInfo ); |
357 |
326 |
358 if ( !iConnectionInfo ) |
327 if ( !iConnectionInfo ) |
386 void CConnectionMonitorUiDetailsContainer::OnTimerEventL() |
355 void CConnectionMonitorUiDetailsContainer::OnTimerEventL() |
387 { |
356 { |
388 if ( iConnectionArray->MdcaCount() ) |
357 if ( iConnectionArray->MdcaCount() ) |
389 { |
358 { |
390 iListBox->DrawNow(); |
359 iListBox->DrawNow(); |
391 iListBox->UpdateScrollBarsL(); |
360 |
392 CMUILOGGER_WRITE_F( "CMUIDW GetStatus() before: %d", |
361 CMUILOGGER_WRITE_F( "CMUIDW GetStatus() before: %d", |
393 iConnectionInfo->GetStatus() ); |
362 iConnectionInfo->GetStatus() ); |
394 if ( iConnectionInfo->GetStatus() == EConnectionClosing ) |
363 if ( iConnectionInfo->GetStatus() == EConnectionClosing ) |
395 { |
364 { |
396 CConnectionMonitorUiAppUi* tempApUi = |
365 CConnectionMonitorUiAppUi* tempApUi = |
397 CConnectionMonitorUiAppUi::Static(); |
366 CConnectionMonitorUiAppUi::Static(); |
398 tempApUi->StopTimer(); |
|
399 iConnectionInfo->StatusChangedL(); |
367 iConnectionInfo->StatusChangedL(); |
400 } |
368 } |
401 CMUILOGGER_WRITE_F( "CMUIDW GetStatus() after: %d", |
369 CMUILOGGER_WRITE_F( "CMUIDW GetStatus() after: %d", |
402 iConnectionInfo->GetStatus() ); |
370 iConnectionInfo->GetStatus() ); |
403 } |
371 } |
445 // CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL |
413 // CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL |
446 // --------------------------------------------------------- |
414 // --------------------------------------------------------- |
447 // |
415 // |
448 void CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL() |
416 void CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL() |
449 { |
417 { |
450 TUint countOfConnection = iConnectionArray->NumberOfActiveConnections(); |
418 TUint countOfConnection = iConnectionArray->MdcaCount(); |
|
419 |
451 CMUILOGGER_WRITE_F( "countOfConnection : %d", countOfConnection ); |
420 CMUILOGGER_WRITE_F( "countOfConnection : %d", countOfConnection ); |
452 |
421 |
453 if ( ( iConnectionIndex > countOfConnection ) && // spec. index update |
422 if ( ( iConnectionIndex > countOfConnection ) && // spec. index update |
454 ( countOfConnection == 0 ) ) |
423 ( countOfConnection == 0 ) ) |
455 { |
424 { |