end
end
menu.append( Gtk::SeparatorMenuItem.new)
+ menu.append(refresh_item = Gtk::ImageMenuItem.new(Gtk::Stock::REFRESH))
+ refresh_item.signal_connect('activate') { distribute_multiple_call.call(:refresh) }
menu.append(delete_item = Gtk::ImageMenuItem.new(Gtk::Stock::DELETE))
delete_item.signal_connect('activate') { distribute_multiple_call.call(:delete) }
+ else
+ menu.append( Gtk::SeparatorMenuItem.new)
+ menu.append(refresh_item = Gtk::ImageMenuItem.new(Gtk::Stock::REFRESH))
+ refresh_item.signal_connect('activate') { distribute_multiple_call.call(:refresh) }
end
menu.show_all
menu.popup(nil, nil, event.button, event.time)
}
+ refresh = proc {
+ cleanup_all_thumbnails.call
+ my_gen_real_thumbnail.call
+ }
+
rotate_and_cleanup = proc { |angle|
rotate(angle, thumbnail_img, img, $xmldir.elements["*[@filename='#{filename}']"], '', $default_thumbnails[:x], $default_thumbnails[:y])
cleanup_all_thumbnails.call
$name2closures[filename] = { :rotate => rotate_and_cleanup, :enhance => enhance_and_cleanup, :delete => delete, :cut => cut,
:color_swap => color_swap_and_cleanup, :frame_offset => change_frame_offset_and_cleanup_real,
- :whitebalance => whitebalance_and_cleanup_real, :pano => change_pano_amount_and_cleanup_real }
+ :whitebalance => whitebalance_and_cleanup_real, :pano => change_pano_amount_and_cleanup_real, :refresh => refresh }
textview.signal_connect('key-press-event') { |w, event|
propagate = true
{ :rotate => rotate_and_cleanup, :move => move, :color_swap => color_swap_and_cleanup, :enhance => enhance_and_cleanup,
:frame_offset => change_frame_offset_and_cleanup, :delete => delete, :whitebalance => whitebalance_and_cleanup,
:cut => cut, :paste => paste, :view => proc { view_element(filename, { :delete => delete }) },
- :pano => change_pano_amount_and_cleanup })
+ :pano => change_pano_amount_and_cleanup, :refresh => refresh })
end
$ignore_next_release = false
$gesture_press = nil
fc.destroy
}
+ refresh = proc {
+ system("rm -f '#{thumbnail_file}'")
+ my_gen_real_thumbnail.call
+ }
+
rotate_and_cleanup = proc { |angle|
rotate(angle, thumbnail_file, img, xmldir, "#{infotype}-", $default_albums_thumbnails[:x], $default_albums_thumbnails[:y])
system("rm -f '#{thumbnail_file}'")
:can_up => counter > 1, :can_down => counter > 0 && counter < subalbums_counter,
:can_top => counter > 1, :can_bottom => counter > 0 && counter < subalbums_counter },
{ :change => change_image, :move => move, :rotate => rotate_and_cleanup, :enhance => enhance_and_cleanup,
- :color_swap => color_swap_and_cleanup, :frame_offset => change_frame_offset_and_cleanup, :whitebalance => whitebalance_and_cleanup })
+ :color_swap => color_swap_and_cleanup, :frame_offset => change_frame_offset_and_cleanup, :whitebalance => whitebalance_and_cleanup,
+ :refresh => refresh })
end
if event.event_type == Gdk::Event::BUTTON2_PRESS && event.button == 1
change_image.call