diff options
author | infirit <[email protected]> | 2014-12-17 12:58:50 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-17 12:58:50 +0100 |
commit | 5dbc8cd3144d70a2b818704d4274ce7289514622 (patch) | |
tree | 4d4b723c94433fe746b82420cddfda7c70789635 | |
parent | 5cd04b66774752f6763fcfe41785645d1fa5260d (diff) | |
download | mate-system-monitor-5dbc8cd3144d70a2b818704d4274ce7289514622.tar.bz2 mate-system-monitor-5dbc8cd3144d70a2b818704d4274ce7289514622.tar.xz |
Use gdk_window_get_{width,height} also in Gtk+2
It was added in Gtk+ 2.24
-rw-r--r-- | src/gsm_color_button.c | 10 | ||||
-rw-r--r-- | src/procman.cpp | 13 |
2 files changed, 4 insertions, 19 deletions
diff --git a/src/gsm_color_button.c b/src/gsm_color_button.c index 34826f6..9a3cab2 100644 --- a/src/gsm_color_button.c +++ b/src/gsm_color_button.c @@ -297,14 +297,8 @@ render (GtkWidget * widget) color->green = color->green + highlight_factor; } gdk_cairo_set_source_color (cr, color); - - #if GTK_CHECK_VERSION(3, 0, 0) - width = gdk_window_get_width(gtk_widget_get_window(widget)); - height = gdk_window_get_height(gtk_widget_get_window(widget)); - #else - gdk_drawable_get_size(gtk_widget_get_window(widget), &width, &height); - #endif - + 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 573c49e..5860701 100644 --- a/src/procman.cpp +++ b/src/procman.cpp @@ -544,17 +544,8 @@ procman_save_config (ProcData *data) procman_save_tree_state (data->settings, data->tree, "proctree"); procman_save_tree_state (data->settings, data->disk_list, "disktreenew"); - #if GTK_CHECK_VERSION(3, 0, 0) - 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)); - #else - gint width, height; - - gdk_drawable_get_size(gtk_widget_get_window(data->app), &width, &height); - - data->config.width = width; - data->config.height = height; - #endif + 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)); g_settings_set_int (settings, "width", data->config.width); g_settings_set_int (settings, "height", data->config.height); |