void CSymTorrentTrackerSettingsContainer::EditItemL(TInt aIndex, TBool aCalledFromMenu)
{
	CAknSettingItemList::EditItemL(aIndex, aCalledFromMenu);

	(*SettingItemArray())[aIndex]->StoreL();	
				
	CSTTorrentManager* torrentMgr = TORRENTMGR;
	CSTPreferences* prefs = PREFERENCES;
	CNetworkManager* netMgr = torrentMgr->NetworkManager();
	
	switch (aIndex)
	{
		
		case ESTSetIndexTrackerServicePort:
		{
			prefs->SetTrackerServicePort(iTrackerServicePort);
		}
		break;

		#ifdef TRACKER_BUILD
		case ESTSetIndexPieceSize:
		{		
			iAppUi->TrackerManager()->SetPieceSize(iPieceSize);	
			prefs->SetPieceSize(iPieceSize);
		}
		break;	
		#endif
		
		default:
		break;
	}
	
	(*SettingItemArray())[aIndex]->StoreL();
}
/**
 * Edit the setting item identified by the given id and store
 * the changes into the store.
 * @param aIndex the index of the setting item in SettingItemArray()
 * @param aCalledFromMenu true: a menu item invoked editing, thus
 *	always show the edit page and interactively edit the item;
 *	false: change the item in place if possible, else show the edit page
 */
void CCalendarManagerSettingItemList::EditItemL ( TInt aIndex, TBool aCalledFromMenu )
	{
	aIndex = SettingItemArray()->ItemIndexFromVisibleIndex(aIndex);	
	CAknSettingItem* item = ( *SettingItemArray() )[aIndex];
	switch ( item->Identifier() )
		{
	// [[[ begin generated region: do not modify [Editing Started Invoker]
	// ]]] end generated region [Editing Started Invoker]
	
		}
	
	CAknSettingItemList::EditItemL( aIndex, aCalledFromMenu );
	
	TBool storeValue = ETrue;
	switch ( item->Identifier() )
		{
	// [[[ begin generated region: do not modify [Editing Stopped Invoker]
	// ]]] end generated region [Editing Stopped Invoker]
	
		}
		
	if ( storeValue )
		{
		item->StoreL();
		SaveSettingValuesL();
		}	
	}
Ejemplo n.º 3
0
// ---------------------------------------------------------------------------
// CListboxSettingList::EditItemL()
// Edits setting item data.
// ---------------------------------------------------------------------------
//
void CYCSettingList::EditItemL(TInt aIndex, TBool aCalledFromMenu)
{
    BeforeEditItem(aIndex);
    TInt currentItem = ((CAknSettingItemList*)this)->ListBox()->View()->CurrentItemIndex();
    CAknSettingItemList::EditItemL(currentItem, aCalledFromMenu);
    ( *SettingItemArray() )[aIndex]->UpdateListBoxTextL();
    ( *SettingItemArray() )[aIndex]->StoreL();
    ModifyItemL(aIndex);
}
// CAknSettingItemList::EditItemL()
void CProfileEditDisplaySettingList::EditItemL(TInt aIndex,
                                               TBool aCalledFromMenu) {
    TInt id = (*SettingItemArray())[aIndex]->Identifier();

    CAknSettingItemList::EditItemL(aIndex, aCalledFromMenu);
    
    // Always store changes to the variable that the item uses
    (*SettingItemArray())[aIndex]->StoreL();

    // Store the change to PuTTY config if needed
    switch ( id ) {
        case EPuttySettingDisplayFont: {
            DesToString(iFonts[iFontValue], iConfig->font.name,
                        sizeof(iConfig->font.name));
            break;
        }

        case EPuttySettingDisplayBackSpace: {
            if ( iBackSpace ) {
                iConfig->bksp_is_delete = 1;
            } else {
                iConfig->bksp_is_delete = 0;
            }
            break;
        }

        case EPuttySettingDisplayFullScreen: {
            if ( iFullScreen ) {
                iConfig->width = KFullScreenWidth;
            } else {
                iConfig->width = 0;
            }
            break;
        }

        case EPuttySettingDisplayPalette:
            iPalettes->GetPalette(iPaletteValue,
                                  (unsigned char*) iConfig->colours);
            break;
            
        case EPuttySettingDisplayCharSet: {
            DesToString((*iCharSets)[iCharSetValue], iConfig->line_codepage,
                        sizeof(iConfig->line_codepage));
            break;
        }
            
        default:
            ;
    }
}
Ejemplo n.º 5
0
void CTrkConnSettingsList::ControlStateChangedBeforeL(TInt aIndex)
{
	CAknSettingItemArray* array = SettingItemArray();
	
	CTrkConnIndexPopupSettingItem* connTypePopUp = (CTrkConnIndexPopupSettingItem *)array->At(0);
	TInt index = connTypePopUp->CurrentIndex();
	
	CAknSettingItem* portEditor = array->At(1);
	CAknSettingItem* baudRatePopUp = array->At(2);

	switch(aIndex)
	{
		case 1:
		{
			switch(index)
			{
				case 2:
				{
					_LIT(KPortNumberInfo, "Recommended port for IR connection is 0.");
					CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
					globalNote->ShowNoteL(EAknGlobalInformationNote, KPortNumberInfo);
					CleanupStack::PopAndDestroy(globalNote);
					break;	
				}
				default:
					break;
			}
		}
		default:
			break;
	}
}
Ejemplo n.º 6
0
/**
 * Edit the setting item identified by the given id and store
 * the changes into the store.
 * @param aIndex the index of the setting item in SettingItemArray()
 * @param aCalledFromMenu true: a menu item invoked editing, thus
 *	always show the edit page and interactively edit the item;
 *	false: change the item in place if possible, else show the edit page
 */
void CSymbian_ua_guiSettingItemList::EditItemL ( TInt aIndex, TBool aCalledFromMenu )
{
    CAknSettingItem* item = ( *SettingItemArray() )[aIndex];
    switch ( item->Identifier() )
    {
        // [[[ begin generated region: do not modify [Editing Started Invoker]
        // ]]] end generated region [Editing Started Invoker]

    }

    CAknSettingItemList::EditItemL( aIndex, aCalledFromMenu );

    TBool storeValue = ETrue;
    switch ( item->Identifier() )
    {
        // [[[ begin generated region: do not modify [Editing Stopped Invoker]
        // ]]] end generated region [Editing Stopped Invoker]

    }

    if ( storeValue )
    {
        item->StoreL();
        SaveSettingValuesL();
    }
}
Ejemplo n.º 7
0
// CAknSettingItemList::EditItemL()
void CProfileEditSshSettingList::EditItemL(TInt aIndex,
                                           TBool aCalledFromMenu) {
    TInt id = (*SettingItemArray())[aIndex]->Identifier();

    if ( id == EPuttySettingSshPrivateKey ) {
        // Show file selection dialog for the private key instead of editing
        // the text
        if ( AknCommonDialogs::RunSelectDlgLD(iPrivateKey,
                                              R_PUTTY_MEMORY_SELECTION_DIALOG) ) {
            DesToString(iPrivateKey, iConfig->keyfile.path,
                        sizeof(iConfig->keyfile.path));
            (*SettingItemArray())[aIndex]->LoadL();
            (*SettingItemArray())[aIndex]->UpdateListBoxTextL();
        }
        return;
    };

    CAknSettingItemList::EditItemL(aIndex, aCalledFromMenu);
    
    // Always store changes to the variable that the item uses
    (*SettingItemArray())[aIndex]->StoreL();

    // Store the change to PuTTY config if needed
    switch ( id ) {
        case EPuttySettingSshCompression:
            iConfig->compression = (int) iCompression;
            break;

        case EPuttySettingSshCipher: {
            const int *ciphers = KCiphersBlowfish;
            if ( iCipher == 1 ) {
                ciphers = KCiphersAes;
            }
            Mem::Copy(iConfig->ssh_cipherlist, ciphers, sizeof(int)*CIPHER_MAX);
            break;
        }
            
        default:
            ;
    }
}
void CExampleSettingList::EditCurrentItemL(TBool aFromMenu)
	{
	// Invoke EditItemL on the current item
    EditItemL(ListBox()->CurrentItemIndex(),	// the item index
                aFromMenu);							// invoked from menu
        
			  
	//Updating CAknPasswordSettingItem.
	if(ListBox()->CurrentItemIndex()==5)
		{
		(*(SettingItemArray()))[ListBox()->CurrentItemIndex()]->UpdateListBoxTextL();
		}
        
    StoreSettingsL();
	}
void CDCQLoginViewSettings::EditCurrentItemL()
{
   TInt aCurrItemIdx = ListBox()->CurrentItemIndex();
   
   // invoke EditItemL on the current item
   EditItemL(aCurrItemIdx, // the item index
             EFalse); // not invoked from menu

   //Updating CAknPasswordSettingItem.
   if (aCurrItemIdx == EDCQLoginViewSettingICQPasswordOrder)
   {
      (*(SettingItemArray()))[aCurrItemIdx]->UpdateListBoxTextL();
   }
   
   StoreSettingsL();
}
/** 
 * Handle key event (override)
 * @param aKeyEvent key event
 * @param aType event code
 * @return EKeyWasConsumed if the event was handled, else EKeyWasNotConsumed
 */
TKeyResponse CSetupGisWeatherSettingItemList::OfferKeyEventL( 
		const TKeyEvent& aKeyEvent, 
		TEventCode aType )
	{
	
	if ( aKeyEvent.iCode == EKeyLeftArrow/*
		|| aKeyEvent.iCode == EKeyRightArrow */)
		{
		// allow the tab control to get the arrow keys
		ListBox()->SetCurrentItemIndexAndDraw(0);
		//return EKeyWasNotConsumed;
		}
	if(aKeyEvent.iCode == EKeyRightArrow)
	    {
	    ListBox()->SetCurrentItemIndexAndDraw(/*5*/SettingItemArray()->Count()-1);
	    }

	return CAknSettingItemList::OfferKeyEventL( aKeyEvent, aType );
	}
void CBuddycloudEditPlaceList::EditItemL(TInt aIndex, TBool aCalledFromMenu) {
	CAknSettingItemArray* aItemArray = SettingItemArray();
	TInt aIdentifier = ((*aItemArray)[aIndex])->Identifier();

	// Set title
	switch(aIdentifier) {
		case EEditPlaceItemName:
			SetTitleL(R_LOCALIZED_STRING_EDITPLACE_NAME);
			break;
		case EEditPlaceItemStreet:
			SetTitleL(R_LOCALIZED_STRING_EDITPLACE_STREET);
			break;
		case EEditPlaceItemArea:
			SetTitleL(R_LOCALIZED_STRING_EDITPLACE_AREA);
			break;
		case EEditPlaceItemCity:
			SetTitleL(R_LOCALIZED_STRING_EDITPLACE_CITY);
			break;
		case EEditPlaceItemPostcode:
			SetTitleL(R_LOCALIZED_STRING_EDITPLACE_POSTCODE);
			break;
		case EEditPlaceItemRegion:
			SetTitleL(R_LOCALIZED_STRING_EDITPLACE_REGION);
			break;
		case EEditPlaceItemCountry:			
			if(iEditingPlace && iEditingPlace->GetGeoloc()->GetString(EGeolocCountry).Length() > 0) {
				return;
			}
			
			SetTitleL(R_LOCALIZED_STRING_EDITPLACE_COUNTRY);
			break;
		default:;
	}
	
	CAknSettingItemList::EditItemL(aIndex, aCalledFromMenu);
	
	// Reset title
	SetTitleL(iTitleResourceId);
	
	((*aItemArray)[aIndex])->StoreL();	
	((*aItemArray)[aIndex])->UpdateListBoxTextL();	
}
void CBuddycloudBeaconSettingsList::EditItemL(TInt aIndex, TBool aCalledFromMenu) {
	CAknSettingItemList::EditItemL(aIndex, aCalledFromMenu);
	
	CAknSettingItemArray* aItemArray = SettingItemArray();
	((*aItemArray)[aIndex])->StoreL();
	((*aItemArray)[aIndex])->UpdateListBoxTextL();
	
	switch(((*aItemArray)[aIndex])->Identifier()) {
		case ESettingPositioningCellOn:
			iBuddycloudLogic->SettingsItemChanged(ESettingItemCellOn);
			break;
		case ESettingPositioningWifiOn:
			iBuddycloudLogic->SettingsItemChanged(ESettingItemWifiOn);
			break;
		case ESettingPositioningGpsOn:
			iBuddycloudLogic->SettingsItemChanged(ESettingItemGpsOn);
			break;
		default:;
	}
}
void CBuddycloudEditPlaceList::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane) {
	if(aResourceId == R_EDITPLACE_OPTIONS_MENU) {
		CAknSettingItemArray* aItemArray = SettingItemArray();
		TInt aIdentifier = ((*aItemArray)[ListBox()->CurrentItemIndex()])->Identifier();
		
		aMenuPane->SetItemDimmed(EMenuEditItemCommand, false);
		aMenuPane->SetItemDimmed(EMenuNewSearchCommand, true);
		aMenuPane->SetItemDimmed(EAknSoftkeyDone, true);
		
		if(iName.Length() > 0) {
			aMenuPane->SetItemDimmed(EMenuNewSearchCommand, false);
			aMenuPane->SetItemDimmed(EAknSoftkeyDone, false);
		}
		
		if(aIdentifier == EEditPlaceItemCountry) {
			if(iEditingPlace && iEditingPlace->GetGeoloc()->GetString(EGeolocCountry).Length() > 0) {
				aMenuPane->SetItemDimmed(EMenuEditItemCommand, true);
			}
		}
	}
}
/**
 * Edit the setting item identified by the given id and store
 * the changes into the store.
 * @param aIndex the index of the setting item in SettingItemArray()
 * @param aCalledFromMenu true: a menu item invoked editing, thus
 *	always show the edit page and interactively edit the item;
 *	false: change the item in place if possible, else show the edit page
 */
void CSetupGisWeatherSettingItemList::EditItemL ( TInt aIndex, TBool aCalledFromMenu )
	{
	CAknSettingItem* item = ( *SettingItemArray() )[aIndex];
	switch ( item->Identifier() )
		{
	
		}

	switch(aIndex)
	    {
	case 5:
		iSettings.SelectApp();
		LoadSettingsL();
		break;
	case 6:
	    iSettings.SelectAP();
	    LoadSettingsL();
	    break;
	case 7:
	    InputUrl();
	    LoadSettingsL();
	    break;
	default:
	    CAknSettingItemList::EditItemL( aIndex, aCalledFromMenu );
	    break;
	    }
	//TResourceReader read;
	//asfawefiCoeEnv->CreateResourceReaderLC(read,R_SETTING_LIST_SETTING_TIME);
	TBool storeValue = ETrue;
	switch ( item->Identifier() )
	    {

	    }
		
	if ( storeValue )
		{
		item->StoreL();
		SaveSettingValuesL();
		}	
	}
void CCalendarManagerSettingItemList::SetDefaultSetting()
	{
	TTime i_Date;
	i_Date.Parse(g_CalendarClass->GetSelectDateEN()->Des());
	iSettings.SetSchedule_Date(i_Date);
	
	if (g_CalendarManagerXML->g_SelectTime.Length() > 0)
		{
		(*SettingItemArray())[0]->SetHidden(ETrue);
																
		TTime i_Time;
		i_Time.Parse(g_CalendarManagerXML->g_SelectTime);
				
		iSettings.SetSchedule_Time(i_Time);
		
		if (g_CalendarManagerXML->g_SelectCalendarManagerInfo != NULL)
			{
			iSettings.SetSchedule_Content(g_CalendarManagerXML->g_SelectCalendarManagerInfo->g_Schedule_Content->Des());
			iSettings.SetSchedule_Reminder(g_CalendarManagerXML->g_SelectCalendarManagerInfo->g_Schedule_Reminder);
			}				
		}	
	}
Ejemplo n.º 16
0
void CTrkConnSettingsList::ControlStateChangedAfterL(TInt aIndex)
{
	CAknSettingItemArray* array = SettingItemArray();
	
	CTrkConnIndexPopupSettingItem* connTypePopUp = (CTrkConnIndexPopupSettingItem *)array->At(0);
	TInt index = connTypePopUp->CurrentIndex();
	
	CAknSettingItem* portEditor = array->At(1);
	CAknSettingItem* baudRatePopUp = array->At(2);

	switch(aIndex)
	{
		case 0:
		{
			switch (index)
			{
				// Now port and baud rate are hidden for 
				case 0: // USB (Dbg&Trc)
				case 1: // BT
				case 2: // XTI
				case 3: // DCC
				{
					portEditor->SetHidden(ETrue);
					baudRatePopUp->SetHidden(ETrue);
					HandleChangeInItemArrayOrVisibilityL();				
						break;			
				}
				default:
					break;
			}
			break;
		}
		default:
			break;
	}
}
Ejemplo n.º 17
0
// Clear the private key setting
void CProfileEditSshSettingList::ClearPrivateKey() {
    iPrivateKey.Zero();
    iConfig->keyfile.path[0] = 0;
    (*SettingItemArray())[KPrivateKeyIndex]->LoadL();
    (*SettingItemArray())[KPrivateKeyIndex]->UpdateListBoxTextL();
}