Kaydet (Commit) cd246927 authored tarafından Enrico Tröger's avatar Enrico Tröger

Explicitly disconnect menus from GeanyMenuButtonAction on quit to not trigger…

Explicitly disconnect menus from GeanyMenuButtonAction on quit to not trigger updating the menus on each item removal.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4917 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 3e78659f
......@@ -12,6 +12,9 @@
* src/toolbar.c:
Improve adding/removing of the special separator between menubar and
toolbar when the toolbar is appended to the menubar.
* src/toolbar.c, src/templates.c:
Explicitly disconnect menus from GeanyMenuButtonAction on quit to
not trigger updating the menus on each item removal.
2010-05-15 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
......
......@@ -709,6 +709,11 @@ void templates_free_templates(void)
gint i;
GList *children, *item;
/* disconnect the menu from the action widget, so destroying the items below doesn't
* trigger rebuilding of the menu on each item destroy */
geany_menu_button_action_set_menu(
GEANY_MENU_BUTTON_ACTION(toolbar_get_action_by_name("New")), NULL);
for (i = 0; i < GEANY_MAX_TEMPLATES; i++)
{
g_free(templates[i]);
......@@ -725,8 +730,6 @@ void templates_free_templates(void)
}
g_list_free(children);
geany_menu_button_action_set_menu(
GEANY_MENU_BUTTON_ACTION(toolbar_get_action_by_name("New")), NULL);
g_object_unref(new_with_template_menu);
new_with_template_menu = NULL;
}
......
......@@ -517,8 +517,9 @@ gint toolbar_get_insert_position(void)
void toolbar_finalize(void)
{
g_object_unref(geany_menu_button_action_get_menu(
GEANY_MENU_BUTTON_ACTION(toolbar_get_action_by_name("Open"))));
GeanyMenubuttonAction *open_action = GEANY_MENU_BUTTON_ACTION(toolbar_get_action_by_name("Open"));
g_object_unref(geany_menu_button_action_get_menu(open_action));
geany_menu_button_action_set_menu(open_action, NULL);
/* unref'ing the GtkUIManager object will destroy all its widgets unless they were ref'ed */
g_object_unref(uim);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment