[mutter] use g_signal_handlers_disconnect_by_func instead of an old deprecated



commit e985bf0e7aaaf51a1bacc37ea8f0ed3130821612
Author: Tomas Frydrych <tf linux intel com>
Date:   Tue Aug 4 09:18:43 2009 +0100

    use g_signal_handlers_disconnect_by_func instead of an old deprecated
    
    http://bugzilla.gnome.org/show_bug.cgi?id=587991
    
    (adapted from metacity commit a8f89706016486fa391c9d27450608e9e7d8e62d,
    original patch by Matt Kraai)

 src/tools/mutter-mag.c |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)
---
diff --git a/src/tools/mutter-mag.c b/src/tools/mutter-mag.c
index a5f1b1b..7c5cb3e 100644
--- a/src/tools/mutter-mag.c
+++ b/src/tools/mutter-mag.c
@@ -171,10 +171,8 @@ mouse_release (GtkWidget      *invisible,
 
   shutdown_grab ();
   
-  gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
-                                 GTK_SIGNAL_FUNC (mouse_motion), NULL);
-  gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
-                                 GTK_SIGNAL_FUNC (mouse_release), NULL);
+  g_signal_handlers_disconnect_by_func (invisible, mouse_motion, NULL);
+  g_signal_handlers_disconnect_by_func (invisible, mouse_release, NULL);
 
   return TRUE;
 }
@@ -194,12 +192,8 @@ key_press (GtkWidget   *invisible,
     {
       shutdown_grab ();
 
-      gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
-                                     GTK_SIGNAL_FUNC (mouse_press),
-                                     NULL);
-      gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
-                                     GTK_SIGNAL_FUNC (key_press),
-                                     NULL);
+      g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
+      g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
       
       return TRUE;
     }
@@ -219,12 +213,8 @@ mouse_press (GtkWidget      *invisible,
                         G_CALLBACK (mouse_motion), NULL);
       g_signal_connect (invisible, "button_release_event",
                         G_CALLBACK (mouse_release), NULL);
-      gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
-                                     GTK_SIGNAL_FUNC (mouse_press),
-                                     NULL);
-      gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
-                                     GTK_SIGNAL_FUNC (key_press),
-                                     NULL);
+      g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
+      g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
       return TRUE;
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]