[gnome-system-monitor/gtk3] Replaced use of gdk_drawable_get_size with gdk_window_get_[width|height]



commit 2e454d20cf53acc5dc1c9f0d008040addac2ef73
Author: Chris Kühl <chrisk openismus com>
Date:   Thu Jan 27 02:08:37 2011 +0100

    Replaced use of gdk_drawable_get_size with gdk_window_get_[width|height]

 src/gsm_color_button.c |    3 ++-
 src/procman.cpp        |   12 ++++--------
 2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/gsm_color_button.c b/src/gsm_color_button.c
index 01f162e..ef7b3de 100644
--- a/src/gsm_color_button.c
+++ b/src/gsm_color_button.c
@@ -287,7 +287,8 @@ render (GtkWidget * widget)
       color->green = color->green + highlight_factor;
   }
   gdk_cairo_set_source_color (cr, color);
-  gdk_drawable_get_size (gtk_widget_get_window (widget), &width, &height);
+  width  = gdk_window_get_width (gtk_widget_get_window (widget));
+  height = gdk_window_get_height(gtk_widget_get_window (widget));
 
   switch (color_button->priv->type)
     {
diff --git a/src/procman.cpp b/src/procman.cpp
index b5c0d0a..1288858 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -554,19 +554,15 @@ procman_save_config (ProcData *data)
 		
 	procman_save_tree_state (data->client, data->tree, "/apps/procman/proctree");
 	procman_save_tree_state (data->client, data->disk_list, "/apps/procman/disktreenew");
-		
-	gdk_drawable_get_size (gtk_widget_get_window (data->app), &width, &height);
-	data->config.width = width;
-	data->config.height = height;
-	
+
+	data->config.width  = gdk_window_get_width (gtk_widget_get_window (data->app));
+	data->config.height = gdk_window_get_height(gtk_widget_get_window (data->app));
+
 	gconf_client_set_int (client, "/apps/procman/width", data->config.width, NULL);
 	gconf_client_set_int (client, "/apps/procman/height", data->config.height, NULL);	
 	gconf_client_set_int (client, "/apps/procman/current_tab", data->config.current_tab, NULL);
 
 	gconf_client_suggest_sync (client, NULL);
-	
-
-	
 }
 
 static guint32



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