diff options
author | Jon Ander Peñalba <jonan88@gmail.com> | 2010-08-16 12:24:16 +0200 |
---|---|---|
committer | Jon Ander Peñalba <jonan88@gmail.com> | 2010-08-16 12:50:44 +0200 |
commit | fdcc621fc2f5dff51ebdedb2ee13f528831d7dff (patch) | |
tree | 869b9936c7f96031cc1b7d3127af67dc97ea5975 /src/bookmarks/bookmarkspanel.cpp | |
parent | Bug when closing the 'New Folder' dialog fixed. (diff) | |
download | rekonq-fdcc621fc2f5dff51ebdedb2ee13f528831d7dff.tar.xz |
Unify the deletion of bookmarks in one place
Diffstat (limited to 'src/bookmarks/bookmarkspanel.cpp')
-rw-r--r-- | src/bookmarks/bookmarkspanel.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/bookmarks/bookmarkspanel.cpp b/src/bookmarks/bookmarkspanel.cpp index 75d8faf3..b49d4f5e 100644 --- a/src/bookmarks/bookmarkspanel.cpp +++ b/src/bookmarks/bookmarkspanel.cpp @@ -201,12 +201,12 @@ void BookmarksPanel::contextMenu(const QPoint &pos) KBookmark selected = bookmarkForIndex(index); - BookmarkContextMenu menu( selected, - Application::bookmarkProvider()->bookmarkManager(), - Application::bookmarkProvider()->bookmarkOwner(), + BookmarkContextMenu menu( selected, + Application::bookmarkProvider()->bookmarkManager(), + Application::bookmarkProvider()->bookmarkOwner(), this ); - + menu.exec(m_treeView->mapToGlobal(pos)); } @@ -218,24 +218,5 @@ void BookmarksPanel::deleteBookmark() return; KBookmark bm = bookmarkForIndex(index); - KBookmarkGroup bmg = bm.parentGroup(); - bool folder = bm.isGroup(); - QString name = QString(bm.fullText()).replace("&&", "&"); - - if (KMessageBox::warningContinueCancel( - QApplication::activeWindow(), - folder ? i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?", name) - : i18n("Are you sure you wish to remove the bookmark\n\"%1\"?", name), - folder ? i18n("Bookmark Folder Deletion") - : i18n("Bookmark Deletion"), - KStandardGuiItem::del(), - KStandardGuiItem::cancel(), - "bookmarkDeletition_askAgain") - != KMessageBox::Continue - ) - return; - - - bmg.deleteBookmark(bm); - Application::instance()->bookmarkProvider()->bookmarkManager()->emitChanged(bmg); + Application::instance()->bookmarkProvider()->bookmarkOwner()->deleteBookmark(bm); } |