}
ok = false
while !ok
- if fc.run == Gtk::Dialog::RESPONSE_ACCEPT
+ if fc.run == Gtk::Dialog::RESPONSE_ACCEPT && fc.filename
push_mousecursor_wait(fc)
msg = open_file_user(fc.filename)
pop_mousecursor(fc)
nil,
[Gtk::Stock::OPEN, Gtk::Dialog::RESPONSE_ACCEPT], [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL])
fc.transient_for = $main_window
- if fc.run == Gtk::Dialog::RESPONSE_ACCEPT
+ if fc.run == Gtk::Dialog::RESPONSE_ACCEPT && fc.filename
src.text = utf8(fc.filename)
process_src_nb.call
conf.text = File.expand_path("~/.booh/#{File.basename(src.text)}")
nil,
[Gtk::Stock::OPEN, Gtk::Dialog::RESPONSE_ACCEPT], [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL])
fc.transient_for = $main_window
- if fc.run == Gtk::Dialog::RESPONSE_ACCEPT
+ if fc.run == Gtk::Dialog::RESPONSE_ACCEPT && fc.filename
dest.text = utf8(fc.filename)
end
fc.destroy
fc.transient_for = $main_window
fc.add_shortcut_folder(File.expand_path("~/.booh"))
fc.set_current_folder(File.expand_path("~/.booh"))
- if fc.run == Gtk::Dialog::RESPONSE_ACCEPT
+ if fc.run == Gtk::Dialog::RESPONSE_ACCEPT && fc.filename
conf.text = utf8(fc.filename)
end
fc.destroy
fc.add_shortcut_folder(File.expand_path("~/.booh"))
fc.set_current_folder(File.expand_path("~/.booh"))
fc.filename = $orig_filename
- if fc.run == Gtk::Dialog::RESPONSE_ACCEPT
+ if fc.run == Gtk::Dialog::RESPONSE_ACCEPT && fc.filename
$orig_filename = fc.filename
if ! save_current_file_user
fc.destroy
ok = false
load = false
while !ok
- if fc.run == Gtk::Dialog::RESPONSE_ACCEPT
+ if fc.run == Gtk::Dialog::RESPONSE_ACCEPT && fc.filename
msg = open_dir(fc.filename)
if msg
show_popup(fc, msg)
if lastpath
fc.current_folder = lastpath
end
- if fc.run == Gtk::Dialog::RESPONSE_ACCEPT
+ if fc.run == Gtk::Dialog::RESPONSE_ACCEPT && fc.filename
pathlabel.text = fc.filename
pathlabel.set_alignment(0, 0.5)
end