Permalink
Browse files

[general] Don't use deprecated gdk_drawable_get_size at all

Since we now require GTK 2.24, we can directly use
gdk_window_get_width(), gdk_window_get_height()
  • Loading branch information...
1 parent 5582806 commit 7b384b35d0226eed7711f2d1fa0ca04381380d23 @jasminhassan jasminhassan committed Dec 22, 2012
Showing with 0 additions and 17 deletions.
  1. +0 −13 eel/eel-art-gtk-extensions.c
  2. +0 −4 libcaja-private/caja-tree-view-drag-dest.c
@@ -90,13 +90,8 @@ eel_gdk_window_get_bounds (GdkWindow *gdk_window)
gdk_window_get_position (gdk_window, &bounds.x0, &bounds.y0);
-#if GTK_CHECK_VERSION(3, 0, 0)
width = gdk_window_get_width(gdk_window);
height = gdk_window_get_height(gdk_window);
-#else
- gdk_drawable_get_size (gdk_window, &width, &height);
-#endif
-
bounds.x1 = bounds.x0 + width;
bounds.y1 = bounds.y0 + height;
@@ -128,12 +123,8 @@ eel_gdk_window_get_screen_relative_bounds (GdkWindow *gdk_window)
return eel_irect_empty;
}
-#if GTK_CHECK_VERSION(3, 0, 0)
width = gdk_window_get_width(gdk_window);
height = gdk_window_get_height(gdk_window);
-#else
- gdk_drawable_get_size(gdk_window, &width, &height);
-#endif
screen_bounds.x1 = screen_bounds.x0 + width;
screen_bounds.y1 = screen_bounds.y0 + height;
@@ -321,12 +312,8 @@ eel_gdk_window_get_dimensions (GdkWindow *gdk_window)
g_return_val_if_fail (gdk_window != NULL, eel_dimensions_empty);
-#if GTK_CHECK_VERSION(3, 0, 0)
dimensions.width = gdk_window_get_width(gdk_window);
dimensions.height = gdk_window_get_height(gdk_window);
-#else
- gdk_drawable_get_size (gdk_window, &dimensions.width, &dimensions.height);
-#endif
return dimensions;
}
@@ -203,12 +203,8 @@ highlight_expose (GtkWidget *widget,
/* FIXMEchpe: is bin window right here??? */
bin_window = gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget));
-#if GTK_CHECK_VERSION(3, 0, 0)
width = gdk_window_get_width(bin_window);
height = gdk_window_get_height(bin_window);
-#else
- gdk_drawable_get_size(bin_window, &width, &height);
-#endif
gtk_paint_focus (gtk_widget_get_style (widget),
#if GTK_CHECK_VERSION(3,0,0)

0 comments on commit 7b384b3

Please sign in to comment.