diff -r 558113899881 -r b3425bf29f82 commonuis/CommonUi/src/FindItemDialog.cpp --- a/commonuis/CommonUi/src/FindItemDialog.cpp Mon May 03 12:45:33 2010 +0300 +++ b/commonuis/CommonUi/src/FindItemDialog.cpp Wed Jun 23 05:40:10 2010 +0800 @@ -35,11 +35,6 @@ #include // for ButtonGroupContainer #include // for EKeyOk -#include // KFavouritesMaxUrl -#include // for CBookmarkItem - -#include - #include // RApaLsSession for WMLBrowser launch #ifndef RD_VIRTUAL_PHONEBOOK @@ -60,8 +55,6 @@ #include // For CClipboard -#include // For CSchemeHandler - #include #include @@ -319,8 +312,6 @@ delete iServiceHandler; delete iFindItemVoIPExtension; - delete iSchemeHandler; - delete iBgContext; delete iTitleText; @@ -707,23 +698,6 @@ } // If current app is other than Browser, use schemehandler for launching // file - else - { - if ( iSchemeHandler ) - { - delete iSchemeHandler; - iSchemeHandler = 0; - } - iSchemeHandler = CSchemeHandler::NewL( itemtextPtr ); - if ( itemtext->FindF( KRtspUrlAddress ) != KErrNotFound ) - { - iSchemeHandler->HandleUrlEmbeddedL(); - } - else - { - iSchemeHandler->HandleUrlStandaloneL(); - } - } CleanupStack::PopAndDestroy(); // itemtext return EFalse; @@ -744,9 +718,7 @@ TPtr paramPtr = parameters->Des(); paramPtr.Copy( KWmlBrowserParameter ); paramPtr.Append( KSpace ); - paramPtr.Append( - aItemtextPtr.Mid( - 0, Min( aItemtextPtr.Length(), KFavouritesMaxUrl ) ) ); + paramPtr.Append( aItemtextPtr.Mid( 0, aItemtextPtr.Length() ) ); TApaTaskList taskList( iEikonEnv->WsSession() ); TApaTask task = taskList.FindApp( KWapUid ); @@ -778,10 +750,6 @@ { __ASSERT_DEBUG( iEdwin->SelectionLength() > 0, Panic( ENoItemSelected ) ); - // Create an item and fill with meaningful data. - CFavouritesItem* item = CFavouritesItem::NewLC(); - item->SetParentFolder( KFavouritesRootUid ); - item->SetType( CFavouritesItem::EItem ); // Read default name from resources HBufC* defaultName = iEikonEnv->AllocReadResourceLC( R_FINDITEM_DEFAULT_BOOKMARK_NAME ); @@ -796,33 +764,17 @@ if ( !dlg->ExecuteLD( R_FINDITEM_BOOKMARK_QUERY_DIALOG ) ) { // User press cancel - do not add bookmark - CleanupStack::PopAndDestroy( ); // item return; } - - item->SetNameL( retName ); + TCursorSelection selection = iEdwin->Selection(); - item->SetUrlL( iPlainText.Mid( selection.LowerPos(), selection.Length() ) ); - - RFavouritesSession sess; - RFavouritesDb db; - - User::LeaveIfError( sess.Connect() ); - CleanupClosePushL( sess ); - User::LeaveIfError( db.Open( sess, KBrowserBookmarks ) ); - CleanupClosePushL( db ); - - // Add item. - db.Add( *item, ETrue ); - // Close the database. - db.Close(); - + HBufC* msgBuffer = iCoeEnv->AllocReadResourceLC( R_FINDITEM_BOOKMARK_SAVED ); CAknConfirmationNote* note = new (ELeave)CAknConfirmationNote( ETrue ); note->ExecuteLD( *msgBuffer ); - CleanupStack::PopAndDestroy( 4 ); // magBuffer, db, sess, item + CleanupStack::PopAndDestroy(); // magBuffer } // -----------------------------------------------------------------------------