diff options
author | infirit <[email protected]> | 2014-05-19 17:22:45 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-05-19 20:57:49 +0200 |
commit | 3fc6d6c429837cdd4ef2d17c2b9f20859187fa93 (patch) | |
tree | a94bddbe2b38d7a84517cf44235fb99e53be98fa /pluma/pluma-utils.c | |
parent | 36a55c5f8e4a3820a3599c29ff9d7f55e92d6570 (diff) | |
download | pluma-3fc6d6c429837cdd4ef2d17c2b9f20859187fa93.tar.bz2 pluma-3fc6d6c429837cdd4ef2d17c2b9f20859187fa93.tar.xz |
Cleanup GTK_CHECK_VERSION and unify gtk+2/3 code where possible
Replace functions available in gtk+2 and gtk+3
gdk_window_get_* | since 2.24
gtk_widget_get_allocation | since 2.18
gtk_widget_get_window | since 2.14
gtk_window_get_group | since 2.10
gtk_widget_get_mapped | since 2.20
gtk_widget_get_realized | since 2.20
gdk_window_get_display | since 2.24
Remove deprecated GtkNotebookPage and check.
Diffstat (limited to 'pluma/pluma-utils.c')
-rw-r--r-- | pluma/pluma-utils.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/pluma/pluma-utils.c b/pluma/pluma-utils.c index f6a9dbb3..8e92d5fe 100644 --- a/pluma/pluma-utils.c +++ b/pluma/pluma-utils.c @@ -132,11 +132,7 @@ pluma_utils_menu_position_under_widget (GtkMenu *menu, gtk_widget_size_request (GTK_WIDGET (menu), &requisition); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_get_allocation (widget, &allocation); -#else - allocation = widget->allocation; -#endif if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) { @@ -907,18 +903,10 @@ pluma_utils_get_window_workspace (GtkWindow *gtkwindow) guint ret = PLUMA_ALL_WORKSPACES; g_return_val_if_fail (GTK_IS_WINDOW (gtkwindow), 0); -#if GTK_CHECK_VERSION (3, 0, 0) g_return_val_if_fail (gtk_widget_get_realized (GTK_WIDGET (gtkwindow)), 0); -#else - g_return_val_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (gtkwindow)), 0); -#endif window = gtk_widget_get_window (GTK_WIDGET (gtkwindow)); -#if GTK_CHECK_VERSION (3, 0, 0) display = gdk_window_get_display (window); -#else - display = gdk_drawable_get_display (window); -#endif gdk_error_trap_push (); result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window), |