Revision: 4643 http://geany.svn.sourceforge.net/geany/?rev=4643&view=rev Author: eht16 Date: 2010-02-06 17:24:43 +0000 (Sat, 06 Feb 2010)
Log Message: ----------- Unref the new files toolbar menu when setting a new menu to fix possible crashes when reloading configuration.
Modified Paths: -------------- trunk/ChangeLog trunk/src/geanymenubuttonaction.c trunk/src/templates.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-02-06 16:14:41 UTC (rev 4642) +++ trunk/ChangeLog 2010-02-06 17:24:43 UTC (rev 4643) @@ -6,6 +6,9 @@ * data/filetypes.python: Adjust style for secondary keywords to be less aggressive. Add Python 2.5 builtins keywords. + * src/geanymenubuttonaction.c, src/templates.c: + Unref the new files toolbar menu when setting a new menu to fix + possible crashes when reloading configuration.
2010-02-01 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/geanymenubuttonaction.c =================================================================== --- trunk/src/geanymenubuttonaction.c 2010-02-06 16:14:41 UTC (rev 4642) +++ trunk/src/geanymenubuttonaction.c 2010-02-06 17:24:43 UTC (rev 4643) @@ -236,7 +236,10 @@ priv = GEANY_MENU_BUTTON_ACTION_GET_PRIVATE(action);
if (priv->menu != NULL && GTK_IS_WIDGET(priv->menu)) + { g_signal_handlers_disconnect_by_func(priv->menu, menu_items_changed_cb, action); + g_object_unref(priv->menu); + } if (menu != NULL) { g_signal_connect(menu, "add", G_CALLBACK(menu_items_changed_cb), action);
Modified: trunk/src/templates.c =================================================================== --- trunk/src/templates.c 2010-02-06 16:14:41 UTC (rev 4642) +++ trunk/src/templates.c 2010-02-06 17:24:43 UTC (rev 4643) @@ -668,8 +668,8 @@ } g_list_free(children);
- /* Shouldn't unrefing destroy children anyway? */ - g_object_unref(new_with_template_menu); + geany_menu_button_action_set_menu( + GEANY_MENU_BUTTON_ACTION(toolbar_get_action_by_name("New")), NULL); new_with_template_menu = NULL; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.