diff options
author | Milan Crha <mcrha@redhat.com> | 2011-01-24 20:30:38 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-25 23:37:39 +0800 |
commit | 9bd1641646ba98139dcd1fac959165c871e0f979 (patch) | |
tree | 000f6de5ae174280ef02684f714e4eb82f304e59 /calendar/gui/dialogs/comp-editor.c | |
parent | 413ec51e6f58479ee70633aabfe1bc9826a0f79e (diff) | |
download | gsoc2013-evolution-9bd1641646ba98139dcd1fac959165c871e0f979.tar.gz gsoc2013-evolution-9bd1641646ba98139dcd1fac959165c871e0f979.tar.zst gsoc2013-evolution-9bd1641646ba98139dcd1fac959165c871e0f979.zip |
Various critical warnings about comp-editor-pages and date edit
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index b62e5f2aa8..0115f85a0e 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1419,6 +1419,27 @@ comp_editor_get_property (GObject *object, } static void +unref_page_cb (gpointer editor_page, gpointer comp_editor) +{ + if (IS_COMP_EDITOR_PAGE (editor_page)) { + GtkWidget *page_widget; + CompEditorPage *page = COMP_EDITOR_PAGE (editor_page); + CompEditor *editor = COMP_EDITOR (comp_editor); + + g_return_if_fail (page != NULL); + g_return_if_fail (editor != NULL); + + page_widget = comp_editor_page_get_widget (page); + g_signal_handlers_disconnect_matched ( + page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page); + } + + g_signal_handlers_disconnect_matched ( + editor_page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, comp_editor); + g_object_unref (editor_page); +} + +static void comp_editor_dispose (GObject *object) { CompEditorPrivate *priv; @@ -1464,7 +1485,7 @@ comp_editor_dispose (GObject *object) /* We want to destroy the pages after the widgets get destroyed, since they have lots of signal handlers connected to the widgets with the pages as the data. */ - g_list_foreach (priv->pages, (GFunc) g_object_unref, NULL); + g_list_foreach (priv->pages, (GFunc) unref_page_cb, object); g_list_free (priv->pages); priv->pages = NULL; @@ -2589,8 +2610,7 @@ page_unmapped_cb (GtkWidget *page_widget, return; if (page->accel_group) { - gtk_window_remove_accel_group (GTK_WINDOW (toplevel), - page->accel_group); + gtk_window_remove_accel_group (GTK_WINDOW (toplevel), page->accel_group); } } |