summaryrefslogtreecommitdiffstats
path: root/main/gnome-system-monitor/005-replace-gdk_drawable.patch
blob: c70f2d2072cd686e61a9a0d551f211ef171e3e9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From ff00bed20c1740b619a487c76d2a7671dd435cc9 Mon Sep 17 00:00:00 2001
From: Chris Kühl <chrisk@openismus.com>
Date: Thu, 27 Jan 2011 01:08:37 +0000
Subject: Replaced use of gdk_drawable_get_size with gdk_window_get_[width|height]

---
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
--
cgit v0.9