]> www.fi.muni.cz Git - evince.git/commitdiff
Use connect_object rather than explicitly disconnect on dispose.
authorMarco Pesenti Gritti <mpg@redhat.com>
Fri, 29 Apr 2005 08:43:08 +0000 (08:43 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Fri, 29 Apr 2005 08:43:08 +0000 (08:43 +0000)
2005-04-29  Marco Pesenti Gritti  <mpg@redhat.com>

        * 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.

ChangeLog
shell/ev-page-action.c
shell/ev-window.c

index b6ac3953323cff35c6a02932a591878234834f89..f0ed51cc5c0721ab8a5ca257033fb4e4c6b4c4be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2005-04-29  Marco Pesenti Gritti  <mpg@redhat.com>
+
+       * 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  <mpg@redhat.com>
+
+       * shell/ev-page-action.c: (update_page_cache),
+       (ev_page_action_dispose):
+
 2005-04-28  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * backend/ev-page-cache.c: (_ev_page_cache_new),
index 78e25700a38292cd5ab9debb3df6e341586b9e87..deb9b773895708913c94c0c3b16ac143a60156e6 100644 (file)
@@ -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;
        }
index ad2e19a9f9dde0148c8d9f63e76ef211c7b298b1..471a45dbf7ed6c68f38c80011c306ef043d7ee83 100644 (file)
@@ -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;
 }