combostore = Gtk::ListStore.new(Gdk::Pixbuf, String)
iter = combostore.append
if normal
- iter[0] = $main_window.render_icon(Gtk::Stock::GO_FORWARD, Gtk::IconSize::MENU)
- iter[1] = utf8(_("Move to:"))
- iter = combostore.append
iter[0] = $main_window.render_icon(Gtk::Stock::PASTE, Gtk::IconSize::MENU)
iter[1] = utf8(_("Copy to:"))
+ iter = combostore.append
+ iter[0] = $main_window.render_icon(Gtk::Stock::GO_FORWARD, Gtk::IconSize::MENU)
+ iter[1] = utf8(_("Move to:"))
else
iter[0] = $main_window.render_icon(Gtk::Stock::DELETE, Gtk::IconSize::MENU)
iter[1] = utf8(_("Permanently remove"))
destination = stuff[key][:pathlabel].text
label2entries[key].each { |entry|
if stuff[key][:combo].active == 0
- system("mv '#{entry.path}' '#{destination}'") or raise "failed to move '#{entry.path}'"
- moved += 1
- elsif stuff[key][:combo].active == 1
system("cp -dp '#{entry.path}' '#{destination}'") or raise "failed to copy '#{entry.path}'"
copied += 1
+ elsif stuff[key][:combo].active == 1
+ system("mv '#{entry.path}' '#{destination}'") or raise "failed to move '#{entry.path}'"
+ moved += 1
end
}
end
for child in $imagesline.children
$imagesline.remove(child)
end
+ set_imagesline_size_request
+end
+
+def set_imagesline_size_request
+ $imagesline.set_size_request(-1, Gtk::Button.new.size_request[1] + Entry.thumbnails_height + Entry.thumbnails_height/4)
end
def create_main_window
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 + Entry.thumbnails_height/4)
+ set_imagesline_size_request
$main_window = create_window
$main_window.add(main_vbox)