end
$loading_progressbar.fraction = i.to_f / allentries.size
$loading_progressbar.text = utf8(_("Loading... %d%") % (100 * $loading_progressbar.fraction))
+ if $quit
+ return
+ end
end
if i <= $config['preload-distance'].to_i * 2
#- not yet preloaded correctly
def try_quit(*options)
Gtk.main_quit
+ $quit = true
end
def execute
0, 1, table_y, table_y + 1, Gtk::FILL, Gtk::SHRINK, 2, 2)
tbl.attach(Gtk::Alignment.new(0, 0.5, 1, 0).add(thumbnails_height = Gtk::SpinButton.new(32, 256, 16).set_value($config['thumbnails-height'].to_i)),
1, 2, table_y, table_y + 1, Gtk::FILL, Gtk::SHRINK, 2, 2)
- tooltips.set_tip(thumbnails_height, utf8(_("The desired height for the thumbnails line on the bottom")), nil)
+ tooltips.set_tip(thumbnails_height, utf8(_("The desired height of the thumbnails in the thumbnails line of the bottom")), nil)
table_y += 1
tbl.attach(Gtk::Alignment.new(1, 0.5, 0, 0).add(Gtk::Label.new.set_markup(utf8(_("Preloading distance: ")))),
main_vbox.pack_start($imagesline_sw, false, false)
main_vbox.pack_end($statusbar = Gtk::Statusbar.new, false, false)
- $imagesline.set_size_request(-1, Gtk::Button.new.size_request[1] + Entry.thumbnails_height + 15)
+ $imagesline.set_size_request(-1, Gtk::Button.new.size_request[1] + Entry.thumbnails_height + Entry.thumbnails_height/4)
$main_window = create_window
$main_window.add(main_vbox)
if msg = open_dir(*ARGV)
puts msg
else
- show_entries($allentries)
+ Gtk.idle_add {
+ show_entries($allentries)
+ false
+ }
end
end
Gtk.main