X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=3fe18a765f6a6e1e5ba2f7d2afad2a48d532d47e;hb=24ff35aed1b5a84e10599c686402cd41561e7510;hp=0292ff46d0b4648a7071b3842b145d77aa9cab8a;hpb=1596d1d53e12ad13aba324347b0751de26393180;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 0292ff4..3fe18a7 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -335,16 +335,7 @@ public: virtual bool error(const std::string &err) { - Gtk::Dialog dialog( - "Error", // Title - true, // Modal - true // use_separator - ); - Gtk::Label label(err); - label.show(); - - dialog.get_vbox()->pack_start(label); - dialog.add_button(Gtk::StockID("gtk-ok"),RESPONSE_OK); + Gtk::MessageDialog dialog(err, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true); dialog.show(); dialog.run(); return true; @@ -1224,17 +1215,15 @@ App::App(int *argc, char ***argv): state_manager->add_state(&state_zoom); - if(false) { - // Disabled this tool because it should be - // considered deprecated. Use the bline tool instead. - state_manager->add_state(&state_polygon); + // Disabled this tool because it should be + // considered deprecated. Use the bline tool instead. + if(getenv("SYNFIG_ENABLE_POLYGON")) state_manager->add_state(&state_polygon); - // These tools are disabled for now, - // because they tend to confuse users. - state_manager->add_state(&state_draw); - state_manager->add_state(&state_sketch); - state_manager->add_state(&state_width); - } + // These tools are disabled by default for now, + // because they tend to confuse users. + if(getenv("SYNFIG_ENABLE_DRAW" )) state_manager->add_state(&state_draw); + if(getenv("SYNFIG_ENABLE_SKETCH")) state_manager->add_state(&state_sketch); + if(getenv("SYNFIG_ENABLE_WIDTH" )) state_manager->add_state(&state_width); studio_init_cb.task("Init ModPalette..."); module_list_.push_back(new ModPalette()); module_list_.back()->start(); @@ -1248,6 +1237,7 @@ App::App(int *argc, char ***argv): 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 ) ); studio_init_cb.task("Init auto recovery..."); auto_recover=new AutoRecover(); @@ -1872,16 +1862,8 @@ App::dialog_saveas_file(const std::string &title, std::string &filename) void App::dialog_error_blocking(const std::string &title, const std::string &message) { - Gtk::Dialog dialog( - title, // Title - true, // Modal - true // use_separator - ); - Gtk::Label label(message); - label.show(); - - dialog.get_vbox()->pack_start(label); - dialog.add_button(Gtk::StockID("gtk-ok"),1); + Gtk::MessageDialog dialog(message, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true); + dialog.set_title(title); dialog.show(); dialog.run(); } @@ -1889,16 +1871,8 @@ App::dialog_error_blocking(const std::string &title, const std::string &message) void App::dialog_warning_blocking(const std::string &title, const std::string &message) { - Gtk::Dialog dialog( - title, // Title - true, // Modal - true // use_separator - ); - Gtk::Label label(message); - label.show(); - - dialog.get_vbox()->pack_start(label); - dialog.add_button(Gtk::StockID("gtk-ok"),1); + Gtk::MessageDialog dialog(message, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + dialog.set_title(title); dialog.show(); dialog.run(); }