diff --git a/src/gnome-utils/dialog-account.c b/src/gnome-utils/dialog-account.c index 4d9c86cbd5..abd9310187 100644 --- a/src/gnome-utils/dialog-account.c +++ b/src/gnome-utils/dialog-account.c @@ -668,7 +668,6 @@ verify_children_compatible (AccountWindow *aw) gtk_label_set_selectable (GTK_LABEL (label), TRUE); gnc_label_set_alignment (label, 0.0, 0.0); { -#if GTK_CHECK_VERSION(3,16,0) GtkCssProvider *provider = gtk_css_provider_new(); const gchar *label_css = { "label {\n" @@ -681,21 +680,6 @@ verify_children_compatible (AccountWindow *aw) GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_object_unref (provider); -#else - gint size; - PangoFontDescription *font_desc; - GtkStyleContext *style; - - style = gtk_widget_get_style_context(label); - gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL, GTK_STYLE_PROPERTY_FONT, &font_desc, NULL); - - size = pango_font_description_get_size (font_desc); - font_desc = pango_font_description_new (); - pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD); - pango_font_description_set_size (font_desc, size * PANGO_SCALE_LARGE); - gtk_widget_override_font(label, font_desc); - pango_font_description_free (font_desc); -#endif } gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); diff --git a/src/gnome-utils/gnc-cell-renderer-popup-entry.c b/src/gnome-utils/gnc-cell-renderer-popup-entry.c index c704176bee..e1e0da57fd 100644 --- a/src/gnome-utils/gnc-cell-renderer-popup-entry.c +++ b/src/gnome-utils/gnc-cell-renderer-popup-entry.c @@ -108,11 +108,7 @@ gnc_popup_entry_init (GncPopupEntry *widget) widget->button = gtk_button_new (); gtk_widget_show (widget->button); -#if GTK_CHECK_VERSION(3,14,0) arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON); -#else - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT); -#endif gtk_widget_show (arrow); gtk_container_add (GTK_CONTAINER (widget->button), arrow); @@ -302,12 +298,9 @@ gnc_popup_get_button_width (void) gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (window), button); -#if GTK_CHECK_VERSION(3,14,0) arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON); -#else - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT); -#endif gtk_widget_show (arrow); + gtk_container_add (GTK_CONTAINER (button), arrow); gtk_window_move (GTK_WINDOW (window), -500, -500); diff --git a/src/gnome-utils/gnc-combott.c b/src/gnome-utils/gnc-combott.c index 33b6f18017..d10c080f7c 100644 --- a/src/gnome-utils/gnc-combott.c +++ b/src/gnome-utils/gnc-combott.c @@ -227,11 +227,8 @@ gctt_init (GncCombott *combott) hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_set_homogeneous (GTK_BOX(hbox), FALSE); -#if GTK_CHECK_VERSION(3,14,0) arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON); -#else - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT); -#endif + #if GTK_CHECK_VERSION(3,12,0) gtk_widget_set_margin_start (GTK_WIDGET(arrow), 5); #else diff --git a/src/gnome-utils/gnc-date-edit.c b/src/gnome-utils/gnc-date-edit.c index dfe32e0564..47f3a22c28 100644 --- a/src/gnome-utils/gnc-date-edit.c +++ b/src/gnome-utils/gnc-date-edit.c @@ -928,11 +928,8 @@ create_children (GNCDateEdit *gde) gtk_widget_show (GTK_WIDGET(gde->cal_label)); /* Graphic for the popup button. */ -#if GTK_CHECK_VERSION(3,14,0) arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON); -#else - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); -#endif + gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, FALSE, 0); gtk_widget_show (GTK_WIDGET(arrow)); diff --git a/src/gnome-utils/gnc-dense-cal.c b/src/gnome-utils/gnc-dense-cal.c index 1415af171c..07f86f1a4b 100644 --- a/src/gnome-utils/gnc-dense-cal.c +++ b/src/gnome-utils/gnc-dense-cal.c @@ -378,7 +378,6 @@ gnc_dense_cal_init(GncDenseCal *dcal) GTK_STYLE_PROPERTY_FONT, &font_desc, NULL); font_size = pango_font_description_get_size(font_desc); -#if GTK_CHECK_VERSION(3,16,0) provider = gtk_css_provider_new(); dpi = gdk_screen_get_resolution (gdk_screen_get_default ()); px_size = ((font_size / PANGO_SCALE) - font_size_reduction_units) * (dpi / 72.); @@ -391,11 +390,7 @@ gnc_dense_cal_init(GncDenseCal *dcal) g_object_unref (provider); g_free (px_str); g_free (widget_css); -#else - font_size -= font_size_reduction_units * PANGO_SCALE; - pango_font_description_set_size(font_desc, font_size); - gtk_widget_override_font(GTK_WIDGET(dcal), font_desc); -#endif + pango_font_description_free (font_desc); maxWidth = maxHeight = 0; diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c index ce7d5f7f62..fbde441130 100644 --- a/src/gnome-utils/gnc-main-window.c +++ b/src/gnome-utils/gnc-main-window.c @@ -2301,11 +2301,10 @@ main_window_update_page_color (GncPluginPage *page, if (want_color && gdk_rgba_parse(&tab_color, color_string) && priv->show_color_tabs) { -#if GTK_CHECK_VERSION(3,16,0) GtkCssProvider *provider = gtk_css_provider_new(); GtkStyleContext *stylectxt; gchar *col_str, *widget_css; -#endif + if (!GTK_IS_EVENT_BOX (tab_widget)) { GtkWidget *event_box = gtk_event_box_new (); @@ -2316,7 +2315,7 @@ main_window_update_page_color (GncPluginPage *page, g_object_unref (tab_widget); tab_widget = event_box; } -#if GTK_CHECK_VERSION(3,16,0) + stylectxt = gtk_widget_get_style_context (GTK_WIDGET (tab_widget)); col_str = gdk_rgba_to_string (&tab_color); widget_css = g_strconcat ("*{\n background-color:", col_str, ";\n}\n", NULL); @@ -2327,10 +2326,6 @@ main_window_update_page_color (GncPluginPage *page, g_object_unref (provider); g_free (col_str); g_free (widget_css); -#else - gtk_widget_override_background_color (tab_widget, GTK_STATE_NORMAL, &tab_color); - gtk_widget_override_background_color (tab_widget, GTK_STATE_ACTIVE, &tab_color); -#endif } else { diff --git a/src/gnome-utils/gnc-tree-view-split-reg.c b/src/gnome-utils/gnc-tree-view-split-reg.c index 2dfc06ec68..32e42c3e51 100644 --- a/src/gnome-utils/gnc-tree-view-split-reg.c +++ b/src/gnome-utils/gnc-tree-view-split-reg.c @@ -5799,7 +5799,6 @@ gtv_sr_editable_start_editing_cb (GtkCellRenderer *cr, GtkCellEditable *editable { if (entry != NULL) { -#if GTK_CHECK_VERSION(3,16,0) GtkStyleContext *stylectxt = gtk_widget_get_style_context (GTK_WIDGET (entry)); GtkCssProvider *provider = gtk_css_provider_new(); gchar *col_str = gdk_rgba_to_string (&color); @@ -5811,9 +5810,6 @@ gtv_sr_editable_start_editing_cb (GtkCellRenderer *cr, GtkCellEditable *editable g_object_unref (provider); g_free (col_str); g_free (widget_css); -#else - gtk_widget_override_background_color (GTK_WIDGET (entry), GTK_STATE_FLAG_NORMAL, &color); -#endif } } } diff --git a/src/gnome/assistant-hierarchy.c b/src/gnome/assistant-hierarchy.c index f9b61551e0..b0625f2111 100644 --- a/src/gnome/assistant-hierarchy.c +++ b/src/gnome/assistant-hierarchy.c @@ -1197,14 +1197,10 @@ assistant_insert_book_options_page (hierarchy_data *data) options = gnc_options_dialog_notebook (data->optionwin); parent = gtk_widget_get_parent (options); -#if GTK_CHECK_VERSION(3, 14, 0) g_object_ref (options); gtk_container_remove (GTK_CONTAINER(parent), options); gtk_container_add (GTK_CONTAINER(vbox), options); g_object_unref (options); -#else - gtk_widget_reparent (options, vbox); -#endif gtk_widget_show_all (vbox); gtk_assistant_insert_page (GTK_ASSISTANT(data->dialog), vbox, 1); diff --git a/src/import-export/import-main-matcher.c b/src/import-export/import-main-matcher.c index d0cbb70f82..5c4ed61efa 100644 --- a/src/import-export/import-main-matcher.c +++ b/src/import-export/import-main-matcher.c @@ -203,7 +203,6 @@ on_matcher_help_close_clicked (GtkButton *button, gpointer user_data) gtk_widget_destroy(help_dialog); } -#if GTK_CHECK_VERSION(3,16,0) static void gnc_override_background_color (GtkWidget *widget, GdkRGBA *rgba) @@ -220,8 +219,6 @@ gnc_override_background_color (GtkWidget *widget, g_free (col_str); g_free (widget_css); } -#endif - void on_matcher_help_clicked (GtkButton *button, gpointer user_data) @@ -238,28 +235,13 @@ on_matcher_help_clicked (GtkButton *button, gpointer user_data) gnc_builder_add_from_file (builder, "dialog-import.glade", "matcher_help_dialog"); box = GTK_WIDGET(gtk_builder_get_object (builder, "red")); -#if GTK_CHECK_VERSION(3,16,0) gnc_override_background_color (box, &info->color_back_red); -#else - gtk_widget_override_background_color(box, GTK_STATE_FLAG_NORMAL, - &info->color_back_red); -#endif box = GTK_WIDGET(gtk_builder_get_object (builder, "yellow")); -#if GTK_CHECK_VERSION(3,16,0) gnc_override_background_color (box, &info->color_back_yellow); -#else - gtk_widget_override_background_color(box, GTK_STATE_FLAG_NORMAL, - &info->color_back_yellow); -#endif box = GTK_WIDGET(gtk_builder_get_object (builder, "green")); -#if GTK_CHECK_VERSION(3,16,0) gnc_override_background_color (box, &info->color_back_green); -#else - gtk_widget_override_background_color(box, GTK_STATE_FLAG_NORMAL, - &info->color_back_green); -#endif help_dialog = GTK_WIDGET(gtk_builder_get_object (builder, "matcher_help_dialog")); gtk_window_set_transient_for(GTK_WINDOW(help_dialog), diff --git a/src/register/register-gnome/gnucash-header.c b/src/register/register-gnome/gnucash-header.c index e04eb7e82e..06b9fcaf79 100644 --- a/src/register/register-gnome/gnucash-header.c +++ b/src/register/register-gnome/gnucash-header.c @@ -585,11 +585,7 @@ gnc_header_init (GncHeader *header) header->cursor_name = NULL; header->in_resize = FALSE; header->resize_col = -1; -#if GTK_CHECK_VERSION(3,16,0) header->resize_cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_SB_H_DOUBLE_ARROW); -#else - header->resize_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW); -#endif header->normal_cursor = NULL; header->height = 20; header->width = 400; diff --git a/src/register/register-gnome/gnucash-item-edit.c b/src/register/register-gnome/gnucash-item-edit.c index f9e87ab7d9..dc0e88de4c 100644 --- a/src/register/register-gnome/gnucash-item-edit.c +++ b/src/register/register-gnome/gnucash-item-edit.c @@ -527,11 +527,7 @@ gnc_item_edit_new (GnucashSheet *sheet) /* Create the popup button It will only be displayed when the cell being edited provides a popup item (like a calendar or account list) */ -#if GTK_CHECK_VERSION(3,14,0) item_edit->popup_toggle.arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON); -#else - item_edit->popup_toggle.arrow = GTK_WIDGET(gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_IN)); -#endif item_edit->popup_toggle.tbutton = gtk_toggle_button_new(); gtk_toggle_button_set_mode ( @@ -645,11 +641,7 @@ gnc_item_edit_show_popup (GncItemEdit *item_edit) unblock_toggle_signals (item_edit); } -#if GTK_CHECK_VERSION(3,14,0) item_edit->popup_toggle.arrow = gtk_image_new_from_icon_name ("go-up", GTK_ICON_SIZE_BUTTON); -#else - gtk_arrow_set (GTK_ARROW(item_edit->popup_toggle.arrow), GTK_ARROW_UP, GTK_SHADOW_OUT); -#endif if (item_edit->popup_set_focus) item_edit->popup_set_focus (item_edit->popup_item, @@ -691,11 +683,8 @@ gnc_item_edit_hide_popup (GncItemEdit *item_edit) return; gtk_container_remove (GTK_CONTAINER(item_edit->sheet), item_edit->popup_item); -#if GTK_CHECK_VERSION(3,14,0) + item_edit->popup_toggle.arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON); -#else - gtk_arrow_set (GTK_ARROW(item_edit->popup_toggle.arrow), GTK_ARROW_DOWN, GTK_SHADOW_IN); -#endif gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item_edit->popup_toggle.tbutton), FALSE); diff --git a/src/register/register-gnome/gnucash-sheet.c b/src/register/register-gnome/gnucash-sheet.c index 360a7e2482..4b4152ba44 100644 --- a/src/register/register-gnome/gnucash-sheet.c +++ b/src/register/register-gnome/gnucash-sheet.c @@ -597,10 +597,6 @@ gnucash_sheet_update_adjustments (GnucashSheet *sheet) gtk_adjustment_get_page_size (vadj) / sheet->num_visible_blocks); else gtk_adjustment_set_step_increment (vadj, 0); - -#if !GTK_CHECK_VERSION(3,18,0) - gtk_adjustment_changed(vadj); -#endif }