[Xfce4-commits] <xfwm4:master> Don't use the gvalue twice.

Nick Schermer noreply at xfce.org
Sat Apr 16 18:14:02 CEST 2011


Updating branch refs/heads/master
         to c082e6434c664ec9dcd59f021a78ad3781f0d776 (commit)
       from 66711bfa89f4009d09cb0b36e7a7dc829ecec676 (commit)

commit c082e6434c664ec9dcd59f021a78ad3781f0d776
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Apr 16 18:09:45 2011 +0200

    Don't use the gvalue twice.
    
    This avoids a console warning that the value is already set as int.

 src/settings.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/settings.c b/src/settings.c
index 78e07c6..d4b5aff 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -393,6 +393,7 @@ loadTheme (ScreenInfo *screen_info, Settings *rc)
 
     gchar imagename[30];
     GValue tmp_val = { 0, };
+    GValue tmp_val2 = { 0, };
     DisplayInfo *display_info;
     xfwmColorSymbol colsym[ XPM_COLOR_SYMBOL_SIZE + 1 ];
     GtkWidget *widget;
@@ -450,11 +451,11 @@ loadTheme (ScreenInfo *screen_info, Settings *rc)
 
     /* ... and distance */
     display_info->double_click_distance = abs (getIntValue ("double_click_distance", rc));
-    g_value_init (&tmp_val, G_TYPE_INT);
-    if (gdk_setting_get ("gtk-double-click-distance", &tmp_val))
+    g_value_init (&tmp_val2, G_TYPE_INT);
+    if (gdk_setting_get ("gtk-double-click-distance", &tmp_val2))
     {
-        display_info->double_click_distance = abs (g_value_get_int (&tmp_val));
-        g_value_unset (&tmp_val);
+        display_info->double_click_distance = abs (g_value_get_int (&tmp_val2));
+        g_value_unset (&tmp_val2);
     }
 
     screen_info->font_height = 0;



More information about the Xfce4-commits mailing list