diff --git a/pluma/pluma-app.c b/pluma/pluma-app.c index 48eb1dc..248656b 100644 --- a/pluma/pluma-app.c +++ b/pluma/pluma-app.c @@ -679,12 +679,8 @@ is_in_viewport (PlumaWindow *window, gdkwindow = gtk_widget_get_window (GTK_WIDGET (window)); gdk_window_get_position (gdkwindow, &x, &y); - #if GTK_CHECK_VERSION(3, 0, 0) width = gdk_window_get_width(gdkwindow); height = gdk_window_get_height(gdkwindow); - #else - gdk_drawable_get_size(gdkwindow, &width, &height); - #endif pluma_utils_get_current_viewport (screen, &vp_x, &vp_y); x += vp_x; diff --git a/pluma/pluma-documents-panel.c b/pluma/pluma-documents-panel.c index ea2739e..66d3405 100644 --- a/pluma/pluma-documents-panel.c +++ b/pluma/pluma-documents-panel.c @@ -522,11 +522,7 @@ menu_position (GtkMenu *menu, w = panel->priv->treeview; -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_get_allocation(w, &allocation); -#else - allocation = w->allocation; -#endif path = get_current_path (panel); @@ -538,11 +534,7 @@ menu_position (GtkMenu *menu, wx = rect.x; wy = rect.y; -#if GTK_CHECK_VERSION (3, 0, 0) gdk_window_get_origin (gtk_widget_get_window (w), x, y); -#else - gdk_window_get_origin (w->window, x, y); -#endif gtk_widget_size_request (GTK_WIDGET (menu), &requisition); diff --git a/pluma/pluma-encodings-combo-box.c b/pluma/pluma-encodings-combo-box.c index cb056d0..2f35542 100644 --- a/pluma/pluma-encodings-combo-box.c +++ b/pluma/pluma-encodings-combo-box.c @@ -208,11 +208,7 @@ add_or_remove (PlumaEncodingsComboBox *menu, gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (toplevel)); -#if GTK_CHECK_VERSION (3, 0, 0) wg = gtk_window_get_group (GTK_WINDOW (toplevel)); -#else - wg = GTK_WINDOW (toplevel)->group; -#endif if (wg == NULL) { wg = gtk_window_group_new (); diff --git a/pluma/pluma-notebook.c b/pluma/pluma-notebook.c index 01164c4..ea9ac6b 100644 --- a/pluma/pluma-notebook.c +++ b/pluma/pluma-notebook.c @@ -259,28 +259,16 @@ find_tab_num_at_pos (PlumaNotebook *notebook, tab = gtk_notebook_get_tab_label (nb, page); g_return_val_if_fail (tab != NULL, AFTER_ALL_TABS); -#if GTK_CHECK_VERSION (3, 0, 0) if (!gtk_widget_get_mapped (tab)) -#else - if (!GTK_WIDGET_MAPPED (GTK_WIDGET (tab))) -#endif { ++page_num; continue; } -#if GTK_CHECK_VERSION (3, 0, 0) gdk_window_get_origin (GDK_WINDOW (gtk_widget_get_window (tab)), -#else - gdk_window_get_origin (GDK_WINDOW (tab->window), -#endif &x_root, &y_root); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_get_allocation(tab, &allocation); -#else - allocation = tab->allocation; -#endif max_x = x_root + allocation.x + allocation.width; max_y = y_root + allocation.y + allocation.height; diff --git a/pluma/pluma-panel.c b/pluma/pluma-panel.c index d8467a0..68438b8 100644 --- a/pluma/pluma-panel.c +++ b/pluma/pluma-panel.c @@ -368,11 +368,7 @@ sync_title (PlumaPanel *panel, static void notebook_page_changed (GtkNotebook *notebook, -#if GTK_CHECK_VERSION (3, 0, 0) GtkWidget *page, -#else - GtkNotebookPage *page, -#endif guint page_num, PlumaPanel *panel) { diff --git a/pluma/pluma-status-combo-box.c b/pluma/pluma-status-combo-box.c index ed0f491..e800c40 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; diff --git a/pluma/pluma-utils.c b/pluma/pluma-utils.c index f6a9dbb..8e92d5f 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), diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c index fd689e4..d17b6a0 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 */ diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c index 1d47d28..780879b 100644 --- a/pluma/pluma-window.c +++ b/pluma/pluma-window.c @@ -2419,11 +2419,7 @@ language_changed (GObject *object, static void notebook_switch_page (GtkNotebook *book, -#if GTK_CHECK_VERSION (3, 0, 0) GtkWidget *pg, -#else - GtkNotebookPage *pg, -#endif gint page_num, PlumaWindow *window) { @@ -3582,11 +3578,7 @@ vpaned_restore_position (GtkWidget *widget, GtkAllocation allocation; gint pos; -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_get_allocation (widget, &allocation); -#else - allocation = widget->allocation; -#endif pluma_debug_message (DEBUG_WINDOW, "Restoring vpaned position: bottom panel size %d", diff --git a/pluma/smclient/eggsmclient-xsmp.c b/pluma/smclient/eggsmclient-xsmp.c index 688e20e..a957f50 100755 --- a/pluma/smclient/eggsmclient-xsmp.c +++ b/pluma/smclient/eggsmclient-xsmp.c @@ -367,11 +367,7 @@ sm_client_xsmp_startup (EggSMClient *client, free (ret_client_id); gdk_threads_enter (); -#if GTK_CHECK_VERSION (3, 0, 0) gdk_x11_set_sm_client_id (xsmp->client_id); -#else - gdk_set_sm_client_id (xsmp->client_id); -#endif gdk_threads_leave (); g_debug ("Got client ID \"%s\"", xsmp->client_id);