From: Carlos Lopez Date: Sun, 9 May 2010 18:19:42 +0000 (+0200) Subject: Try to fix the dock dialogs sizes problem since gtkmm 2.18. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0dca8fcc062e3cdafb5124b86d47a16da5f1980f;p=synfig.git Try to fix the dock dialogs sizes problem since gtkmm 2.18. Dialogs are not shown during settings loading. They are shown specifically by the application using the new show all dock dialogs member. --- diff --git a/synfig-studio/src/gtkmm/app.cpp b/synfig-studio/src/gtkmm/app.cpp index d2d3443..95e2831 100644 --- a/synfig-studio/src/gtkmm/app.cpp +++ b/synfig-studio/src/gtkmm/app.cpp @@ -1306,14 +1306,14 @@ App::App(int *argc, char ***argv): state_manager->add_state(&state_star); state_manager->add_state(&state_gradient); if(!getenv("SYNFIG_DISABLE_POLYGON")) state_manager->add_state(&state_polygon); // Enabled - for working without ducks - + /* bline tools */ state_manager->add_state(&state_bline); if(!getenv("SYNFIG_DISABLE_DRAW" )) state_manager->add_state(&state_draw); // Enabled for now. Let's see whether they're good enough yet. if(!getenv("SYNFIG_DISABLE_WIDTH" )) state_manager->add_state(&state_width); // Enabled since 0.61.09 state_manager->add_state(&state_fill); state_manager->add_state(&state_eyedrop); - + /* other */ state_manager->add_state(&state_text); if(!getenv("SYNFIG_DISABLE_SKETCH" )) state_manager->add_state(&state_sketch); @@ -1392,6 +1392,7 @@ App::App(int *argc, char ***argv): studio_init_cb.task(_("Done.")); studio_init_cb.amount_complete(10000,10000); + dock_manager->show_all_dock_dialogs(); toolbox->present(); } catch(String x) diff --git a/synfig-studio/src/gtkmm/dockmanager.cpp b/synfig-studio/src/gtkmm/dockmanager.cpp index 1fdd439..0002f5b 100644 --- a/synfig-studio/src/gtkmm/dockmanager.cpp +++ b/synfig-studio/src/gtkmm/dockmanager.cpp @@ -288,7 +288,6 @@ DockManager::find_dock_dialog(int id) DockDialog* dock_dialog(new DockDialog()); dock_dialog->set_id(id); - dock_dialog->show(); return *dock_dialog; } @@ -302,3 +301,11 @@ DockManager::find_dock_dialog(int id)const throw std::runtime_error("DockManager::find_dock_dialog(int id)const: not found"); } + +void +DockManager::show_all_dock_dialogs() +{ + std::list::iterator iter; + for(iter=dock_dialog_list_.begin();iter!=dock_dialog_list_.end();++iter) + (*iter)->show(); +} diff --git a/synfig-studio/src/gtkmm/dockmanager.h b/synfig-studio/src/gtkmm/dockmanager.h index 98df376..b825a0a 100644 --- a/synfig-studio/src/gtkmm/dockmanager.h +++ b/synfig-studio/src/gtkmm/dockmanager.h @@ -72,6 +72,7 @@ public: bool unregister_dockable(Dockable& x); Dockable& find_dockable(const synfig::String& x); void present(synfig::String x); + void show_all_dock_dialogs(); }; // END of class DockManager