end
$config['video-viewer'] ||= '/usr/bin/mplayer %f'
$config['browser'] ||= "/usr/bin/mozilla-firefox -remote 'openURL(%f,new-window)' || /usr/bin/mozilla-firefox %f"
+ $config['comments-format'] ||= '%t'
if !FileTest.directory?(File.expand_path('~/.booh'))
system("mkdir ~/.booh")
end
end
false #- propagate
}
- textview.signal_connect('focus-in-event') { |w, event|
- textview.buffer.select_range(textview.buffer.get_iter_at_offset(0), textview.buffer.get_iter_at_offset(-1))
- false #- propagate
- }
candidate_undo_text = nil
textview.signal_connect('focus-in-event') { |w, event|
+ textview.buffer.select_range(textview.buffer.get_iter_at_offset(0), textview.buffer.get_iter_at_offset(-1))
candidate_undo_text = textview.buffer.text
false #- propagate
}
+
textview.signal_connect('key-release-event') { |w, event|
if candidate_undo_text && candidate_undo_text != textview.buffer.text
$modified = true
false #- propagate if needed
end
}
-
+
dialog.window_position = Gtk::Window::POS_MOUSE
dialog.show_all
sw.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC)
sw.add_with_viewport(lbl)
dialog.vbox.add(sw)
- dialog.set_default_size(400, 500)
+ dialog.set_default_size(500, 600)
else
dialog.vbox.add(lbl)
dialog.set_default_size(200, 120)
if $config['mproc']
options += "--mproc #{$config['mproc'].to_i} "
end
- if $config['emptycomments']
- options += "--empty-comments "
- end
+ options += "--comments-format '#{$config['comments-format']}'"
return options
end
notebook.append_page(tbl = Gtk::Table.new(0, 0, false), Gtk::Label.new(utf8(_("Options"))))
tbl.attach(Gtk::Alignment.new(1, 0.5, 0, 0).add(Gtk::Label.new.set_markup(utf8(_("Command for watching videos: ")))),
0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2)
- tbl.attach(Gtk::Alignment.new(0, 0.5, 1, 0).add(video_viewer_entry = Gtk::Entry.new.set_text($config['video-viewer'])),
+ tbl.attach(Gtk::Alignment.new(0, 0.5, 1, 0).add(video_viewer_entry = Gtk::Entry.new.set_text($config['video-viewer']).set_size_request(250, -1)),
1, 2, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2)
tooltips = Gtk::Tooltips.new
tooltips.set_tip(video_viewer_entry, utf8(_("Use %f to specify the filename;
tbl.attach(nogestures_check = Gtk::CheckButton.new(utf8(_("Disable mouse gestures"))),
0, 2, 3, 4, Gtk::FILL, Gtk::SHRINK, 2, 2)
tooltips.set_tip(nogestures_check, utf8(_("Mouse gestures are 'unusual' mouse movements triggering special actions, and are great for speeding up your editions. Get details on available mouse gestures from the Help menu.")), nil)
- tbl.attach(emptycomments_check = Gtk::CheckButton.new(utf8(_("Use empty comments for new albums"))),
- 0, 2, 4, 5, Gtk::FILL, Gtk::SHRINK, 2, 2)
- tooltips.set_tip(emptycomments_check, utf8(_("Normally, filenames are used as comments for new albums. Check this if you prefer empty comments.")), nil)
tbl.attach(deleteondisk_check = Gtk::CheckButton.new(utf8(_("Delete original images/videos as well"))),
0, 2, 5, 6, Gtk::FILL, Gtk::SHRINK, 2, 2)
tooltips.set_tip(deleteondisk_check, utf8(_("Normally, deleting an image or video in booh only removes it from the web-album. If you check this option, the original file in source directory will be removed as well. Undo is possible, since actual deletion is performed only when web-album is saved.")), nil)
+
smp_check.signal_connect('toggled') {
if smp_check.active?
smp_hbox.sensitive = true
smp_spin.value = $config['mproc'].to_i
end
nogestures_check.active = $config['nogestures']
- emptycomments_check.active = $config['emptycomments']
deleteondisk_check.active = $config['deleteondisk']
notebook.append_page(tbl = Gtk::Table.new(0, 0, false), Gtk::Label.new(utf8(_("Advanced"))))
0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2)
tbl.attach(enhance_entry = Gtk::Entry.new.set_text($config['convert-enhance'] || $convert_enhance).set_size_request(250, -1),
1, 2, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tbl.attach(Gtk::Label.new.set_markup(utf8(_("Format to use for comments of \nimages in new albums:"))),
+ 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tbl.attach(commentsformat_entry = Gtk::Entry.new.set_text($config['comments-format']),
+ 1, 2, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tbl.attach(commentsformat_help = Gtk::Button.new(Gtk::Stock::HELP),
+ 2, 3, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tooltips.set_tip(commentsformat_entry, utf8(_("Normally, filenames without extension are used as comments for images and videos in new albums. Use this entry to use something else for images.")), nil)
+ commentsformat_help.signal_connect('clicked') {
+ show_popup(dialog, utf8(_("The comments format you specify is actually passed to the 'identify' program,
+hence you should look at ImageMagick/identify documentation for the most
+accurate and up-to-date documentation. Last time I checked, documentation
+was:
+
+Print information about the image in a format of your choosing. You can
+include the image filename, type, width, height, Exif data, or other image
+attributes by embedding special format characters:
+
+ %O page offset
+ %P page width and height
+ %b file size
+ %c comment
+ %d directory
+ %e filename extension
+ %f filename
+ %g page geometry
+ %h height
+ %i input filename
+ %k number of unique colors
+ %l label
+ %m magick
+ %n number of scenes
+ %o output filename
+ %p page number
+ %q quantum depth
+ %r image class and colorspace
+ %s scene number
+ %t top of filename
+ %u unique temporary filename
+ %w width
+ %x x resolution
+ %y y resolution
+ %z image depth
+ %@ bounding box
+ %# signature
+ %% a percent sign
+
+For example,
+
+ %m:%f %wx%h
+
+displays MIFF:bird.miff 512x480 for an image titled bird.miff and whose
+width is 512 and height is 480.
+
+If the first character of string is @, the format is read from a file titled
+by the remaining characters in the string.
+
+You can also use the following special formatting syntax to print Exif
+information contained in the file:
+
+ %[EXIF:tag]
+
+Where tag can be one of the following:
+
+ * (print all Exif tags, in keyword=data format)
+ ! (print all Exif tags, in tag_number data format)
+ #hhhh (print data for Exif tag #hhhh)
+ ImageWidth
+ ImageLength
+ BitsPerSample
+ Compression
+ PhotometricInterpretation
+ FillOrder
+ DocumentName
+ ImageDescription
+ Make
+ Model
+ StripOffsets
+ Orientation
+ SamplesPerPixel
+ RowsPerStrip
+ StripByteCounts
+ XResolution
+ YResolution
+ PlanarConfiguration
+ ResolutionUnit
+ TransferFunction
+ Software
+ DateTime
+ Artist
+ WhitePoint
+ PrimaryChromaticities
+ TransferRange
+ JPEGProc
+ JPEGInterchangeFormat
+ JPEGInterchangeFormatLength
+ YCbCrCoefficients
+ YCbCrSubSampling
+ YCbCrPositioning
+ ReferenceBlackWhite
+ CFARepeatPatternDim
+ CFAPattern
+ BatteryLevel
+ Copyright
+ ExposureTime
+ FNumber
+ IPTC/NAA
+ ExifOffset
+ InterColorProfile
+ ExposureProgram
+ SpectralSensitivity
+ GPSInfo
+ ISOSpeedRatings
+ OECF
+ ExifVersion
+ DateTimeOriginal
+ DateTimeDigitized
+ ComponentsConfiguration
+ CompressedBitsPerPixel
+ ShutterSpeedValue
+ ApertureValue
+ BrightnessValue
+ ExposureBiasValue
+ MaxApertureValue
+ SubjectDistance
+ MeteringMode
+ LightSource
+ Flash
+ FocalLength
+ MakerNote
+ UserComment
+ SubSecTime
+ SubSecTimeOriginal
+ SubSecTimeDigitized
+ FlashPixVersion
+ ColorSpace
+ ExifImageWidth
+ ExifImageLength
+ InteroperabilityOffset
+ FlashEnergy
+ SpatialFrequencyResponse
+ FocalPlaneXResolution
+ FocalPlaneYResolution
+ FocalPlaneResolutionUnit
+ SubjectLocation
+ ExposureIndex
+ SensingMethod
+ FileSource
+ SceneType")), { :scrolled => true })
+ }
dialog.vbox.show_all
dialog.run { |response|
$config.delete('mproc')
end
$config['nogestures'] = nogestures_check.active?
- $config['emptycomments'] = emptycomments_check.active?
$config['deleteondisk'] = deleteondisk_check.active?
$config['convert-enhance'] = enhance_entry.text
+ $config['comments-format'] = commentsformat_entry.text.gsub(/'/, '')
end
}
dialog.destroy
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))
+") % intro), { :pos_centered => true })
end
def get_license
speed.image = Gtk::Image.new("#{$FPATH}/images/stock-info-16.png")
helpsubmenu.append(tutos = Gtk::ImageMenuItem.new(utf8(_("Online tutorials (opens a web-browser)"))))
tutos.image = Gtk::Image.new("#{$FPATH}/images/stock-web-16.png")
- helpsubmenu.append( Gtk::SeparatorMenuItem.new)
+ helpsubmenu.append(Gtk::SeparatorMenuItem.new)
helpsubmenu.append(about = Gtk::ImageMenuItem.new(Gtk::Stock::ABOUT))
helpmenu.set_submenu(helpsubmenu)
mb.append(helpmenu)