From fdcc621fc2f5dff51ebdedb2ee13f528831d7dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Ander=20Pe=C3=B1alba?= Date: Mon, 16 Aug 2010 12:24:16 +0200 Subject: Unify the deletion of bookmarks in one place --- src/bookmarks/bookmarkcontextmenu.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/bookmarks/bookmarkcontextmenu.cpp') diff --git a/src/bookmarks/bookmarkcontextmenu.cpp b/src/bookmarks/bookmarkcontextmenu.cpp index 019d9eb9..714c8b51 100644 --- a/src/bookmarks/bookmarkcontextmenu.cpp +++ b/src/bookmarks/bookmarkcontextmenu.cpp @@ -212,25 +212,7 @@ void BookmarkContextMenu::copyToClipboard() void BookmarkContextMenu::deleteBookmark() { KBookmark bm = bookmark(); - 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); - manager()->emitChanged(bmg); + Application::bookmarkProvider()->bookmarkOwner()->deleteBookmark(bm); } -- cgit v1.2.1