From: Chris Norman Date: Thu, 3 Sep 2009 20:45:35 +0000 (-0700) Subject: GTK 2.16 throws warning messages for GTK:ActionGroup:Create() if no menu action group... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b8024d47fa89ddb44139120ec7d03e2bee09db77;p=synfig.git GTK 2.16 throws warning messages for GTK:ActionGroup:Create() if no menu action group is specified. This fix provides suitable names for each occurrence. --- diff --git a/synfig-studio/src/gtkmm/app.cpp b/synfig-studio/src/gtkmm/app.cpp index 24e2bcf..c25749b 100644 --- a/synfig-studio/src/gtkmm/app.cpp +++ b/synfig-studio/src/gtkmm/app.cpp @@ -728,7 +728,7 @@ init_ui_manager() Glib::RefPtr toolbox_action_group = Gtk::ActionGroup::create("toolbox"); - Glib::RefPtr actions_action_group = Gtk::ActionGroup::create(); + Glib::RefPtr actions_action_group = Gtk::ActionGroup::create("actions"); menus_action_group->add( Gtk::Action::create("menu-file", _("_File")) ); menus_action_group->add( Gtk::Action::create("menu-edit", _("_Edit")) ); diff --git a/synfig-studio/src/gtkmm/canvasview.cpp b/synfig-studio/src/gtkmm/canvasview.cpp index 3927437..e7eeab4 100644 --- a/synfig-studio/src/gtkmm/canvasview.cpp +++ b/synfig-studio/src/gtkmm/canvasview.cpp @@ -1425,7 +1425,7 @@ CanvasView::init_menus() - canvasmenu - viewmenu */ - action_group = Gtk::ActionGroup::create(); + action_group = Gtk::ActionGroup::create("mainmenu"); //action_group->add( Gtk::Action::create("MenuFile", _("_File")) ); action_group->add( Gtk::Action::create("new", Gtk::Stock::NEW), diff --git a/synfig-studio/src/gtkmm/dock_history.cpp b/synfig-studio/src/gtkmm/dock_history.cpp index c8fc3da..6479c7d 100644 --- a/synfig-studio/src/gtkmm/dock_history.cpp +++ b/synfig-studio/src/gtkmm/dock_history.cpp @@ -67,7 +67,7 @@ using namespace studio; Dock_History::Dock_History(): Dock_CanvasSpecific("history",_("History"),Gtk::StockID("gtk-undo")), - action_group(Gtk::ActionGroup::create()) + action_group(Gtk::ActionGroup::create("action_group_dock_history")) { App::signal_instance_deleted().connect(sigc::mem_fun(*this,&studio::Dock_History::delete_instance)); App::signal_instance_selected().connect(sigc::mem_fun(*this,&studio::Dock_History::set_selected_instance_signal)); diff --git a/synfig-studio/src/gtkmm/dock_keyframes.cpp b/synfig-studio/src/gtkmm/dock_keyframes.cpp index a77c0f5..d4dab66 100644 --- a/synfig-studio/src/gtkmm/dock_keyframes.cpp +++ b/synfig-studio/src/gtkmm/dock_keyframes.cpp @@ -64,7 +64,7 @@ using namespace studio; Dock_Keyframes::Dock_Keyframes(): Dock_CanvasSpecific("keyframes",_("Keyframes"),Gtk::StockID("synfig-keyframes")), - action_group(Gtk::ActionGroup::create()), + action_group(Gtk::ActionGroup::create("action_group_dock_keyframes")), keyframe_action_manager(new KeyframeActionManager) { keyframe_action_manager->set_ui_manager(App::ui_manager()); diff --git a/synfig-studio/src/gtkmm/dock_layergroups.cpp b/synfig-studio/src/gtkmm/dock_layergroups.cpp index d8a2b89..d847ff7 100644 --- a/synfig-studio/src/gtkmm/dock_layergroups.cpp +++ b/synfig-studio/src/gtkmm/dock_layergroups.cpp @@ -66,7 +66,7 @@ using namespace studio; Dock_LayerGroups::Dock_LayerGroups(): Dock_CanvasSpecific("groups",_("Groups"),Gtk::StockID("synfig-group")), - action_group_group_ops(Gtk::ActionGroup::create()), + action_group_group_ops(Gtk::ActionGroup::create("action_group_dock_layergroups")), group_action_manager(new GroupActionManager) { group_action_manager->set_ui_manager(App::ui_manager()); diff --git a/synfig-studio/src/gtkmm/dock_layers.cpp b/synfig-studio/src/gtkmm/dock_layers.cpp index 8fa6ede..72cf0be 100644 --- a/synfig-studio/src/gtkmm/dock_layers.cpp +++ b/synfig-studio/src/gtkmm/dock_layers.cpp @@ -77,8 +77,8 @@ Dock_Layers::Dock_Layers(): { if(layer_action_manager)layer_action_manager->set_ui_manager(App::ui_manager()); - action_group_new_layers=Gtk::ActionGroup::create(); - action_group_layer_ops=Gtk::ActionGroup::create(); + action_group_new_layers=Gtk::ActionGroup::create("action_group_new_layers"); + action_group_layer_ops=Gtk::ActionGroup::create("action_group_layer_ops"); std::map category_map; diff --git a/synfig-studio/src/gtkmm/dock_params.cpp b/synfig-studio/src/gtkmm/dock_params.cpp index a3b478c..8e7c41f 100644 --- a/synfig-studio/src/gtkmm/dock_params.cpp +++ b/synfig-studio/src/gtkmm/dock_params.cpp @@ -63,7 +63,7 @@ using namespace studio; Dock_Params::Dock_Params(): Dock_CanvasSpecific("params",_("Params"),Gtk::Stock::INDEX/*Gtk::StockID("synfig-params")*/), - action_group(Gtk::ActionGroup::create()) + action_group(Gtk::ActionGroup::create("action_group_dock_params")) { /* App::ui_manager()->insert_action_group(action_group_layer_ops); diff --git a/synfig-studio/src/gtkmm/groupactionmanager.cpp b/synfig-studio/src/gtkmm/groupactionmanager.cpp index 31941a3..54eab18 100644 --- a/synfig-studio/src/gtkmm/groupactionmanager.cpp +++ b/synfig-studio/src/gtkmm/groupactionmanager.cpp @@ -60,7 +60,7 @@ static const guint no_prev_popup((guint)-1); /* === M E T H O D S ======================================================= */ GroupActionManager::GroupActionManager(): - action_group_(Gtk::ActionGroup::create()), + action_group_(Gtk::ActionGroup::create("action_group_group_action_manager")), popup_id_(no_prev_popup), queued(false) { @@ -119,7 +119,7 @@ GroupActionManager::clear() action_group_->set_sensitive(true); #else get_ui_manager()->remove_action_group(action_group_); - action_group_=Gtk::ActionGroup::create(); + action_group_=Gtk::ActionGroup::create("action_group_group_action_manager"); #endif } } diff --git a/synfig-studio/src/gtkmm/keyframeactionmanager.cpp b/synfig-studio/src/gtkmm/keyframeactionmanager.cpp index ec238ad..aaddf1f 100644 --- a/synfig-studio/src/gtkmm/keyframeactionmanager.cpp +++ b/synfig-studio/src/gtkmm/keyframeactionmanager.cpp @@ -59,7 +59,7 @@ static const guint no_prev_popup((guint)-1); /* === M E T H O D S ======================================================= */ KeyframeActionManager::KeyframeActionManager(): - action_group_(Gtk::ActionGroup::create()), + action_group_(Gtk::ActionGroup::create("action_group_keyframe_action_manager")), popup_id_(no_prev_popup), queued(false) { @@ -123,7 +123,7 @@ KeyframeActionManager::clear() while(!action_group_->get_actions().empty())action_group_->remove(*action_group_->get_actions().begin()); #else get_ui_manager()->remove_action_group(action_group_); - action_group_=Gtk::ActionGroup::create(); + action_group_=Gtk::ActionGroup::create("action_group_keyframe_action_manager"); #endif } } diff --git a/synfig-studio/src/gtkmm/layeractionmanager.cpp b/synfig-studio/src/gtkmm/layeractionmanager.cpp index 436271a..c3a3be4 100644 --- a/synfig-studio/src/gtkmm/layeractionmanager.cpp +++ b/synfig-studio/src/gtkmm/layeractionmanager.cpp @@ -62,9 +62,9 @@ static const guint no_prev_popup((guint)-1); /* === M E T H O D S ======================================================= */ LayerActionManager::LayerActionManager(): - action_group_(Gtk::ActionGroup::create()), + action_group_(Gtk::ActionGroup::create("action_group_layer_action_manager")), popup_id_(no_prev_popup), - action_group_copy_paste(Gtk::ActionGroup::create()), + action_group_copy_paste(Gtk::ActionGroup::create("action_group_copy_paste")), queued(false) { action_cut_=Gtk::Action::create( @@ -189,7 +189,7 @@ LayerActionManager::clear() #ifdef ONE_ACTION_GROUP #else if(action_group_)get_ui_manager()->remove_action_group(action_group_); - action_group_=Gtk::ActionGroup::create(); + action_group_=Gtk::ActionGroup::create("action_group_layer_action_manager"); #endif } } diff --git a/synfig-studio/src/gtkmm/mod_palette/dock_paledit.cpp b/synfig-studio/src/gtkmm/mod_palette/dock_paledit.cpp index 88c8892..03553e0 100644 --- a/synfig-studio/src/gtkmm/mod_palette/dock_paledit.cpp +++ b/synfig-studio/src/gtkmm/mod_palette/dock_paledit.cpp @@ -121,7 +121,7 @@ Dock_PalEdit::Dock_PalEdit(): //palette_settings(new PaletteSettings(this,"colors")), table(2,2,false) { - action_group=Gtk::ActionGroup::create(); + action_group=Gtk::ActionGroup::create("action_group_pal_edit"); action_group->add(Gtk::Action::create( "palette-add-color", Gtk::StockID("gtk-add"), diff --git a/synfig-studio/src/gtkmm/state_sketch.cpp b/synfig-studio/src/gtkmm/state_sketch.cpp index 0cac528..b0d78f0 100644 --- a/synfig-studio/src/gtkmm/state_sketch.cpp +++ b/synfig-studio/src/gtkmm/state_sketch.cpp @@ -230,7 +230,7 @@ StateSketch_Context::toggle_show_sketch() } StateSketch_Context::StateSketch_Context(CanvasView* canvas_view): - action_group(Gtk::ActionGroup::create()), + action_group(Gtk::ActionGroup::create("action_group_state_sketch")), canvas_view_(canvas_view), is_working(*canvas_view), prev_workarea_layer_status_(get_work_area()->get_allow_layer_clicks()), diff --git a/synfig-studio/src/gtkmm/statemanager.cpp b/synfig-studio/src/gtkmm/statemanager.cpp index 4a6828c..645658a 100644 --- a/synfig-studio/src/gtkmm/statemanager.cpp +++ b/synfig-studio/src/gtkmm/statemanager.cpp @@ -57,7 +57,7 @@ using namespace studio; /* === M E T H O D S ======================================================= */ StateManager::StateManager(): - state_group(Gtk::ActionGroup::create()), + state_group(Gtk::ActionGroup::create("action_group_state_manager")), merge_id(App::ui_manager()->new_merge_id()) { App::ui_manager()->insert_action_group(get_action_group());