Summary: | It is too easy to delete a search | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Arnd Baecker <arnd.baecker> |
Component: | Searches-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.3 | |
Sentry Crash Report: | |||
Attachments: | introduce warningYesNo before deleting |
Description
Arnd Baecker
2007-07-02 01:04:35 UTC
Created attachment 21011 [details]
introduce warningYesNo before deleting
Gilles, what about this patch, may I apply it (just checked that it still compiles and works)? Arnd, Fine for me. Let's go Gilles SVN commit 706464 by abaecker: Add Yes/No Warning when deleting a search to avoid accidental removal of complex searches. BUG: 147439 M +13 -0 searchfolderview.cpp --- branches/extragear/kde3/graphics/digikam/digikam/searchfolderview.cpp #706463:706464 @@ -35,6 +35,7 @@ #include <kglobal.h> #include <kiconloader.h> #include <kdeversion.h> +#include <kmessagebox.h> #if KDE_IS_VERSION(3,2,0) #include <kinputdialog.h> @@ -270,6 +271,18 @@ if (!album) return; + // Make sure that a complicated search is not deleted accidentally + int result =KMessageBox::warningYesNo( this, i18n("Are you sure you want to " + "delete the selected search " + "\"%1\"?") + .arg(album->title()), + i18n("Delete Search?"), + i18n("Delete"), + KStdGuiItem::cancel() ); + + if (result != KMessageBox::Yes) + return; + AlbumManager::instance()->deleteSAlbum(album); } Arnd, Warning. This patch much be backported to KDE4 implementation. Do not close it yet (:=))) Gilles backported to KDE4 with commit #706466 Gilles |