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
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)
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
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>
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
}