add key shortcuts and mouse gestures help
authorgc <gc>
Sun, 12 Jun 2005 16:52:48 +0000 (16:52 +0000)
committergc <gc>
Sun, 12 Jun 2005 16:52:48 +0000 (16:52 +0000)
AUTHORS
bin/booh
data/booh/images/stock-info-16.png [new file with mode: 0644]
data/booh/images/stock-tools-16.png [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index 0288ac2..25ef8cb 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,3 +3,5 @@ Guillaume Cottenceau <http://zarb.org/~gc/resource/gc_mail.png>
 i18n:
 Japanese: Masao Mutoh <mutoh foo highway bar ne bar jp>
 French: Guillaume Cottenceau
+
+some icons come from gimp
index 1ca88ce..6de67be 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -1087,7 +1087,6 @@ def show_popup(parent, msg, *options)
     end
     dialog.add_button(Gtk::Stock::OK, Gtk::Dialog::RESPONSE_OK)
 
-    dialog.transient_for = parent
     dialog.set_default_size(200, 120)
     if options[0] && options[0][:pos_centered]
         dialog.window_position = Gtk::Window::POS_CENTER
@@ -1096,12 +1095,17 @@ def show_popup(parent, msg, *options)
     end
     dialog.show_all
 
-    dialog.run { |response|
-        dialog.destroy
-        if options[0] && options[0][:okcancel]
-            return response == Gtk::Dialog::RESPONSE_OK
-        end
-    }
+    if !options[0] || !options[0][:not_transient]
+        dialog.transient_for = parent
+        dialog.run { |response|
+            dialog.destroy
+            if options[0] && options[0][:okcancel]
+                return response == Gtk::Dialog::RESPONSE_OK
+            end
+        }
+    else
+        dialog.signal_connect('response') { dialog.destroy }
+    end
 end
 
 def backend_wait_message(parent, msg, infopipe_path, mode)
@@ -2250,6 +2254,17 @@ def perform_redo
     end
 end
 
+def show_one_click_explanation(intro)
+    show_popup($main_window, utf8(_("<b>One-Click tools.</b>
+
+%s When such a tool is activated
+(<span foreground='darkblue'>Rotate clockwise</span>, <span foreground='darkblue'>Rotate counter-clockwise</span>, <span foreground='darkblue'>Enhance</span> or <span foreground='darkblue'>Delete</span>), clicking
+on a thumbnail will immediately apply the desired action.
+
+Click the <span foreground='darkblue'>None</span> icon when you're finished with One-Click tools.
+") % intro))
+end
+
 def create_menu_and_toolbar
 
     #- menu
@@ -2328,12 +2343,48 @@ def create_menu_and_toolbar
 
     helpmenu = Gtk::MenuItem.new(utf8(_("_Help")))
     helpsubmenu = Gtk::Menu.new
+    helpsubmenu.append(one_click = Gtk::ImageMenuItem.new(utf8(_("One-click tools"))))
+    one_click.image = Gtk::Image.new("#{$FPATH}/images/stock-tools-16.png")
+    helpsubmenu.append(speed = Gtk::ImageMenuItem.new(utf8(_("Speedup: key shortcuts and mouse gestures"))))
+    speed.image = Gtk::Image.new("#{$FPATH}/images/stock-info-16.png")
+    helpsubmenu.append(        Gtk::SeparatorMenuItem.new)
     helpsubmenu.append(about = Gtk::ImageMenuItem.new(Gtk::Stock::ABOUT))
     helpmenu.set_submenu(helpsubmenu)
     mb.append(helpmenu)
 
+    one_click.signal_connect('activate') {
+        show_one_click_explanation(_("One-Click tools are available in the toolbar."))
+    }
+
+    speed.signal_connect('activate') {
+        show_popup($main_window, utf8(_("<span size='large' weight='bold'>Key shortcuts:</span>
+
+<span foreground='darkblue'>Tab</span>: go to next image caption and select text (begin typing to erase current text!)
+<span foreground='darkblue'>Shift-Tab</span>: go to previous image caption
+<span foreground='darkblue'>Control-Left/Right/Up/Down</span>: go to specified direction's image caption
+<span foreground='darkblue'>Control-Enter</span>: for an image, open larger view; for a video, launch player
+<span foreground='darkblue'>Control-Delete</span>: delete image
+<span foreground='darkblue'>Shift-Left/Right/Up/Down</span>: move image left/right/up/down
+<span foreground='darkblue'>Alt-Left/Right</span>: rotate image clockwise/counter-clockwise
+<span foreground='darkblue'>Control-z</span>: undo
+<span foreground='darkblue'>Control-r</span>: redo
+
+<span size='large' weight='bold'>Mouse gestures:</span>
+
+Mouse gestures are 'unusual' mouse movements triggering special actions, and are great
+for speeding up your editions.
+
+<span foreground='darkblue'>Left click, drag to the right, release</span>: rotate image clockwise
+<span foreground='darkblue'>Left click, drag to the left, release</span>: rotate image counter-clockwise
+<span foreground='darkblue'>Left click, drag to the bottom, release</span>: remove image
+<span foreground='darkblue'>Left click, hold left button, right click</span>: undo
+<span foreground='darkblue'>Right click, hold right button, left click</span>: redo
+")), { :pos_centered => true, :not_transient => true })
+    }
+
+
     about.signal_connect('activate') {
-            show_popup($main_window, utf8(_("<span size='x-large' weight='bold'>Booh %s</span>
+        show_popup($main_window, utf8(_("<span size='x-large' weight='bold'>Booh %s</span>
 
 <i>``The Web-Album of choice for discriminating Linux users''</i>
 
@@ -2407,14 +2458,7 @@ French: Guillaume Cottenceau") % $VERSION), { :centered => true, :pos_centered =
 
     one_click_explain_try = Proc.new {
         if !$config['one-click-explained']
-            show_popup($main_window, utf8(_("<b>One-Click tools.</b>
-
-You have just clicked on a One-Click tool. When such a tool is activated
-(<span foreground='darkblue'>Rotate clockwise</span>, <span foreground='darkblue'>Rotate counter-clockwise</span>, <span foreground='darkblue'>Enhance</span> or <span foreground='darkblue'>Delete</span>), clicking
-on a thumbnail will immediately apply the desired action.
-
-Click the <span foreground='darkblue'>None</span> icon when you're finished with One-Click tools.
-")))
+            show_one_click_explanation(_("You have just clicked on a One-Click tool."))
             $config['one-click-explained'] = true
         end
     }
diff --git a/data/booh/images/stock-info-16.png b/data/booh/images/stock-info-16.png
new file mode 100644 (file)
index 0000000..ee5f3f5
Binary files /dev/null and b/data/booh/images/stock-info-16.png differ
diff --git a/data/booh/images/stock-tools-16.png b/data/booh/images/stock-tools-16.png
new file mode 100644 (file)
index 0000000..b63d9cd
Binary files /dev/null and b/data/booh/images/stock-tools-16.png differ