- identify (from ImageMagick) - for photos captions
- exif - to show full formatted EXIF information from photos
- mplayer - for videos thumbnails generation
-- gimp - for photos editing
+- gimp - for photos editing (may not be a hard require)
+- mozilla-firefox - for showing albums in browser, and going on the
+ web for tutorials (may not be a hard require)
Compiling and Installing Quick Start
Hint: don't forget to specify the full path to the executable,
e.g. '/usr/bin/mplayer' is correct but 'mplayer' only is not.") % viewer_binary), { :pos_centered => true, :not_transient => true })
end
+end
+
+def check_image_editor
image_editor_binary = $config['image-editor'].split.first
if image_editor_binary && !File.executable?(image_editor_binary)
show_popup($main_window, utf8(_("The configured image editor seems to be unavailable.
Problem was: '%s' is not an executable file.
Hint: don't forget to specify the full path to the executable,
e.g. '/usr/bin/gimp-remote' is correct but 'gimp-remote' only is not.") % image_editor_binary), { :pos_centered => true, :not_transient => true })
- end
- browser_binary = $config['browser'].split.first
- if browser_binary && !File.executable?(browser_binary)
- show_popup($main_window, utf8(_("The configured browser seems to be unavailable.
-You should fix this in Edit/Preferences so that you can open URLs.
-
-Problem was: '%s' is not an executable file.") % browser_binary), { :pos_centered => true, :not_transient => true })
+ return false
+ else
+ return true
end
end
menu.append(editexternally = Gtk::ImageMenuItem.new(utf8(_("Edit image"))))
editexternally.image = Gtk::Image.new("#{$FPATH}/images/stock-tool-ink-16.png")
editexternally.signal_connect('activate') {
- cmd = from_utf8($config['image-editor']).gsub('%f', "'#{fullpath}'")
- msg 2, cmd
- system(cmd)
+ if check_image_editor
+ cmd = from_utf8($config['image-editor']).gsub('%f', "'#{fullpath}'")
+ msg 2, cmd
+ system(cmd)
+ end
}
end
menu.append(refresh_item = Gtk::ImageMenuItem.new(Gtk::Stock::REFRESH))
ios.close
end
+ def check_browser
+ browser_binary = $config['browser'].split.first
+ if browser_binary && !File.executable?(browser_binary)
+ show_popup($main_window, utf8(_("The configured browser seems to be unavailable.
+You should fix this in Edit/Preferences so that you can open URLs.
+
+Problem was: '%s' is not an executable file.") % browser_binary), { :pos_centered => true, :not_transient => true })
+ return false
+ else
+ return true
+ end
+ end
+
def open_url(url)
- cmd = $config['browser'].gsub('%f', "'#{url}'") + ' &'
- msg 2, cmd
- system(cmd)
+ if check_browser
+ cmd = $config['browser'].gsub('%f', "'#{url}'") + ' &'
+ msg 2, cmd
+ system(cmd)
+ end
end
def get_license