X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=c45d4c3cf71c609f3ef2465bdfbaffdcee572cc3;hb=c3ad95144d148602f672e95ddda1f18fc35502f8;hp=033e285f9065253b80d95e8a98bf553f85245a63;hpb=e44f4e3c44d44afde20b5f42a66e8df2c75108ff;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 033e285..c45d4c3 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -352,7 +352,7 @@ public: } virtual bool - amount_complete(int current, int total) + amount_complete(int /*current*/, int /*total*/) { while(studio::App::events_pending())studio::App::iteration(false); return true; @@ -458,7 +458,15 @@ int v_key_check(const char* key, U32* serial, U32 appid) } +#ifdef _WIN32 +# ifdef LICENSE_KEY_REQUIRED int check_license(String basedir) +# else +int check_license(String /*basedir*/) +# endif +#else +int check_license(String /*basedir*/) +#endif { #ifdef LICENSE_KEY_REQUIRED String key; @@ -906,8 +914,6 @@ init_ui_manager() " " " " " " - " " - " " " " " " " " @@ -920,6 +926,8 @@ init_ui_manager() //" " //" " " " +" " +" " " " " " " " @@ -1034,14 +1042,27 @@ init_ui_manager() ACCEL2(Gtk::AccelKey('o',Gdk::CONTROL_MASK,"//toggle-onion-skin")); ACCEL("//seek-begin","Home"); ACCEL("//seek-end","End"); - ACCEL("//state-normal","a"); - ACCEL("//state-rotate","s"); - ACCEL("//state-scale","d"); - ACCEL("//state-bline","b"); - ACCEL("//state-fill","f"); - ACCEL("//state-eyedrop","e"); - ACCEL("//state-gradient","g"); - ACCEL("//state-zoom","z"); + + ACCEL("//state-normal", "a"); + ACCEL("//state-smooth_move", "v"); + ACCEL("//state-scale", "d"); + ACCEL("//state-rotate", "s"); + + ACCEL("//state-bline", "b"); + ACCEL("//state-circle", "c"); + ACCEL("//state-rectangle", "r"); + ACCEL("//state-gradient", "g"); + + ACCEL("//state-eyedrop", "e"); + ACCEL("//state-fill", "f"); + ACCEL("//state-zoom", "z"); + ACCEL("//state-polygon", "p"); + + ACCEL("//state-draw", "w"); + ACCEL("//state-sketch", "k"); + ACCEL("//state-width", "t"); + ACCEL("//state-mirror", "m"); + ACCEL("//canvas-zoom-fit","z"); #undef ACCEL @@ -1226,15 +1247,16 @@ App::App(int *argc, char ***argv): state_manager->add_state(&state_zoom); - // 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); + // Enabled - it's useful to be able to work with polygons without tangent ducks getting in the way. + // I know we can switch tangent ducks off, but why not allow this kind of layer as well? + if(!getenv("SYNFIG_DISABLE_POLYGON")) state_manager->add_state(&state_polygon); + + // Enabled for now. Let's see whether they're good enough yet. + if(!getenv("SYNFIG_DISABLE_DRAW" )) state_manager->add_state(&state_draw); + if(!getenv("SYNFIG_DISABLE_SKETCH" )) state_manager->add_state(&state_sketch); - // 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); + // Disabled by default - it doesn't work properly? + 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(); @@ -1614,8 +1636,8 @@ App::show_setup() dialog_setup->show(); } -gint Signal_Open_Ok(GtkWidget *widget, int *val){*val=1;return 0;} -gint Signal_Open_Cancel(GtkWidget *widget, int *val){*val=2;return 0;} +gint Signal_Open_Ok(GtkWidget */*widget*/, int *val){*val=1;return 0;} +gint Signal_Open_Cancel(GtkWidget */*widget*/, int *val){*val=2;return 0;} //#ifdef WIN32 //#define USE_WIN32_FILE_DIALOGS 1 @@ -1681,8 +1703,8 @@ App::dialog_open_file(const std::string &title, std::string &filename) Gtk::FileChooserDialog *dialog=new Gtk::FileChooserDialog(title,Gtk::FILE_CHOOSER_ACTION_OPEN); dialog->set_current_folder(prev_path); - dialog->add_button(Gtk::StockID("gtk-ok"),GTK_RESPONSE_ACCEPT); - dialog->add_button(Gtk::StockID("gtk-cancel"),GTK_RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT); if(!filename.empty()) dialog->set_filename(filename); if(dialog->run()==GTK_RESPONSE_ACCEPT) { @@ -1790,8 +1812,8 @@ App::dialog_save_file(const std::string &title, std::string &filename) Gtk::FileChooserDialog *dialog=new Gtk::FileChooserDialog(title,Gtk::FILE_CHOOSER_ACTION_SAVE); dialog->set_current_folder(prev_path); - dialog->add_button(Gtk::StockID("gtk-ok"),GTK_RESPONSE_ACCEPT); - dialog->add_button(Gtk::StockID("gtk-cancel"),GTK_RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT); if(!filename.empty()) dialog->set_filename(filename); if(dialog->run()==GTK_RESPONSE_ACCEPT) { @@ -1856,8 +1878,8 @@ App::dialog_saveas_file(const std::string &title, std::string &filename) Gtk::FileChooserDialog *dialog=new Gtk::FileChooserDialog(title,Gtk::FILE_CHOOSER_ACTION_SAVE); dialog->set_current_folder(prev_path); - dialog->add_button(Gtk::StockID("gtk-ok"),GTK_RESPONSE_ACCEPT); - dialog->add_button(Gtk::StockID("gtk-cancel"),GTK_RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT); if(!filename.empty()) dialog->set_filename(filename); if(dialog->run()==GTK_RESPONSE_ACCEPT) {