From: Marco Pesenti Gritti Date: Fri, 29 Apr 2005 08:43:08 +0000 (+0000) Subject: Use connect_object rather than explicitly disconnect on dispose. X-Git-Tag: EVINCE_0_3_0~18 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=c057cade000e7e71c7af4f34ac86c96dfd52f526;p=evince.git Use connect_object rather than explicitly disconnect on dispose. 2005-04-29 Marco Pesenti Gritti * shell/ev-page-action.c: (update_page_cache), (ev_page_action_dispose): * shell/ev-window.c: (destroy_fullscreen_popup), (ev_window_create_fullscreen_popup): Use connect_object rather than explicitly disconnect on dispose. --- diff --git a/ChangeLog b/ChangeLog index b6ac3953..f0ed51cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-04-29 Marco Pesenti Gritti + + * shell/ev-page-action.c: (update_page_cache), + (ev_page_action_dispose): + * shell/ev-window.c: (destroy_fullscreen_popup), + (ev_window_create_fullscreen_popup): + + Use connect_object rather than explicitly + disconnect on dispose. + +2005-04-29 Marco Pesenti Gritti + + * shell/ev-page-action.c: (update_page_cache), + (ev_page_action_dispose): + 2005-04-28 Nickolay V. Shmyrev * backend/ev-page-cache.c: (_ev_page_cache_new), diff --git a/shell/ev-page-action.c b/shell/ev-page-action.c index 78e25700..deb9b773 100644 --- a/shell/ev-page-action.c +++ b/shell/ev-page-action.c @@ -197,10 +197,10 @@ update_page_cache (EvPageAction *page, GParamSpec *pspec, EvPageActionWidget *pr g_signal_handler_disconnect (proxy->page_cache, proxy->signal_id); if (page_cache != NULL) { - signal_id = g_signal_connect (page_cache, - "page-changed", - G_CALLBACK (page_changed_cb), - proxy); + signal_id = g_signal_connect_object (page_cache, + "page-changed", + G_CALLBACK (page_changed_cb), + proxy, 0); /* Set the initial value */ page_changed_cb (page_cache, ev_page_cache_get_current_page (page_cache), @@ -419,7 +419,6 @@ ev_page_action_dispose (GObject *object) EvPageAction *page = EV_PAGE_ACTION (object); if (page->priv->page_cache) { - g_signal_handlers_disconnect_matched (page->priv->page_cache, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, page_changed_cb, NULL); g_object_unref (page->priv->page_cache); page->priv->page_cache = NULL; } diff --git a/shell/ev-window.c b/shell/ev-window.c index ad2e19a9..471a45db 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1181,11 +1181,6 @@ destroy_fullscreen_popup (EvWindow *window) { if (window->priv->fullscreen_popup != NULL) { - /* FIXME multihead */ - g_signal_handlers_disconnect_by_func - (gdk_screen_get_default (), - G_CALLBACK (screen_size_changed_cb), window); - gtk_widget_destroy (window->priv->fullscreen_popup); window->priv->fullscreen_popup = NULL; } @@ -1321,10 +1316,12 @@ ev_window_create_fullscreen_popup (EvWindow *window) gtk_window_set_resizable (GTK_WINDOW (popup), FALSE); /* FIXME multihead */ - g_signal_connect (gdk_screen_get_default (), "size-changed", - G_CALLBACK (screen_size_changed_cb), window); - g_signal_connect (popup, "size_request", - G_CALLBACK (fullscreen_popup_size_request_cb), window); + g_signal_connect_object (gdk_screen_get_default (), "size-changed", + G_CALLBACK (screen_size_changed_cb), + window, 0); + g_signal_connect_object (popup, "size_request", + G_CALLBACK (fullscreen_popup_size_request_cb), + window, 0); return popup; }