display actions in status bar
authorgc <gc>
Sun, 22 Jul 2007 21:43:50 +0000 (21:43 +0000)
committergc <gc>
Sun, 22 Jul 2007 21:43:50 +0000 (21:43 +0000)
bin/booh-classifier

index d5fa14a41ad6ad5f5cfcce67096fac7b804f046e..b40b97d510fe308cec9640e9ef03c464f0e5d458 100644 (file)
@@ -640,8 +640,10 @@ def thumbnail_keypressed(entry, event)
         if event.keyval == Gdk::Keyval::GDK_Left || event.keyval == Gdk::Keyval::GDK_Right
             if event.keyval == Gdk::Keyval::GDK_Left
                 entry.angle = (entry.angle - 90) % 360
+                sb_msg(_("Rotated to the left"))
             else
                 entry.angle = (entry.angle + 90) % 360
+                sb_msg(_("Rotated to the right"))
             end
             entry.free_pixbuf_full
             entry.free_pixbuf_main
@@ -668,6 +670,7 @@ def thumbnail_keypressed(entry, event)
             entry.labeled = nil
             entry.show_bg
             $mainview.show_next_entry(entry)
+            sb_msg(_("Set for removal"))
 
             save_undo(_("set for removal"),
                       proc {
@@ -684,12 +687,18 @@ def thumbnail_keypressed(entry, event)
                       })
 
         elsif event.keyval == Gdk::Keyval::GDK_space
+            if entry.labeled
+                msg = _("Cleared label")
+            elsif entry.removed
+                msg = _("Cleared set for removal")
+            end
             entry.removed = false
             entry.labeled = nil
             entry.show_bg
+            sb_msg(msg)
             $mainview.show_next_entry(entry)
 
-            save_undo(_("remove label"),
+            save_undo(msg,
                       proc {
                           entry.removed = removed_before
                           entry.labeled = label_before
@@ -755,6 +764,7 @@ def thumbnail_keypressed(entry, event)
                     entry.labeled = label
                     entry.show_bg
                     $mainview.show_next_entry(entry)
+                    sb_msg(_("Set label"))
 
                     save_undo(_("set label"),
                               proc {
@@ -796,7 +806,7 @@ def real_show_entry(entry, tooltips, grab_focus)
         else
             entry.button = Gtk::Button.new.set_image(entry.image)
         end
-        tooltips.set_tip(entry.button, File.basename(entry.path).gsub(/\.[^.]+$/, ''), nil)
+        tooltips.set_tip(entry.button, basepath = File.basename(entry.path).gsub(/\.[^.]+$/, ''), nil)
         entry.selection_materializer = Gtk::DrawingArea.new.set_size_request($selection_materializer_pixbuf.width, $selection_materializer_pixbuf.height)
         selection_materializer_drawer = proc {
             entry.selection_materializer.window.draw_pixbuf(nil, $selection_materializer_pixbuf, 0, 0, 0, 0, -1, -1, Gdk::RGB::DITHER_NONE, -1, -1)
@@ -807,6 +817,7 @@ def real_show_entry(entry, tooltips, grab_focus)
             if (last_shown = $mainview.get_shown_entry) != entry
                 $mainview.set_shown_entry(entry)
                 selection_materializer_drawer.call
+                sb_msg(_("Selected %s") % basepath)
                 last_shown.nil? or last_shown.selection_materializer.window.clear
             end
         }