{
public:
+ virtual Response confirmation(const std::string &title,
+ const std::string &primaryText,
+ const std::string &secondaryText,
+ const std::string &confirmPhrase,
+ const std::string &cancelPhrase,
+ Response defaultResponse)
+ {
+ Gtk::MessageDialog dialog(
+ primaryText, // Message
+ false, // Markup
+ Gtk::MESSAGE_WARNING, // Type
+ Gtk::BUTTONS_NONE, // Buttons
+ true // Modal
+ );
+
+ if (! title.empty())
+ dialog.set_title(title);
+ if (! secondaryText.empty())
+ dialog.set_secondary_text(secondaryText);
+
+ dialog.add_button(cancelPhrase, RESPONSE_CANCEL);
+ dialog.add_button(confirmPhrase, RESPONSE_OK);
+ dialog.set_default_response(defaultResponse);
+
+ dialog.show_all();
+ return (Response) dialog.run();
+ }
+
virtual Response yes_no(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)
{
Gtk::Dialog dialog(
value=strprintf("%s",App::predefined_size.c_str());
return true;
}
-
+
return synfigapp::Settings::get_value(key,value);
}
ret.push_back("custom_filename_prefix");
ret.push_back("preferred_x_size");
ret.push_back("preferred_y_size");
- ret.push_back("predefined_size");
+ ret.push_back("predefined_size");
return ret;
}
};
ACCEL("<Control>0", "<Actions>//quality-10" );
ACCEL("<Control>z", "<Actions>//undo" );
ACCEL("<Control>r", "<Actions>//redo" );
- ACCEL("Delete", "<Actions>//action-LayerRemove" );
+ ACCEL2(Gtk::AccelKey(GDK_Delete,Gdk::CONTROL_MASK, "<Actions>//action-LayerRemove" ));
ACCEL2(Gtk::AccelKey('(',Gdk::CONTROL_MASK, "<Actions>//decrease-low-res-pixel-size" ));
ACCEL2(Gtk::AccelKey(')',Gdk::CONTROL_MASK, "<Actions>//increase-low-res-pixel-size" ));
ACCEL2(Gtk::AccelKey('(',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "<Actions>//amount-dec" ));
ACCEL2(Gtk::AccelKey(',',Gdk::CONTROL_MASK, "<Actions>//seek-prev-frame" ));
ACCEL2(Gtk::AccelKey('>',Gdk::CONTROL_MASK, "<Actions>//seek-next-second" ));
ACCEL2(Gtk::AccelKey('<',Gdk::CONTROL_MASK, "<Actions>//seek-prev-second" ));
- ACCEL2(Gtk::AccelKey('o',Gdk::MOD1_MASK, "<Actions>//toggle-onion-skin" ));
+ ACCEL("<Mod1>o", "<Actions>//toggle-onion-skin" );
ACCEL("<Control><Shift>z", "<Actions>//canvas-zoom-fit" );
ACCEL("<Control>p", "<Actions>//play" );
ACCEL("Home", "<Actions>//seek-begin" );
studio_init_cb.task(_("Init Input Dialog..."));
dialog_input=new Gtk::InputDialog();
dialog_input->get_close_button()->signal_clicked().connect( sigc::mem_fun( *dialog_input, &Gtk::InputDialog::hide ) );
- dialog_input->get_save_button()->signal_clicked().connect( sigc::ptr_fun(studio::App::dialog_not_implemented) );
+ dialog_input->get_save_button()->signal_clicked().connect( sigc::mem_fun( *device_tracker, &DeviceTracker::save_preferences) );
studio_init_cb.task(_("Init auto recovery..."));
auto_recover=new AutoRecover();
studio_init_cb.amount_complete(9250,10000);
studio_init_cb.task(_("Loading Settings..."));
load_settings();
+ device_tracker->load_preferences();
+
studio_init_cb.task(_("Checking auto-recover..."));
studio_init_cb.amount_complete(9900,10000);
if(auto_recover->recovery_needed())
{
splash_screen.hide();
- if (get_ui_interface()->yes_no(_("Auto Recovery"),
- _("Synfig Studio seems to have crashed\n"
- "before you could save all your files.\n"
- "Would you like to re-open those files\n"
- "and recover your unsaved changes?")) ==
- synfigapp::UIInterface::RESPONSE_YES)
+ if (get_ui_interface()->confirmation("Crash Recovery",
+ _("Auto recovery file found"),
+ _("Synfig Studio seems to have crashed\n"
+ "before you could save all your files.\n"
+ "Recover unsaved changes?"),
+ _("Recover"), _("Ignore"))
+ == synfigapp::UIInterface::RESPONSE_OK)
{
int number_recovered;
if(!auto_recover->recover(number_recovered))
delete auto_recover;
delete about;
-
+
toolbox->hide();
// studio::App::iteration(false);
try { Glib::spawn_async(".", command_line, Glib::SPAWN_SEARCH_PATH); }
// Failed, move on to the next one
catch(Glib::SpawnError& exception){ continue; }
- return true; // No exception means we succeeded!
+ return true; // No exception means we succeeded!
}
}
if (warnings != "")
dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str()));
-
+
if (as.find(custom_filename_prefix.c_str()) != 0)
add_recent_file(as);