}
void
-App::dialog_open()
+App::dialog_open(string filename)
{
- string filename="*.sif";
+ if (filename.empty())
+ filename="*.sif";
while(dialog_open_file("Open", filename, ANIMATION_DIR_PREFERENCE))
{
sigc::hide_return(sigc::ptr_fun(&studio::App::new_instance))
);
action_group->add( Gtk::Action::create("open", Gtk::Stock::OPEN),
- sigc::hide_return(sigc::ptr_fun(&studio::App::dialog_open))
+ sigc::hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::open))
);
action_group->add( Gtk::Action::create("save", Gtk::Stock::SAVE),
hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::save))
filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::NEW,
sigc::ptr_fun(&studio::App::new_instance)));
filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::OPEN,
- sigc::ptr_fun(&studio::App::dialog_open)));
+ sigc::bind(sigc::ptr_fun(&studio::App::dialog_open), "")));
filemenu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Open Recent"),*recent_files_menu));
button_about->signal_clicked().connect(sigc::ptr_fun(studio::App::dialog_about));
button_new->signal_clicked().connect(sigc::ptr_fun(studio::App::new_instance));
- button_open->signal_clicked().connect(sigc::ptr_fun(studio::App::dialog_open));
+ button_open->signal_clicked().connect(sigc::bind(sigc::ptr_fun(studio::App::dialog_open), ""));
button_save->signal_clicked().connect(sigc::ptr_fun(save_selected_instance));
button_saveas->signal_clicked().connect(sigc::ptr_fun(save_as_selected_instance));
button_save_all->signal_clicked().connect(sigc::ptr_fun(save_all));