confirm quit if needed
authorgc <gc>
Fri, 11 Apr 2008 21:58:19 +0000 (21:58 +0000)
committergc <gc>
Fri, 11 Apr 2008 21:58:19 +0000 (21:58 +0000)
bin/booh-classifier

index 81ca22b698d4614c8224ae2805cb4a4d9aefd11a..4bc9dfd385b925542cc214aed66e038cd2dc718e 100644 (file)
@@ -1175,8 +1175,13 @@ def open_dir_popup
 end
 
 def try_quit(*options)
-    Gtk.main_quit
-    $quit = true
+    if ! $allentries.detect { |e| e.removed || e.labeled } ||
+       show_popup($main_window,
+                  utf8(_("Are you sure you want to quit?")),
+                  { :okcancel => true })
+        Gtk.main_quit
+        $quit = true
+    end
 end
 
 def execute