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-view.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-view.c')
-rw-r--r-- | pluma/pluma-view.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c index fd689e45..d17b6a01 100644 --- a/pluma/pluma-view.c +++ b/pluma/pluma-view.c @@ -917,11 +917,7 @@ send_focus_change (GtkWidget *widget, g_object_ref (widget); fevent->focus_change.type = GDK_FOCUS_CHANGE; -#if GTK_CHECK_VERSION (3, 0, 0) fevent->focus_change.window = g_object_ref (gtk_widget_get_window (widget)); -#else - fevent->focus_change.window = g_object_ref (widget->window); -#endif fevent->focus_change.in = in; gtk_widget_event (widget, fevent); @@ -988,11 +984,7 @@ update_search_window_position (PlumaView *view) { gint x, y; gint view_x, view_y; -#if GTK_CHECK_VERSION (3, 0, 0) GdkWindow *view_window = gtk_widget_get_window (GTK_WIDGET (view)); -#else - GdkWindow *view_window = GTK_WIDGET (view)->window; -#endif gtk_widget_realize (view->priv->search_window); @@ -1468,15 +1460,9 @@ ensure_search_window (PlumaView *view) GtkWindowGroup *search_group; toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view)); -#if GTK_CHECK_VERSION (3, 0, 0) group = gtk_window_get_group (GTK_WINDOW (toplevel)); if (view->priv->search_window != NULL) search_group = gtk_window_get_group (GTK_WINDOW (view->priv->search_window)); -#else - group = GTK_WINDOW (toplevel)->group; - if (view->priv->search_window != NULL) - search_group = GTK_WINDOW (view->priv->search_window)->group; -#endif if (view->priv->search_window != NULL) { @@ -1947,11 +1933,7 @@ pluma_view_drag_motion (GtkWidget *widget, if (drag_get_uri_target (widget, context) != GDK_NONE) { gdk_drag_status (context, -#if GTK_CHECK_VERSION (3, 0, 0) gdk_drag_context_get_suggested_action (context), -#else - context->suggested_action, -#endif timestamp); result = TRUE; } @@ -2155,11 +2137,7 @@ delete_line (GtkTextView *text_view, buffer = gtk_text_view_get_buffer (text_view); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_text_view_reset_im_context (text_view); -#else - reset_im_context (text_view); -#endif /* If there is a selection delete the selected lines and * ignore count */ |