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



commit 0541ffb3bdee9ec03fe22435a728eb86272bd0d1
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        |   13 ++++---------
 2 files changed, 6 insertions(+), 10 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..c9a5ac5 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -548,25 +548,20 @@ void
 procman_save_config (ProcData *data)
 {
 	GConfClient *client = data->client;
-	gint width, height;
 
 	g_assert(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]