[Spice-devel] [PATCH spice-gtk 2/2] spice-widget: rename mouse_update to update_mouse_mode.

Hans de Goede hdegoede at redhat.com
Fri Dec 9 09:46:52 PST 2011


We already have update_mouse_pointer and update_mouse_grab, so having
a mouse_update function without specifying what "part" of the mouse handling
it exactly updates is confusing, rename it to update_mouse_mode to reflect
what it does and to match the other names.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 gtk/spice-widget.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index bff529c..63e878e 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1406,7 +1406,7 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
 
 /* ---------------------------------------------------------------- */
 
-static void mouse_update(SpiceChannel *channel, gpointer data)
+static void update_mouse_mode(SpiceChannel *channel, gpointer data)
 {
     SpiceDisplay *display = data;
     SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
@@ -1634,7 +1634,7 @@ static void disconnect_main(SpiceDisplay *display)
 
     if (d->main == NULL)
         return;
-    g_signal_handlers_disconnect_by_func(d->main, G_CALLBACK(mouse_update),
+    g_signal_handlers_disconnect_by_func(d->main, G_CALLBACK(update_mouse_mode),
                                          display);
     d->main = NULL;
 }
@@ -1681,8 +1681,8 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
     if (SPICE_IS_MAIN_CHANNEL(channel)) {
         d->main = SPICE_MAIN_CHANNEL(channel);
         g_signal_connect(channel, "main-mouse-update",
-                         G_CALLBACK(mouse_update), display);
-        mouse_update(channel, display);
+                         G_CALLBACK(update_mouse_mode), display);
+        update_mouse_mode(channel, display);
         return;
     }
 
-- 
1.7.7.4



More information about the Spice-devel mailing list