[guillomovitch feat] have "view" of images/videos available in popup menu as well
authorgc <gc>
Sun, 18 Sep 2005 21:02:51 +0000 (21:02 +0000)
committergc <gc>
Sun, 18 Sep 2005 21:02:51 +0000 (21:02 +0000)
bin/booh
data/booh/images/stock-view-16.png [new file with mode: 0644]

index 63729b7ccdf048706b1c716a89bbeff3f24ed828..cdaa80f26c7f4f541087a9db9b8a258f171ae5ec 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -639,6 +639,19 @@ def popup_thumbnail_menu(event, optionals, type, xmldir, attributes_prefix, poss
         changeimg.signal_connect('activate') { closures[:change].call }
         menu.append(            Gtk::SeparatorMenuItem.new)
     end
+    if closures[:view]
+        if type == 'image'
+            menu.append(view = Gtk::ImageMenuItem.new(utf8(_("View larger"))))
+            view.image = Gtk::Image.new("#{$FPATH}/images/stock-view-16.png")
+            view.signal_connect('activate') { closures[:view].call }
+            menu.append(               Gtk::SeparatorMenuItem.new)
+        else
+            menu.append(view = Gtk::ImageMenuItem.new(utf8(_("Play video"))))
+            view.image = Gtk::Image.new("#{$FPATH}/images/stock-video-16.png")
+            view.signal_connect('activate') { closures[:view].call }
+            menu.append(               Gtk::SeparatorMenuItem.new)
+        end
+    end
     menu.append(r90 = Gtk::ImageMenuItem.new(utf8(_("Rotate clockwise"))))
     r90.image = Gtk::Image.new("#{$FPATH}/images/stock-rotate-90-16.png")
     r90.signal_connect('activate') { distribute_multiple_call.call(:rotate, 90) }
@@ -1122,7 +1135,7 @@ def add_thumbnail(autotable, filename, type, thumbnail_img, caption)
                                        :can_up => y > 0, :can_down => y < autotable.get_max_y, :can_multiple => true },
                                      { :rotate => rotate_and_cleanup, :move => move, :color_swap => color_swap_and_cleanup, :enhance => enhance_and_cleanup,
                                        :frame_offset => change_frame_offset_and_cleanup, :delete => delete, :whitebalance => whitebalance_and_cleanup,
-                                       :cut => cut, :paste => paste })
+                                       :cut => cut, :paste => paste, :view => proc { view_element(filename, { :delete => delete }) } })
             end
             $ignore_next_release = false
             $gesture_press = nil
diff --git a/data/booh/images/stock-view-16.png b/data/booh/images/stock-view-16.png
new file mode 100644 (file)
index 0000000..7cbd755
Binary files /dev/null and b/data/booh/images/stock-view-16.png differ