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-status-combo-box.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-status-combo-box.c')
-rw-r--r-- | pluma/pluma-status-combo-box.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/pluma/pluma-status-combo-box.c b/pluma/pluma-status-combo-box.c index ed0f4917..e800c406 100644 --- a/pluma/pluma-status-combo-box.c +++ b/pluma/pluma-status-combo-box.c @@ -180,13 +180,8 @@ menu_position_func (GtkMenu *menu, gtk_widget_size_request (gtk_widget_get_toplevel (GTK_WIDGET (menu)), &request); /* get the origin... */ -#if GTK_CHECK_VERSION (3, 0, 0) gdk_window_get_origin (gtk_widget_get_window (GTK_WIDGET (combo)), x, y); gtk_widget_get_allocation (GTK_WIDGET (combo), &allocation); -#else - gdk_window_get_origin (GTK_WIDGET (combo)->window, x, y); - allocation = GTK_WIDGET (combo)->allocation; -#endif /* make the menu as wide as the widget */ if (request.width < allocation.width) @@ -208,11 +203,7 @@ button_press_event (GtkWidget *widget, gint max_height; gtk_widget_size_request (combo->priv->menu, &request); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_get_allocation (GTK_WIDGET (combo), &allocation); -#else - allocation = GTK_WIDGET (combo)->allocation; -#endif /* do something relative to our own height here, maybe we can do better */ max_height = allocation.height * 20; |