[Commits] [SCM] claws branch, master, updated. 3.16.0-36-g636cc1e

ticho at claws-mail.org ticho at claws-mail.org
Tue Feb 6 20:34:22 CET 2018


The branch, master has been updated
       via  636cc1edc08b4a15e2514143e6642908c339a00b (commit)
       via  14bf91b57e32fce0313c2e092f2a18adff96bfb1 (commit)
       via  51f73a8b49fff558474ab73c2324ce8cfa7fa93b (commit)
       via  59309a6501a767ea3b20954d781aae1cfb7d14a9 (commit)
       via  643edf05442da249656aabe85a41194c5cd62b89 (commit)
      from  c07e812545fac929c021a8f4dadd6a5b99f2501c (commit)

Summary of changes:
 configure.ac                              |    2 +-
 src/addressbook.c                         |   20 +++----
 src/addrgather.c                          |    2 +-
 src/alertpanel.c                          |    2 +-
 src/compose.c                             |   75 ------------------------
 src/crash.c                               |    6 +-
 src/editaddress.c                         |   26 +--------
 src/editaddress_other_attributes_ldap.c   |    2 +-
 src/editgroup.c                           |    4 +-
 src/folderview.c                          |    2 +-
 src/grouplistdialog.c                     |    2 +-
 src/gtk/combobox.c                        |   51 ----------------
 src/gtk/combobox.h                        |    6 --
 src/gtk/gtkcmclist.c                      |   25 +++-----
 src/gtk/gtkcmoptionmenu.c                 |    6 +-
 src/gtk/gtkshruler.c                      |   29 +---------
 src/gtk/gtkutils.c                        |   90 +++--------------------------
 src/gtk/gtkutils.h                        |   44 +-------------
 src/gtk/gtkvscrollbutton.c                |    4 +-
 src/gtk/inputdialog.c                     |    9 ---
 src/gtk/quicksearch.c                     |   14 -----
 src/headerview.c                          |   10 ++--
 src/image_viewer.c                        |    2 +-
 src/importldif.c                          |    4 +-
 src/mainwindow.c                          |    4 +-
 src/message_search.c                      |   30 ++--------
 src/mimeview.c                            |    4 +-
 src/plugins/acpi_notifier/acpi_notifier.c |    1 +
 src/plugins/bogofilter/bogofilter_gtk.c   |   16 -----
 src/plugins/fancy/fancy_viewer.c          |    2 -
 src/plugins/pgpcore/claws.def             |    1 -
 src/plugins/pgpcore/select-keys.c         |    2 +-
 src/plugins/rssyl/claws.def               |    1 -
 src/plugins/rssyl/rssyl_feed_props.c      |   22 -------
 src/plugins/vcalendar/vcal_meeting_gtk.c  |   16 -----
 src/prefs_display_header.c                |   12 ----
 src/prefs_filtering_action.c              |   24 --------
 src/prefs_matcher.c                       |    4 --
 src/prefs_msg_colors.c                    |    2 +-
 src/prefs_other.c                         |    4 --
 src/prefs_themes.c                        |    4 +-
 src/prefs_toolbar.c                       |   46 ---------------
 src/printing.c                            |    2 -
 src/summary_search.c                      |   71 ++---------------------
 src/summaryview.c                         |    4 +-
 src/toolbar.c                             |   16 ++---
 46 files changed, 83 insertions(+), 642 deletions(-)


- Log -----------------------------------------------------------------
commit 636cc1edc08b4a15e2514143e6642908c339a00b
Author: Ralph Sennhauser <ralph.sennhauser at gmail.com>
Date:   Wed Nov 8 20:12:32 2017 +0100

    Replace gtk_style_unref()
    
    gtk_style_unref() is a remnant from gtk+1 and the compatibility function
    in gtk+2 is gone in gtk+3, use g_object_unref() instead.
    
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser at gmail.com>

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index e94d063..7aa5167 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -863,7 +863,7 @@ void gtkut_set_widget_bgcolor_rgb(GtkWidget *widget, guint rgbvalue)
 	newstyle->bg[GTK_STATE_PRELIGHT] = gdk_color;
 	newstyle->bg[GTK_STATE_ACTIVE]   = gdk_color;
 	gtk_widget_set_style(widget, newstyle);
-	gtk_style_unref(newstyle);
+	g_object_unref(newstyle);
 }
   
 /*!
@@ -1254,7 +1254,7 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
 		style->fg[GTK_STATE_ACTIVE]   = uri_color[1];
 		style->fg[GTK_STATE_PRELIGHT] = uri_color[0];
 		gtk_widget_set_style(btn_label, style);
-		gtk_style_unref(style);
+		g_object_unref(style);
 #if !GTK_CHECK_VERSION(3, 0, 0)
 	} else
 		g_warning("color allocation failed");
diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c
index 10c94d9..76f73b9 100644
--- a/src/prefs_msg_colors.c
+++ b/src/prefs_msg_colors.c
@@ -666,7 +666,7 @@ static void set_button_bg_color(GtkWidget *widget, gint rgbvalue)
 	newstyle->bg[GTK_STATE_ACTIVE]   = color;
 
 	gtk_widget_set_style(GTK_WIDGET(widget), newstyle);
-	gtk_style_unref(newstyle);
+	g_object_unref(newstyle);
 }
 
 static void prefs_msg_colors_save(PrefsPage *_page)

commit 14bf91b57e32fce0313c2e092f2a18adff96bfb1
Author: Ralph Sennhauser <ralph.sennhauser at gmail.com>
Date:   Wed Nov 8 20:12:31 2017 +0100

    Add missing header to acpi_notifier
    
    When building against gtk+3 the compiler complains about implicit
    function declaration, so include the required header for using the
    gtk_cmoption_menu.
    
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser at gmail.com>

diff --git a/src/plugins/acpi_notifier/acpi_notifier.c b/src/plugins/acpi_notifier/acpi_notifier.c
index 8de12ba..c25a3df 100644
--- a/src/plugins/acpi_notifier/acpi_notifier.c
+++ b/src/plugins/acpi_notifier/acpi_notifier.c
@@ -46,6 +46,7 @@
 #include "alertpanel.h"
 #include "utils.h"
 #include "folder_item_prefs.h"
+#include "gtkcmoptionmenu.h"
 
 #define PREFS_BLOCK_NAME "AcpiNotifier"
 #define PLUGIN_NAME _("Acpi Notifier")

commit 51f73a8b49fff558474ab73c2324ce8cfa7fa93b
Author: Ralph Sennhauser <ralph.sennhauser at gmail.com>
Date:   Wed Nov 8 20:12:29 2017 +0100

    Drop no longer used gtk+2 utility functions
    
    With requiring gtk+2 >=2.24 the following functions are obsolete:
      gtkut_widget_set_mapped
      gtkut_widget_set_realized
      gtkut_widget_set_can_default
      gtkut_widget_set_receives_default
      gtkut_widget_set_can_focus
      gtkut_widget_set_has_window
    
    Replace all occurrences with the underlying function.
    
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser at gmail.com>

diff --git a/src/addressbook.c b/src/addressbook.c
index a1544d9..c074cb9 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -1009,7 +1009,7 @@ static void addressbook_create(void)
 
 	/* Address index */
 	ctree = gtk_sctree_new_with_titles(N_INDEX_COLS, 0, index_titles);
-	gtkut_widget_set_can_focus(GTK_CMCLIST(ctree)->column[0].button, FALSE);
+	gtk_widget_set_can_focus(GTK_CMCLIST(ctree)->column[0].button, FALSE);
 
 	gtk_container_add(GTK_CONTAINER(ctree_swin), ctree);
 	gtk_cmclist_set_selection_mode(GTK_CMCLIST(ctree), GTK_SELECTION_BROWSE);
@@ -1087,7 +1087,7 @@ static void addressbook_create(void)
 		G_CALLBACK(addressbook_address_list_focus_evt_out), NULL);
 
 	for (i = 0; i < N_LIST_COLS; i++)
-		gtkut_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button,
+		gtk_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button,
 					 FALSE);
 
 	g_signal_connect(G_OBJECT(clist), "tree_select_row",
@@ -1158,18 +1158,18 @@ static void addressbook_create(void)
 	gtkut_stock_button_add_help(hbbox, &help_btn);
 
 	edit_btn = gtk_button_new_from_stock(GTK_STOCK_EDIT);
-	gtkut_widget_set_can_default(edit_btn, TRUE);
+	gtk_widget_set_can_default(edit_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), edit_btn, TRUE, TRUE, 0);
 	del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
-	gtkut_widget_set_can_default(del_btn, TRUE);
+	gtk_widget_set_can_default(del_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), del_btn, TRUE, TRUE, 0);
 	reg_btn = gtk_button_new_from_stock(GTK_STOCK_NEW);
-	gtkut_widget_set_can_default(reg_btn, TRUE);
+	gtk_widget_set_can_default(reg_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), reg_btn, TRUE, TRUE, 0);
 
 
 	lup_btn = gtk_button_new_from_stock(GTK_STOCK_FIND);
-	gtkut_widget_set_can_default(lup_btn, TRUE);
+	gtk_widget_set_can_default(lup_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbox), lup_btn, TRUE, TRUE, 0);
 
 	g_signal_connect(G_OBJECT(help_btn), "clicked",
@@ -1187,19 +1187,19 @@ static void addressbook_create(void)
 
 	to_btn = gtk_button_new_with_label
 		(prefs_common_translated_header_name("To:"));
-	gtkut_widget_set_can_default(to_btn, TRUE);
+	gtk_widget_set_can_default(to_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), to_btn, TRUE, TRUE, 0);
 	cc_btn = gtk_button_new_with_label
 		(prefs_common_translated_header_name("Cc:"));
-	gtkut_widget_set_can_default(cc_btn, TRUE);
+	gtk_widget_set_can_default(cc_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), cc_btn, TRUE, TRUE, 0);
 	bcc_btn = gtk_button_new_with_label
 		(prefs_common_translated_header_name("Bcc:"));
-	gtkut_widget_set_can_default(bcc_btn, TRUE);
+	gtk_widget_set_can_default(bcc_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), bcc_btn, TRUE, TRUE, 0);
 
 	close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
-	gtkut_widget_set_can_default(close_btn, TRUE);
+	gtk_widget_set_can_default(close_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), close_btn, TRUE, TRUE, 0);
 
 	g_signal_connect(G_OBJECT(to_btn), "clicked",
diff --git a/src/addrgather.c b/src/addrgather.c
index 907c3c7..abacec1 100644
--- a/src/addrgather.c
+++ b/src/addrgather.c
@@ -475,7 +475,7 @@ static void addrgather_page_finish( gint pageNum, gchar *pageLbl ) {
 			GTK_CMCLIST(clistCount), FIELD_COL_COUNT, FIELDS_COL_WIDTH_COUNT );
 
 	for( i = 0; i < FIELDS_N_COLS; i++ )
-		gtkut_widget_set_can_focus(GTK_CMCLIST(clistCount)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(clistCount)->column[i].button, FALSE);
 
 	addrgather_dlg.clistCount = clistCount;
 }
diff --git a/src/alertpanel.c b/src/alertpanel.c
index 1b950ab..624b8a5 100644
--- a/src/alertpanel.c
+++ b/src/alertpanel.c
@@ -327,7 +327,7 @@ static void alertpanel_create(const gchar *title,
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
 	gtk_label_set_selectable(GTK_LABEL(label), TRUE);
 	gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
-	gtkut_widget_set_can_focus(label, FALSE);
+	gtk_widget_set_can_focus(label, FALSE);
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
 	gtk_widget_show(label);
 		
diff --git a/src/crash.c b/src/crash.c
index 8df5d9f..fcb5e40 100644
--- a/src/crash.c
+++ b/src/crash.c
@@ -251,17 +251,17 @@ static GtkWidget *crash_dialog_show(const gchar *text, const gchar *debug_output
 	button3 = gtk_button_new_with_label(_("Close"));
 	gtk_widget_show(button3);
 	gtk_container_add(GTK_CONTAINER(hbuttonbox4), button3);
-	gtkut_widget_set_can_default(button3, TRUE);
+	gtk_widget_set_can_default(button3, TRUE);
 
 	button4 = gtk_button_new_with_label(_("Save..."));
 	gtk_widget_show(button4);
 	gtk_container_add(GTK_CONTAINER(hbuttonbox4), button4);
-	gtkut_widget_set_can_default(button4, TRUE);
+	gtk_widget_set_can_default(button4, TRUE);
 
 	button5 = gtk_button_new_with_label(_("Create bug report"));
 	gtk_widget_show(button5);
 	gtk_container_add(GTK_CONTAINER(hbuttonbox4), button5);
-	gtkut_widget_set_can_default(button5, TRUE);
+	gtk_widget_set_can_default(button5, TRUE);
 	
 	g_signal_connect(G_OBJECT(window1), "delete_event",
 			 G_CALLBACK(gtk_main_quit), NULL);
diff --git a/src/editaddress.c b/src/editaddress.c
index e6d9af2..18fc041 100644
--- a/src/editaddress.c
+++ b/src/editaddress.c
@@ -1088,7 +1088,7 @@ static void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
 	gtk_cmclist_set_column_width( GTK_CMCLIST(clist), EMAIL_COL_ALIAS, EMAIL_COL_WIDTH_ALIAS );
 
 	for( i = 0; i < EMAIL_N_COLS; i++ )
-		gtkut_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button, FALSE);
 
 	/* Data entry area */
 	table = gtk_table_new( 4, 2, FALSE);
@@ -1298,7 +1298,7 @@ static void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl )
 	gtk_cmclist_set_column_width( GTK_CMCLIST(clist), ATTRIB_COL_VALUE, ATTRIB_COL_WIDTH_VALUE );
 
 	for( i = 0; i < ATTRIB_N_COLS; i++ )
-		gtkut_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button, FALSE);
 
 	/* Data entry area */
 #ifndef GENERIC_UMPC
diff --git a/src/editaddress_other_attributes_ldap.c b/src/editaddress_other_attributes_ldap.c
index 00602fc..6f72649 100644
--- a/src/editaddress_other_attributes_ldap.c
+++ b/src/editaddress_other_attributes_ldap.c
@@ -336,7 +336,7 @@ void addressbook_edit_person_page_attrib_ldap(PersonEditDlg *dialog, gint pageNu
 	gtk_cmclist_set_auto_sort(GTK_CMCLIST(clist), TRUE);
 
 	for (i = 0; i < ATTRIB_N_COLS; i++)
-		gtkut_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(clist)->column[i].button, FALSE);
 
 	/* Data entry area */
 	table = gtk_table_new(4, 2, FALSE);
diff --git a/src/editgroup.c b/src/editgroup.c
index 517c7a9..f1ca94b 100644
--- a/src/editgroup.c
+++ b/src/editgroup.c
@@ -363,7 +363,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
 	gtk_cmclist_set_auto_sort( GTK_CMCLIST(clist_group), TRUE );
 
 	for( i = 0; i < GROUP_N_COLS; i++ )
-		gtkut_widget_set_can_focus(GTK_CMCLIST(clist_group)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(clist_group)->column[i].button, FALSE);
 
 	/* Available list */
 	vboxl = gtk_vbox_new( FALSE, 0 );
@@ -395,7 +395,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
 	gtk_cmclist_set_auto_sort( GTK_CMCLIST(clist_avail), TRUE );
 
 	for( i = 0; i < GROUP_N_COLS; i++ )
-		gtkut_widget_set_can_focus(GTK_CMCLIST(clist_avail)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(clist_avail)->column[i].button, FALSE);
 
 	/* Status line */
 	hsbox = gtk_hbox_new(FALSE, 0);
diff --git a/src/folderview.c b/src/folderview.c
index b3141f3..3befa38 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -473,7 +473,7 @@ static GtkWidget *folderview_ctree_create(FolderView *folderview)
 
 	/* don't let title buttons take key focus */
 	for (i = 0; i < N_FOLDER_COLS; i++) {
-		gtkut_widget_set_can_focus(GTK_CMCLIST(ctree)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(ctree)->column[i].button, FALSE);
 		gtk_cmclist_set_column_width(GTK_CMCLIST(ctree), col_pos[i],
 				   prefs_common.folder_col_size[i]);
 		gtk_cmclist_set_column_visibility
diff --git a/src/grouplistdialog.c b/src/grouplistdialog.c
index 21ee8d1..91fab55 100644
--- a/src/grouplistdialog.c
+++ b/src/grouplistdialog.c
@@ -216,7 +216,7 @@ static void grouplist_dialog_create(void)
 				GTK_CMCTREE_EXPANDER_TRIANGLE);
 
 	for (i = 0; i < 3; i++)
-		gtkut_widget_set_can_focus(GTK_CMCLIST(ctree)->column[i].button, FALSE);
+		gtk_widget_set_can_focus(GTK_CMCLIST(ctree)->column[i].button, FALSE);
 	g_signal_connect(G_OBJECT(ctree), "button-press-event",
 			 G_CALLBACK(button_press_cb), NULL);
 
diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index cfaa417..369d715 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -1127,8 +1127,8 @@ gtk_cmclist_init (GtkCMCList *clist)
 {
   clist->flags = 0;
 
-  gtkut_widget_set_has_window (GTK_WIDGET(clist), TRUE);
-  gtkut_widget_set_can_focus (GTK_WIDGET(clist), TRUE);
+  gtk_widget_set_has_window (GTK_WIDGET(clist), TRUE);
+  gtk_widget_set_can_focus (GTK_WIDGET(clist), TRUE);
   GTK_CMCLIST_SET_FLAG (clist, CMCLIST_DRAW_DRAG_LINE);
   GTK_CMCLIST_SET_FLAG (clist, CMCLIST_USE_DRAG_ICONS);
 
@@ -1490,7 +1490,7 @@ gtk_cmclist_column_title_active (GtkCMCList *clist,
   g_signal_handlers_disconnect_matched(G_OBJECT (clist->column[column].button), G_SIGNAL_MATCH_FUNC,
 		    0, 0, 0, column_title_passive_func, 0);
 
-  gtkut_widget_set_can_focus (clist->column[column].button, TRUE);
+  gtk_widget_set_can_focus (clist->column[column].button, TRUE);
   if (gtk_widget_get_visible (GTK_WIDGET(clist)))
     gtk_widget_queue_draw (clist->column[column].button);
 }
@@ -1526,7 +1526,7 @@ gtk_cmclist_column_title_passive (GtkCMCList *clist,
   g_signal_connect (G_OBJECT (clist->column[column].button), "event",
 		      G_CALLBACK(column_title_passive_func), NULL);
 
-  gtkut_widget_set_can_focus (clist->column[column].button, FALSE);
+  gtk_widget_set_can_focus (clist->column[column].button, FALSE);
   if (gtk_widget_get_visible (GTK_WIDGET(clist)))
     gtk_widget_queue_draw (clist->column[column].button);
 }
@@ -4614,7 +4614,7 @@ gtk_cmclist_realize (GtkWidget *widget)
 
   clist = GTK_CMCLIST (widget);
 
-  gtkut_widget_set_realized (widget, TRUE);
+  gtk_widget_set_realized (widget, TRUE);
 
   border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 
@@ -4771,7 +4771,7 @@ gtk_cmclist_unrealize (GtkWidget *widget)
   if (gtk_widget_get_mapped (widget))
     gtk_cmclist_unmap (widget);
 
-  gtkut_widget_set_mapped (widget, FALSE);
+  gtk_widget_set_mapped (widget, FALSE);
 
   /* detach optional row/cell styles */
   if (gtk_widget_get_realized (widget))
@@ -4834,7 +4834,7 @@ gtk_cmclist_map (GtkWidget *widget)
 
   if (!gtk_widget_get_mapped (widget))
     {
-      gtkut_widget_set_mapped (widget, TRUE);
+      gtk_widget_set_mapped (widget, TRUE);
 
       /* map column buttons */
       for (i = 0; i < clist->columns; i++)
@@ -4873,7 +4873,7 @@ gtk_cmclist_unmap (GtkWidget *widget)
 
   if (gtk_widget_get_mapped (widget))
     {
-      gtkut_widget_set_mapped (widget, FALSE);
+      gtk_widget_set_mapped (widget, FALSE);
 
       if (clist_has_grab (clist))
 	{
diff --git a/src/gtk/gtkcmoptionmenu.c b/src/gtk/gtkcmoptionmenu.c
index 0333f3e..b07694f 100644
--- a/src/gtk/gtkcmoptionmenu.c
+++ b/src/gtk/gtkcmoptionmenu.c
@@ -183,9 +183,9 @@ gtk_cmoption_menu_child_type (GtkContainer       *container)
 static void
 gtk_cmoption_menu_init (GtkCMOptionMenu *option_menu)
 {
-  gtkut_widget_set_can_focus (GTK_WIDGET(option_menu), TRUE);
-  gtkut_widget_set_can_default (GTK_WIDGET(option_menu), FALSE);
-  gtkut_widget_set_receives_default (GTK_WIDGET(option_menu), FALSE);
+  gtk_widget_set_can_focus (GTK_WIDGET(option_menu), TRUE);
+  gtk_widget_set_can_default (GTK_WIDGET(option_menu), FALSE);
+  gtk_widget_set_receives_default (GTK_WIDGET(option_menu), FALSE);
 
   option_menu->menu = NULL;
   option_menu->menu_item = NULL;
diff --git a/src/gtk/gtkshruler.c b/src/gtk/gtkshruler.c
index b56f870..5c568ed 100644
--- a/src/gtk/gtkshruler.c
+++ b/src/gtk/gtkshruler.c
@@ -287,7 +287,7 @@ gtk_shruler_init (GtkSHRuler *ruler)
 {
   GtkSHRulerPrivate *priv = GTK_SHRULER_GET_PRIVATE (ruler);
 
-  gtkut_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
+  gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
 
   priv->orientation   = GTK_ORIENTATION_HORIZONTAL;
 #if !GTK_CHECK_VERSION(3, 0, 0)
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 3d82902..e94d063 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -125,7 +125,7 @@ void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn)
 
 	*help_btn = gtk_button_new_from_stock(GTK_STOCK_HELP);
 
-	gtkut_widget_set_can_default(*help_btn, TRUE);
+	gtk_widget_set_can_default(*help_btn, TRUE);
 	gtk_box_pack_end(GTK_BOX (bbox), *help_btn, TRUE, TRUE, 0);
 	gtk_button_box_set_child_secondary(GTK_BUTTON_BOX (bbox),
 			*help_btn, TRUE);
@@ -162,20 +162,20 @@ void gtkut_stock_button_set_create(GtkWidget **bbox,
 	gtk_box_set_spacing(GTK_BOX(*bbox), 5);
 
 	*button1 = gtk_button_new_from_stock(label1);
-	gtkut_widget_set_can_default(*button1, TRUE);
+	gtk_widget_set_can_default(*button1, TRUE);
 	gtk_box_pack_start(GTK_BOX(*bbox), *button1, TRUE, TRUE, 0);
 	gtk_widget_show(*button1);
 
 	if (button2) {
 		*button2 = gtk_button_new_from_stock(label2);
-		gtkut_widget_set_can_default(*button2, TRUE);
+		gtk_widget_set_can_default(*button2, TRUE);
 		gtk_box_pack_start(GTK_BOX(*bbox), *button2, TRUE, TRUE, 0);
 		gtk_widget_show(*button2);
 	}
 
 	if (button3) {
 		*button3 = gtk_button_new_from_stock(label3);
-		gtkut_widget_set_can_default(*button3, TRUE);
+		gtk_widget_set_can_default(*button3, TRUE);
 		gtk_box_pack_start(GTK_BOX(*bbox), *button3, TRUE, TRUE, 0);
 		gtk_widget_show(*button3);
 	}
@@ -196,7 +196,7 @@ void gtkut_stock_with_text_button_set_create(GtkWidget **bbox,
 	*button1 = gtk_button_new_with_mnemonic(text1);
 	gtk_button_set_image(GTK_BUTTON(*button1),
 		gtk_image_new_from_stock(label1, GTK_ICON_SIZE_BUTTON));
-	gtkut_widget_set_can_default(*button1, TRUE);
+	gtk_widget_set_can_default(*button1, TRUE);
 	gtk_box_pack_start(GTK_BOX(*bbox), *button1, TRUE, TRUE, 0);
 	gtk_widget_show(*button1);
 
@@ -204,7 +204,7 @@ void gtkut_stock_with_text_button_set_create(GtkWidget **bbox,
 		*button2 = gtk_button_new_with_mnemonic(text2);
 		gtk_button_set_image(GTK_BUTTON(*button2),
 			gtk_image_new_from_stock(label2, GTK_ICON_SIZE_BUTTON));
-		gtkut_widget_set_can_default(*button2, TRUE);
+		gtk_widget_set_can_default(*button2, TRUE);
 		gtk_box_pack_start(GTK_BOX(*bbox), *button2, TRUE, TRUE, 0);
 		gtk_widget_show(*button2);
 	}
@@ -213,7 +213,7 @@ void gtkut_stock_with_text_button_set_create(GtkWidget **bbox,
 		*button3 = gtk_button_new_with_mnemonic(text3);
 		gtk_button_set_image(GTK_BUTTON(*button3),
 			gtk_image_new_from_stock(label3, GTK_ICON_SIZE_BUTTON));
-		gtkut_widget_set_can_default(*button3, TRUE);
+		gtk_widget_set_can_default(*button3, TRUE);
 		gtk_box_pack_start(GTK_BOX(*bbox), *button3, TRUE, TRUE, 0);
 		gtk_widget_show(*button3);
 	}
@@ -1700,36 +1700,6 @@ claws_input_add    (gint	      source,
   return result;
 }
 
-void gtkut_widget_set_mapped(GtkWidget *widget, gboolean mapped)
-{
-	gtk_widget_set_mapped(widget, mapped);
-}
-
-void gtkut_widget_set_realized(GtkWidget *widget, gboolean realized)
-{
-	gtk_widget_set_realized(widget, realized);
-}
-
-void gtkut_widget_set_can_default(GtkWidget *widget, gboolean can_default)
-{
-	gtk_widget_set_can_default(widget, can_default);
-}
-
-void gtkut_widget_set_receives_default(GtkWidget *widget, gboolean receives_default)
-{
-	gtk_widget_set_receives_default(widget, receives_default);
-}
-
-void gtkut_widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
-{
-	gtk_widget_set_can_focus(widget, can_focus);
-}
-
-void gtkut_widget_set_has_window(GtkWidget *widget, gboolean has_window)
-{
-	gtk_widget_set_has_window(widget, has_window);
-}
-
 /**
  * Load a pixbuf fitting inside the specified size. EXIF orientation is
  * respected if available.
diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h
index 71a27cb..6942831 100644
--- a/src/gtk/gtkutils.h
+++ b/src/gtk/gtkutils.h
@@ -140,14 +140,6 @@ void gtkut_widget_init			(void);
 void gtkut_widget_set_app_icon		(GtkWidget	*widget);
 void gtkut_widget_set_composer_icon	(GtkWidget	*widget);
 
-void gtkut_widget_set_mapped            (GtkWidget *widget, gboolean mapped);
-void gtkut_widget_set_realized          (GtkWidget *widget, gboolean realized);
-void gtkut_widget_set_can_default       (GtkWidget *widget, gboolean can_default);
-void gtkut_widget_set_receives_default  (GtkWidget *widget, gboolean receives_default);
-void gtkut_widget_set_can_focus         (GtkWidget *widget, gboolean can_focus);
-void gtkut_widget_set_has_window        (GtkWidget *widget, gboolean has_window);
-
-
 GtkWidget *gtkut_account_menu_new	(GList			*ac_list,
 				  	 GCallback	 	 callback,
 					 gpointer		 data);
diff --git a/src/gtk/gtkvscrollbutton.c b/src/gtk/gtkvscrollbutton.c
index edf0775..6d18715 100644
--- a/src/gtk/gtkvscrollbutton.c
+++ b/src/gtk/gtkvscrollbutton.c
@@ -158,8 +158,8 @@ static void gtk_vscrollbutton_init(GtkVScrollbutton *scrollbutton)
     gtk_widget_show(arrow);
     gtk_container_add(GTK_CONTAINER(scrollbutton->downbutton), arrow);
     gtk_widget_set_size_request(scrollbutton->downbutton, -1, 16);
-    gtkut_widget_set_can_focus(scrollbutton->upbutton, FALSE);
-    gtkut_widget_set_can_focus(scrollbutton->downbutton, FALSE);
+    gtk_widget_set_can_focus(scrollbutton->upbutton, FALSE);
+    gtk_widget_set_can_focus(scrollbutton->downbutton, FALSE);
     gtk_widget_show(scrollbutton->downbutton);
     gtk_widget_show(scrollbutton->upbutton);
 
diff --git a/src/headerview.c b/src/headerview.c
index 240aba5..6022588 100644
--- a/src/headerview.c
+++ b/src/headerview.c
@@ -100,11 +100,11 @@ HeaderView *headerview_create(void)
 	gtk_label_set_selectable(GTK_LABEL(subject_body_label), TRUE);
 	gtk_label_set_selectable(GTK_LABEL(tags_body_label), TRUE);
 
-	gtkut_widget_set_can_focus(from_body_label, FALSE);
-	gtkut_widget_set_can_focus(to_body_label, FALSE);
-	gtkut_widget_set_can_focus(ng_body_label, FALSE);
-	gtkut_widget_set_can_focus(subject_body_label, FALSE);
-	gtkut_widget_set_can_focus(tags_body_label, FALSE);
+	gtk_widget_set_can_focus(from_body_label, FALSE);
+	gtk_widget_set_can_focus(to_body_label, FALSE);
+	gtk_widget_set_can_focus(ng_body_label, FALSE);
+	gtk_widget_set_can_focus(subject_body_label, FALSE);
+	gtk_widget_set_can_focus(tags_body_label, FALSE);
 
 	gtk_box_pack_start(GTK_BOX(hbox1), from_header_label, FALSE, FALSE, 0);
 	gtk_box_pack_start(GTK_BOX(hbox1), from_body_label, FALSE, FALSE, 0);
diff --git a/src/image_viewer.c b/src/image_viewer.c
index c02a7ba..d56e2c1 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -285,7 +285,7 @@ static MimeViewer *image_viewer_create(void)
 
 	notebook = gtk_notebook_new();
 	gtk_widget_show(notebook);
-	gtkut_widget_set_can_focus(notebook, FALSE);
+	gtk_widget_set_can_focus(notebook, FALSE);
 	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), FALSE);
 	gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook), FALSE);
 
diff --git a/src/importldif.c b/src/importldif.c
index bd1a917..de44168 100644
--- a/src/importldif.c
+++ b/src/importldif.c
@@ -763,7 +763,7 @@ static void imp_ldif_page_fields( gint pageNum, gchar *pageLbl ) {
 
 	/* Remove focus capability for column headers */
 	for( i = 0; i < FIELDS_N_COLS; i++ ) {
-		gtkut_widget_set_can_focus(
+		gtk_widget_set_can_focus(
 			GTK_CMCLIST(clist_field)->column[i].button,
 			FALSE);
 	}
@@ -980,7 +980,7 @@ static void imp_ldif_dialog_create() {
 	btnProceed = gtk_button_new_with_mnemonic(_("Proceed"));
 	gtk_button_set_image(GTK_BUTTON(btnProceed),
 			gtk_image_new_from_stock(GTK_STOCK_OK, GTK_ICON_SIZE_BUTTON));
-	gtkut_widget_set_can_default(btnProceed, TRUE);
+	gtk_widget_set_can_default(btnProceed, TRUE);
 	gtk_box_pack_start(GTK_BOX(hbbox), btnProceed, TRUE, TRUE, 0);
 	gtk_widget_hide(btnProceed);
 
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 73b0097..49de23f 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1968,7 +1968,7 @@ MainWindow *main_window_create()
 	online_pixmap = stock_pixmap_widget(STOCK_PIXMAP_ONLINE);
 	offline_pixmap = stock_pixmap_widget(STOCK_PIXMAP_OFFLINE);
 	online_switch = gtk_button_new ();
-	gtkut_widget_set_can_focus(online_switch, FALSE);
+	gtk_widget_set_can_focus(online_switch, FALSE);
 	CLAWS_SET_TIP(online_switch, 
 			     _("You are online. Click the icon to go offline"));
 	offline_switch = gtk_button_new ();
@@ -1988,7 +1988,7 @@ MainWindow *main_window_create()
 
 	ac_button = gtk_button_new();
 	CLAWS_SET_TIP(ac_button, _("Select account"));
-	gtkut_widget_set_can_focus(ac_button, FALSE);
+	gtk_widget_set_can_focus(ac_button, FALSE);
 	gtk_widget_set_size_request(ac_button, -1, 0);
 	gtk_box_pack_end(GTK_BOX(hbox_stat), ac_button, FALSE, FALSE, 0);
 	g_signal_connect(G_OBJECT(ac_button), "button_press_event",
diff --git a/src/message_search.c b/src/message_search.c
index 963346c..c7f9299 100644
--- a/src/message_search.c
+++ b/src/message_search.c
@@ -214,23 +214,23 @@ static void message_search_create(void)
 	gtkut_stock_button_add_help(confirm_area, &help_btn);
 
 	prev_btn = gtk_button_new_from_stock(GTK_STOCK_GO_BACK);
-	gtkut_widget_set_can_default(prev_btn, TRUE);
+	gtk_widget_set_can_default(prev_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), prev_btn, TRUE, TRUE, 0);
 	gtk_widget_show(prev_btn);
 
 	next_btn = gtk_button_new_from_stock(GTK_STOCK_GO_FORWARD);
-	gtkut_widget_set_can_default(next_btn, TRUE);
+	gtk_widget_set_can_default(next_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), next_btn, TRUE, TRUE, 0);
 	gtk_widget_show(next_btn);
 
 	close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
-	gtkut_widget_set_can_default(close_btn, TRUE);
+	gtk_widget_set_can_default(close_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), close_btn, TRUE, TRUE, 0);
 	gtk_widget_show(close_btn);
 
 	/* stop button hidden */
 	stop_btn = gtk_button_new_from_stock(GTK_STOCK_STOP);
-	gtkut_widget_set_can_default(stop_btn, TRUE);
+	gtk_widget_set_can_default(stop_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), stop_btn, TRUE, TRUE, 0);
 
 	gtk_widget_show (confirm_area);
diff --git a/src/mimeview.c b/src/mimeview.c
index 6f50792..53f0d0f 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -332,7 +332,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
 
 	mime_notebook = gtk_notebook_new();
         gtk_widget_show(mime_notebook);
-        gtkut_widget_set_can_focus(mime_notebook, FALSE);
+        gtk_widget_set_can_focus(mime_notebook, FALSE);
         gtk_notebook_set_show_tabs(GTK_NOTEBOOK(mime_notebook), FALSE);
         gtk_notebook_set_show_border(GTK_NOTEBOOK(mime_notebook), FALSE);
 	
diff --git a/src/plugins/pgpcore/claws.def b/src/plugins/pgpcore/claws.def
index 24d5197..6473112 100644
--- a/src/plugins/pgpcore/claws.def
+++ b/src/plugins/pgpcore/claws.def
@@ -48,7 +48,6 @@ gtk_cmclist_sort
 gtkut_get_browse_file_btn
 gtkut_get_options_frame
 gtkut_stock_button_set_create
-gtkut_widget_set_can_default
 gtkut_window_new
 input_dialog
 label_window_create
diff --git a/src/plugins/pgpcore/select-keys.c b/src/plugins/pgpcore/select-keys.c
index 5df8f68..e532a33 100644
--- a/src/plugins/pgpcore/select-keys.c
+++ b/src/plugins/pgpcore/select-keys.c
@@ -437,7 +437,7 @@ create_dialog (struct select_keys_s *sk)
 		    		   &dont_encrypt_btn, _("Do_n't encrypt"));
     
     cancel_btn = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
-    gtkut_widget_set_can_default(cancel_btn, TRUE);
+    gtk_widget_set_can_default(cancel_btn, TRUE);
     gtk_box_pack_start(GTK_BOX(bbox), cancel_btn, TRUE, TRUE, 0);
     gtk_widget_show(cancel_btn);
     gtk_box_pack_end (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
diff --git a/src/plugins/rssyl/claws.def b/src/plugins/rssyl/claws.def
index 6559629..5f257e5 100644
--- a/src/plugins/rssyl/claws.def
+++ b/src/plugins/rssyl/claws.def
@@ -78,7 +78,6 @@ gtk_cmctree_is_ancestor
 gtk_cmctree_node_get_row_data
 gtkut_get_browse_file_btn
 gtkut_widget_draw_now
-gtkut_widget_set_can_default
 gtkut_window_new
 inc_offline_should_override
 input_dialog
diff --git a/src/prefs_themes.c b/src/prefs_themes.c
index ef345cf..02440ae 100644
--- a/src/prefs_themes.c
+++ b/src/prefs_themes.c
@@ -967,7 +967,7 @@ static void prefs_themes_create_widget(PrefsPage *page, GtkWindow *window, gpoin
 	btn_install = gtk_button_new_with_label (_("Install new..."));
 	gtk_widget_show (btn_install);
 	gtk_box_pack_start (GTK_BOX (hbox3), btn_install, FALSE, FALSE, 0);
-	gtkut_widget_set_can_default (btn_install, TRUE);
+	gtk_widget_set_can_default (btn_install, TRUE);
 
 	btn_more = gtkut_get_link_btn((GtkWidget *)window, THEMES_URI, _("Get more..."));
 	gtk_widget_show (btn_more);
@@ -1099,7 +1099,7 @@ static void prefs_themes_create_widget(PrefsPage *page, GtkWindow *window, gpoin
 	btn_remove = gtk_button_new_with_label (_("Remove"));
 	gtk_widget_show (btn_remove);
 	gtk_container_add (GTK_CONTAINER (hbuttonbox1), btn_remove);
-	gtkut_widget_set_can_default (btn_remove, TRUE);
+	gtk_widget_set_can_default (btn_remove, TRUE);
 
 #ifdef HAVE_SVG
 	PACK_FRAME(vbox1, frame_scaling, _("SVG rendering"));
diff --git a/src/summary_search.c b/src/summary_search.c
index 40f7d6a..5b208e1 100644
--- a/src/summary_search.c
+++ b/src/summary_search.c
@@ -477,28 +477,28 @@ static void summary_search_create(void)
 	gtkut_stock_button_add_help(confirm_area, &help_btn);
 
 	all_btn = gtk_button_new_with_mnemonic(_("Find _all"));
-	gtkut_widget_set_can_default(all_btn, TRUE);
+	gtk_widget_set_can_default(all_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), all_btn, TRUE, TRUE, 0);
 	gtk_widget_show(all_btn);
 
 	prev_btn = gtk_button_new_from_stock(GTK_STOCK_GO_BACK);
-	gtkut_widget_set_can_default(prev_btn, TRUE);
+	gtk_widget_set_can_default(prev_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), prev_btn, TRUE, TRUE, 0);
 	gtk_widget_show(prev_btn);
 
 	next_btn = gtk_button_new_from_stock(GTK_STOCK_GO_FORWARD);
-	gtkut_widget_set_can_default(next_btn, TRUE);
+	gtk_widget_set_can_default(next_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), next_btn, TRUE, TRUE, 0);
 	gtk_widget_show(next_btn);
 
 	close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
-	gtkut_widget_set_can_default(close_btn, TRUE);
+	gtk_widget_set_can_default(close_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), close_btn, TRUE, TRUE, 0);
 	gtk_widget_show(close_btn);
 
 	/* stop button hidden */
 	stop_btn = gtk_button_new_from_stock(GTK_STOCK_STOP);
-	gtkut_widget_set_can_default(stop_btn, TRUE);
+	gtk_widget_set_can_default(stop_btn, TRUE);
 	gtk_box_pack_start(GTK_BOX(confirm_area), stop_btn, TRUE, TRUE, 0);
 
 	gtk_box_pack_start (GTK_BOX (vbox1), confirm_area, FALSE, FALSE, 0);
diff --git a/src/summaryview.c b/src/summaryview.c
index deaac7b..9ce5558 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -554,7 +554,7 @@ SummaryView *summary_create(MainWindow *mainwin)
 	toggle_search = gtk_toggle_button_new();
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle_search),
 				     prefs_common.show_searchbar);
-	gtkut_widget_set_can_focus(toggle_search, FALSE);
+	gtk_widget_set_can_focus(toggle_search, FALSE);
 	gtk_widget_show(toggle_search);
 
 	CLAWS_SET_TIP(toggle_search, _("Toggle quick search bar"));
@@ -6551,7 +6551,7 @@ static GtkWidget *summary_ctree_create(SummaryView *summaryview)
 	g_object_set_data(G_OBJECT(ctree), "summaryview", (gpointer)summaryview); 
 
 	for (pos = 0; pos < N_SUMMARY_COLS; pos++) {
-		gtkut_widget_set_can_focus(GTK_CMCLIST(ctree)->column[pos].button,
+		gtk_widget_set_can_focus(GTK_CMCLIST(ctree)->column[pos].button,
 				       FALSE);
 		if (((pos == summaryview->col_pos[S_COL_FROM] && !FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) ||
 		     (pos == summaryview->col_pos[S_COL_TO] && FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) ||
diff --git a/src/toolbar.c b/src/toolbar.c
index 3626329..7a56fc8 100644
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -2103,7 +2103,7 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
 #ifndef GENERIC_UMPC
 #define TOOLBAR_ITEM(item,icon,text,tooltip) {								\
 	item = GTK_WIDGET(gtk_tool_button_new(icon, text));						\
-	gtkut_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
+	gtk_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
 	gtk_tool_item_set_homogeneous(GTK_TOOL_ITEM(item), FALSE);					\
 	gtk_tool_item_set_is_important(GTK_TOOL_ITEM(item), TRUE);					\
 	g_signal_connect (G_OBJECT(item), "clicked", G_CALLBACK(toolbar_buttons_cb), toolbar_item);	\
@@ -2116,7 +2116,7 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
 	item = GTK_WIDGET(gtk_toggle_tool_button_new());						\
 	gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(item), icon);					\
 	gtk_tool_button_set_label(GTK_TOOL_BUTTON(item), text);						\
-	gtkut_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
+	gtk_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
 	gtk_tool_item_set_homogeneous(GTK_TOOL_ITEM(item), FALSE);					\
 	gtk_tool_item_set_is_important(GTK_TOOL_ITEM(item), TRUE);					\
 	g_signal_connect (G_OBJECT(item), "clicked", G_CALLBACK(toolbar_buttons_cb), toolbar_item);	\
@@ -2140,9 +2140,9 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
 	gchild = gtk_container_get_children(								\
 			GTK_CONTAINER(child)); 								\
 	btn = (GtkWidget *)gchild->data;								\
-	gtkut_widget_set_can_focus(btn, FALSE);								\
+	gtk_widget_set_can_focus(btn, FALSE);								\
 	arr = (GtkWidget *)(gchild->next?gchild->next->data:NULL);					\
-	gtkut_widget_set_can_focus(arr, FALSE);								\
+	gtk_widget_set_can_focus(arr, FALSE);								\
 	g_list_free(gchild);										\
 	gchild = gtk_container_get_children(GTK_CONTAINER(arr));					\
 	gtk_widget_set_size_request(GTK_WIDGET(gchild->data), 9, -1);					\
@@ -2153,7 +2153,7 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
 
 #define TOOLBAR_ITEM(item,icon,text,tooltip) {								\
 	item = GTK_WIDGET(gtk_tool_button_new(icon, text));						\
-	gtkut_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
+	gtk_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
 	gtk_tool_item_set_homogeneous(GTK_TOOL_ITEM(item), FALSE);					\
 	gtk_tool_item_set_is_important(GTK_TOOL_ITEM(item), TRUE);					\
 	g_signal_connect (G_OBJECT(item), "clicked", G_CALLBACK(toolbar_buttons_cb), toolbar_item);	\
@@ -2164,7 +2164,7 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
 	item = GTK_WIDGET(gtk_toggle_tool_button_new());						\
 	gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(item), icon);					\
 	gtk_tool_button_set_label(GTK_TOOL_BUTTON(item), text);						\
-	gtkut_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
+	gtk_widget_set_can_focus(gtk_bin_get_child(GTK_BIN(item)), FALSE);				\
 	gtk_tool_item_set_homogeneous(GTK_TOOL_ITEM(item), FALSE);					\
 	gtk_tool_item_set_is_important(GTK_TOOL_ITEM(item), TRUE);					\
 	g_signal_connect (G_OBJECT(item), "clicked", G_CALLBACK(toolbar_buttons_cb), toolbar_item);	\
@@ -2183,9 +2183,9 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
 	gchild = gtk_container_get_children(								\
 			GTK_CONTAINER(child)); 								\
 	btn = (GtkWidget *)gchild->data;								\
-	gtkut_widget_set_can_focus(btn, FALSE);								\
+	gtk_widget_set_can_focus(btn, FALSE);								\
 	arr = (GtkWidget *)(gchild->next?gchild->next->data:NULL);					\
-	gtkut_widget_set_can_focus(arr, FALSE);								\
+	gtk_widget_set_can_focus(arr, FALSE);								\
 	g_list_free(gchild);										\
 	gchild = gtk_container_get_children(GTK_CONTAINER(arr));					\
 	gtk_widget_set_size_request(GTK_WIDGET(gchild->data), 9, -1);					\

commit 59309a6501a767ea3b20954d781aae1cfb7d14a9
Author: Ralph Sennhauser <ralph.sennhauser at gmail.com>
Date:   Wed Nov 8 20:12:28 2017 +0100

    Drop ifdefs for old gtk+2
    
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser at gmail.com>

diff --git a/src/compose.c b/src/compose.c
index ec66385..ae5cd90 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -838,12 +838,6 @@ static void compose_create_tags(GtkTextView *text, Compose *compose)
 {
 	GtkTextBuffer *buffer;
 	GdkColor black = {(gulong)0, (gushort)0, (gushort)0, (gushort)0};
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	GdkColormap *cmap;
-	gboolean success[8];
-	int i;
-	GdkColor color[8];
-#endif
 
 	buffer = gtk_text_view_get_buffer(text);
 
@@ -904,29 +898,6 @@ static void compose_create_tags(GtkTextView *text, Compose *compose)
 					 NULL);
 	compose->no_wrap_tag = gtk_text_buffer_create_tag(buffer, "no_wrap", NULL);
 	compose->no_join_tag = gtk_text_buffer_create_tag(buffer, "no_join", NULL);
-
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	color[0] = quote_color1;
-	color[1] = quote_color2;
-	color[2] = quote_color3;
-	color[3] = quote_bgcolor1;
-	color[4] = quote_bgcolor2;
-	color[5] = quote_bgcolor3;
-	color[6] = signature_color;
-	color[7] = uri_color;
-
-	cmap = gdk_drawable_get_colormap(gtk_widget_get_window(compose->window));
-	gdk_colormap_alloc_colors(cmap, color, 8, FALSE, TRUE, success);
-
-	for (i = 0; i < 8; i++) {
-		if (success[i] == FALSE) {
-			g_warning("Compose: color allocation failed.");
-			quote_color1 = quote_color2 = quote_color3 = 
-				quote_bgcolor1 = quote_bgcolor2 = quote_bgcolor3 = 
-				signature_color = uri_color = black;
-		}
-	}
-#endif
 }
 
 Compose *compose_new(PrefsAccount *account, const gchar *mailto,
@@ -958,20 +929,11 @@ static void compose_set_save_to(Compose *compose, const gchar *folderidentifier)
 {
 	GtkEditable *entry;
 	if (folderidentifier) {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_unset_popdown_strings(GTK_COMBO_BOX(compose->savemsg_combo));
-#else
 		combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(compose->savemsg_combo));
-#endif
 		prefs_common.compose_save_to_history = add_history(
 				prefs_common.compose_save_to_history, folderidentifier);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(compose->savemsg_combo),
-				prefs_common.compose_save_to_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(compose->savemsg_combo),
 				prefs_common.compose_save_to_history);
-#endif
 	}
 
 	entry = GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(compose->savemsg_combo)));
@@ -989,20 +951,11 @@ static gchar *compose_get_save_to(Compose *compose)
 	result = gtk_editable_get_chars(entry, 0, -1);
 	
 	if (result) {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_unset_popdown_strings(GTK_COMBO_BOX(compose->savemsg_combo));
-#else
 		combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(compose->savemsg_combo));
-#endif
 		prefs_common.compose_save_to_history = add_history(
 				prefs_common.compose_save_to_history, result);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(compose->savemsg_combo),
-				prefs_common.compose_save_to_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(compose->savemsg_combo),
 				prefs_common.compose_save_to_history);
-#endif
 	}
 	return result;
 }
@@ -4963,9 +4916,7 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
 {
 	gchar *from = NULL, *header = NULL;
 	ComposeHeaderEntry *header_entry;
-#if GTK_CHECK_VERSION(2, 24, 0)
 	GtkTreeIter iter;
-#endif
 
 	cm_return_if_fail(account != NULL);
 
@@ -5007,13 +4958,9 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
 	}
 	
 	header_entry = (ComposeHeaderEntry *) compose->header_list->data;
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	header = gtk_combo_box_get_active_text(GTK_COMBO_BOX(header_entry->combo));
-#else
 	if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(header_entry->combo), &iter))
 		gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(
 			header_entry->combo)), &iter, COMBOBOX_TEXT, &header, -1);
-#endif
 	
 	if (header && !strlen(gtk_entry_get_text(GTK_ENTRY(header_entry->entry)))) {
 		if (account->protocol == A_NNTP) {
@@ -7125,9 +7072,6 @@ static void compose_create_header_entry(Compose *compose)
 
 	/* Combo box model */
 	model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	combo = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(model), 0);
-#endif
 	COMBOBOX_ADD(model, prefs_common_translated_header_name("To:"),
 			COMPOSE_TO);
 	COMBOBOX_ADD(model, prefs_common_translated_header_name("Cc:"),
@@ -7143,13 +7087,11 @@ static void compose_create_header_entry(Compose *compose)
 	compose_add_extra_header_entries(model);
 
 	/* Combo box */
-#if GTK_CHECK_VERSION(2, 24, 0)
 	combo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(model));
 	GtkCellRenderer *cell = gtk_cell_renderer_text_new();
 	gtk_cell_renderer_set_alignment(cell, 0.0, 0.5);
 	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, TRUE);
 	gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(combo), 0);
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
 	g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN(combo))), "grab_focus",
 			 G_CALLBACK(compose_grab_focus_cb), compose);
@@ -7519,23 +7461,14 @@ static GtkWidget *compose_create_others(Compose *compose)
 	g_signal_connect(G_OBJECT(savemsg_checkbtn), "toggled",
 			 G_CALLBACK(compose_savemsg_checkbtn_cb), compose);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	savemsg_combo = gtk_combo_box_entry_new_text();
-#else
 	savemsg_combo = gtk_combo_box_text_new_with_entry();
-#endif
 	compose->savemsg_checkbtn = savemsg_checkbtn;
 	compose->savemsg_combo = savemsg_combo;
 	gtk_widget_show(savemsg_combo);
 
 	if (prefs_common.compose_save_to_history)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(savemsg_combo),
-				prefs_common.compose_save_to_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(savemsg_combo),
 				prefs_common.compose_save_to_history);
-#endif
 	gtk_table_attach(GTK_TABLE(table), savemsg_combo, 1, 2, rowcount, rowcount + 1, GTK_FILL|GTK_EXPAND, GTK_SHRINK, 0, 0);
 	gtk_widget_set_sensitive(GTK_WIDGET(savemsg_combo), prefs_common.savemsg);
 	g_signal_connect_after(G_OBJECT(savemsg_combo), "grab_focus",
@@ -9477,11 +9410,7 @@ static void compose_attach_property_create(gboolean *cancelled)
 	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, (0 + 1), 
 			 GTK_FILL, 0, 0, 0); 
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	mimetype_entry = gtk_combo_box_entry_new_text(); 
-#else
 	mimetype_entry = gtk_combo_box_text_new_with_entry();
-#endif
 	gtk_table_attach(GTK_TABLE(table), mimetype_entry, 1, 2, 0, (0 + 1), 
 			 GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 			 
@@ -9503,11 +9432,7 @@ static void compose_attach_property_create(gboolean *cancelled)
 
 	for (mime_type_list = strlist; mime_type_list != NULL; 
 		mime_type_list = mime_type_list->next) {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		gtk_combo_box_append_text(GTK_COMBO_BOX(mimetype_entry), mime_type_list->data);
-#else
 		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mimetype_entry), mime_type_list->data);
-#endif
 		g_free(mime_type_list->data);
 	}
 	g_list_free(strlist);
diff --git a/src/editaddress.c b/src/editaddress.c
index e1b5534..e6d9af2 100644
--- a/src/editaddress.c
+++ b/src/editaddress.c
@@ -1322,11 +1322,7 @@ static void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl )
 	gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	entry_name = gtk_combo_box_entry_new_text ();
-#else
 	entry_name = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
 	/* Next row */
@@ -1342,11 +1338,7 @@ static void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl )
 	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	entry_name = gtk_combo_box_entry_new_text ();
-#else
 	entry_name = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, 0, 1, GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
 	/* Next row */
@@ -1360,13 +1352,8 @@ static void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl )
 #endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(entry_name), -1);
 	if (prefs_common.addressbook_custom_attributes)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(entry_name),
-				prefs_common.addressbook_custom_attributes);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(entry_name),
 				prefs_common.addressbook_custom_attributes);		
-#endif
 	/* Button box */
 	vboxb = gtk_vbox_new( FALSE, 4 );
 	gtk_box_pack_start(GTK_BOX(hbox), vboxb, FALSE, FALSE, 2);
@@ -1758,19 +1745,10 @@ no_img:
 void addressbook_edit_reload_attr_list( void )
 {
 	if (personeditdlg.entry_atname) {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_unset_popdown_strings(GTK_COMBO_BOX(personeditdlg.entry_atname));
-#else		
 		combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(personeditdlg.entry_atname));
-#endif
 		if (prefs_common.addressbook_custom_attributes)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-			combobox_set_popdown_strings(GTK_COMBO_BOX(personeditdlg.entry_atname),
-					prefs_common.addressbook_custom_attributes);
-#else		
 			combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(personeditdlg.entry_atname),
 					prefs_common.addressbook_custom_attributes);
-#endif
 	}
 }
 
diff --git a/src/gtk/combobox.c b/src/gtk/combobox.c
index 11e0c65..4804960 100644
--- a/src/gtk/combobox.c
+++ b/src/gtk/combobox.c
@@ -45,31 +45,16 @@ GtkWidget *combobox_text_new(const gboolean with_entry, const gchar *text, ...)
 	if(text == NULL)
 		return NULL;
 	
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	if (with_entry)
-		combo = gtk_combo_box_entry_new_text();
-	else
-		combo = gtk_combo_box_new_text();
-#else
 	if (with_entry)
 		combo = gtk_combo_box_text_new_with_entry();
 	else
 		combo = gtk_combo_box_text_new();
-#endif
 	gtk_widget_show(combo);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(combo), text);
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), text);
-#endif
 	va_start(args, text);
 	while ((string = va_arg(args, gchar*)) != NULL)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		gtk_combo_box_append_text(GTK_COMBO_BOX(combo), string);
-#else
 		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), string);
-#endif
 	va_end(args);
 		
 	gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
@@ -138,19 +123,9 @@ void combobox_select_by_text(GtkComboBox *combobox, const gchar *data)
 {
 	GtkTreeModel *model;
 	ComboboxSelCtx *ctx = NULL;
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	GtkComboBoxClass *class;
-#endif
 
 	cm_return_if_fail(combobox != NULL);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	class = GTK_COMBO_BOX_GET_CLASS (combobox);
-
-	/* we can do that only with gtk_combo_box_new_text() combo boxes */
-	cm_return_if_fail(class->get_active_text != NULL);
-#else
 	cm_return_if_fail(GTK_IS_COMBO_BOX (combobox));
-#endif
 
 	model = gtk_combo_box_get_model(combobox);
 
@@ -180,51 +155,31 @@ gint combobox_get_active_data(GtkComboBox *combobox)
 	return data;
 }
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-void combobox_unset_popdown_strings(GtkComboBox *combobox)
-#else
 void combobox_unset_popdown_strings(GtkComboBoxText *combobox)
-#endif
 {
 	GtkTreeModel *model;
 	gint count, i;
 
 	cm_return_if_fail(combobox != NULL);
-#if GTK_CHECK_VERSION(2, 24, 0)
 	cm_return_if_fail(GTK_IS_COMBO_BOX_TEXT (combobox));
-#endif
 
 	model = gtk_combo_box_get_model(GTK_COMBO_BOX(combobox));
 	count = gtk_tree_model_iter_n_children(model, NULL);
 	for (i = 0; i < count; i++)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		gtk_combo_box_remove_text(combobox, 0);
-#else
 		gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(combobox), 0);
-#endif
 }
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-void combobox_set_popdown_strings(GtkComboBox *combobox,
-#else
 void combobox_set_popdown_strings(GtkComboBoxText *combobox,
-#endif
 				 GList       *list)
 {
 	GList *cur;
 
 	cm_return_if_fail(combobox != NULL);
-#if GTK_CHECK_VERSION(2, 24, 0)
 	cm_return_if_fail(GTK_IS_COMBO_BOX_TEXT (combobox));
-#endif
 
 	for (cur = list; cur != NULL; cur = g_list_next(cur))
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		gtk_combo_box_append_text(combobox, (const gchar*) cur->data);
-#else
 		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combobox),
 						(const gchar*) cur->data);
-#endif
 }
 
 gboolean combobox_set_value_from_arrow_key(GtkComboBox *combobox,
@@ -257,14 +212,8 @@ gboolean combobox_set_value_from_arrow_key(GtkComboBox *combobox,
 		/* if current text is in list, get prev or next one */
 
 		if (keyval == GDK_KEY_Up) {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-			gchar *text = gtk_combo_box_get_active_text(combobox);
-			if (!text)
-				text = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(combobox))),0,-1);
-#else
 			gchar *text = NULL;
 			gtk_tree_model_get(model, &iter, 0, &text, -1);
-#endif
 			valid = gtkut_tree_model_text_iter_prev(model, &iter, text);
 			g_free(text);
 		} else
diff --git a/src/gtk/combobox.h b/src/gtk/combobox.h
index 0218ece..dbd9893 100644
--- a/src/gtk/combobox.h
+++ b/src/gtk/combobox.h
@@ -61,16 +61,10 @@ void combobox_select_by_text	(GtkComboBox 		*combobox,
 
 gint combobox_get_active_data	(GtkComboBox 		*combobox);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-void combobox_unset_popdown_strings(GtkComboBox		*combobox);
-void combobox_set_popdown_strings(GtkComboBox		*combobox,
-				 GList       *list);
-#else
 /* these two functions require a GtkComboBoxText, so let the compiler warn */
 void combobox_unset_popdown_strings(GtkComboBoxText	*combobox);
 void combobox_set_popdown_strings(GtkComboBoxText	*combobox,
 				 GList       *list);
-#endif
 
 gboolean combobox_set_value_from_arrow_key(GtkComboBox *combobox,
 				 guint keyval);
diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index 853f5ce..cfaa417 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -4693,13 +4693,8 @@ gtk_cmclist_realize (GtkWidget *widget)
   gdk_window_set_background (clist->clist_window,
 			     &style->base[GTK_STATE_NORMAL]);
   gdk_window_show (clist->clist_window);
-#if GTK_CHECK_VERSION(2,24,0)
   clist->clist_window_width = gdk_window_get_width(clist->clist_window);
   clist->clist_window_height = gdk_window_get_height(clist->clist_window);
-#else
-  gdk_drawable_get_size (clist->clist_window, &clist->clist_window_width,
-		       &clist->clist_window_height);
-#endif
 
   /* create resize windows */
   attributes.wclass = GDK_INPUT_ONLY;
@@ -6069,12 +6064,8 @@ draw_rows (GtkCMCList     *clist,
   if (!area) {
     int w, h, y;
     cairo_t *cr;
-#if GTK_CHECK_VERSION(2,24,0)
     w = gdk_window_get_width(clist->clist_window);
     h = gdk_window_get_height(clist->clist_window);
-#else
-    gdk_drawable_get_size(clist->clist_window, &w, &h);
-#endif
     cr = gdk_cairo_create(clist->clist_window);
     y = ROW_TOP_YPIXEL (clist, i);
     gdk_cairo_set_source_color(cr, &gtk_widget_get_style(GTK_WIDGET(clist))->base[GTK_STATE_NORMAL]);
diff --git a/src/gtk/gtkshruler.c b/src/gtk/gtkshruler.c
index 9060106..b56f870 100644
--- a/src/gtk/gtkshruler.c
+++ b/src/gtk/gtkshruler.c
@@ -1022,31 +1022,6 @@ out:
   cairo_destroy (cr);
 }
 
-static cairo_surface_t *
-cm_gdk_window_create_similar_surface (GdkWindow *     window,
-                                   cairo_content_t content,
-                                   int             width,
-                                   int             height)
-{
-#if !GTK_CHECK_VERSION(2, 22, 0)
-  cairo_surface_t *window_surface, *surface;
-
-  g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
-
-  window_surface = GDK_DRAWABLE_GET_CLASS(window)->ref_cairo_surface(window);
-
-  surface = cairo_surface_create_similar (window_surface,
-                                          content,
-                                          width, height);
-
-  cairo_surface_destroy (window_surface);
-
-  return surface;
-#else
-  return gdk_window_create_similar_surface(window, content, width, height);
-#endif
-}
-
 static void
 gtk_shruler_make_pixmap (GtkSHRuler *ruler)
 {
@@ -1060,7 +1035,7 @@ gtk_shruler_make_pixmap (GtkSHRuler *ruler)
     cairo_surface_destroy (priv->backing_store);
 
   priv->backing_store =
-    cm_gdk_window_create_similar_surface (gtk_widget_get_window (widget),
+    gdk_window_create_similar_surface (gtk_widget_get_window (widget),
                                        CAIRO_CONTENT_COLOR,
                                        allocation.width,
                                        allocation.height);
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 04cccf7..3d82902 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1702,74 +1702,32 @@ claws_input_add    (gint	      source,
 
 void gtkut_widget_set_mapped(GtkWidget *widget, gboolean mapped)
 {
-#if GTK_CHECK_VERSION(2,20,0)
 	gtk_widget_set_mapped(widget, mapped);
-#else
-	if (mapped)
-		GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED);
-	else
-		GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED);
-#endif
 }
 
 void gtkut_widget_set_realized(GtkWidget *widget, gboolean realized)
 {
-#if GTK_CHECK_VERSION(2,20,0)
 	gtk_widget_set_realized(widget, realized);
-#else
-	if (realized)
-		GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
-	else
-		GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);
-#endif
 }
 
 void gtkut_widget_set_can_default(GtkWidget *widget, gboolean can_default)
 {
-#if GTK_CHECK_VERSION(2,20,0)
 	gtk_widget_set_can_default(widget, can_default);
-#else
-	if (can_default)
-		GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_DEFAULT);
-	else
-		GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_DEFAULT);
-#endif
 }
 
 void gtkut_widget_set_receives_default(GtkWidget *widget, gboolean receives_default)
 {
-#if GTK_CHECK_VERSION(2,20,0)
 	gtk_widget_set_receives_default(widget, receives_default);
-#else
-	if (receives_default)
-		GTK_WIDGET_SET_FLAGS(widget, GTK_RECEIVES_DEFAULT);
-	else
-		GTK_WIDGET_UNSET_FLAGS(widget, GTK_RECEIVES_DEFAULT);
-#endif
 }
 
 void gtkut_widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
 {
-#if GTK_CHECK_VERSION(2,20,0)
 	gtk_widget_set_can_focus(widget, can_focus);
-#else
-	if (can_focus)
-		GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS);
-	else
-		GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);
-#endif
 }
 
 void gtkut_widget_set_has_window(GtkWidget *widget, gboolean has_window)
 {
-#if GTK_CHECK_VERSION(2,20,0)
 	gtk_widget_set_has_window(widget, has_window);
-#else
-	if (has_window) /* Inverted logic there */
-		GTK_WIDGET_UNSET_FLAGS(widget, GTK_NO_WINDOW);
-	else
-		GTK_WIDGET_SET_FLAGS(widget, GTK_NO_WINDOW);
-#endif
 }
 
 /**
diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h
index 57680c4..71a27cb 100644
--- a/src/gtk/gtkutils.h
+++ b/src/gtk/gtkutils.h
@@ -259,39 +259,5 @@ gboolean auto_configure_service_sync(const gchar *service, const gchar *domain,
 #define gtk_vpaned_new() g_object_new (GTK_TYPE_PANED, \
     "orientation", GTK_ORIENTATION_VERTICAL, NULL)
 #endif
-#if !GTK_CHECK_VERSION(2,22,0)
-#define gdk_drag_context_get_selected_action(x) ((x)->action)
-#define gdk_drag_context_get_actions(x) ((x)->actions)
-#define gtk_text_view_get_vadjustment(x) ((x)->vadjustment)
-#define gdk_drag_context_get_suggested_action(x) ((x)->suggested_action)
-#define gtk_button_get_event_window(x) ((x)->event_window)
-#endif
-#if !GTK_CHECK_VERSION(2,20,0)
-#define gtk_widget_get_requisition(x,r) (*(r) = (x)->requisition)
-#define gtk_statusbar_get_message_area(x) ((x)->label)
-#define gtk_widget_get_realized(x) (GTK_WIDGET_REALIZED(x))
-#define gtk_widget_get_mapped(x) (GTK_WIDGET_MAPPED(x))
-#endif
-#if !GTK_CHECK_VERSION(2,18,0)
-#define gtk_widget_get_allocation(x,a) (*(a) = (x)->allocation)
-#define gtk_widget_set_allocation(x,a) ((x)->allocation = *(a))
-#define gtk_widget_has_focus(x) (GTK_WIDGET_HAS_FOCUS(x))
-#define gtk_widget_get_can_focus(x) (GTK_WIDGET_CAN_FOCUS(x))
-#define gtk_widget_has_grab(x) (GTK_WIDGET_HAS_GRAB(x))
-#define gtk_widget_get_visible(x) (GTK_WIDGET_VISIBLE(x))
-#define gtk_widget_get_realized(x) (GTK_WIDGET_REALIZED(x))
-#define gtk_widget_is_sensitive(x) (GTK_WIDGET_IS_SENSITIVE(x))
-#define gtk_widget_get_sensitive(x) (GTK_WIDGET_SENSITIVE(x))
-#define gtk_widget_is_drawable(x) (GTK_WIDGET_DRAWABLE(x))
-#define gtk_widget_get_state(x) (GTK_WIDGET_STATE(x))
-#define gtk_widget_get_mapped(x) (GTK_WIDGET_MAPPED(x))
-#define gtk_widget_get_has_window(x) (!(GTK_WIDGET_NO_WINDOW(x)))
-#define gtk_widget_get_app_paintable(x) (GTK_WIDGET_APP_PAINTABLE(x))
-#define gtk_widget_set_window(x,w) {			\
-	if ((x)->window != w) {				\
-		(x)->window = w;			\
-		g_object_notify (G_OBJECT(x), "window");\
-	}						\
-}
-#endif
+
 #endif /* __GTKUTILS_H__ */
diff --git a/src/gtk/inputdialog.c b/src/gtk/inputdialog.c
index c131c0a..6953e60 100644
--- a/src/gtk/inputdialog.c
+++ b/src/gtk/inputdialog.c
@@ -185,13 +185,8 @@ gchar *input_dialog_combo_remember(const gchar *title, const gchar *message,
 	gtk_widget_show(icon_q);
 	gtk_widget_hide(icon_p);
 	is_pass = FALSE;
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	combobox_unset_popdown_strings(GTK_COMBO_BOX(combo));
-	combobox_set_popdown_strings(GTK_COMBO_BOX(combo), list);
-#else
 	combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(combo));
 	combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(combo), list);
-#endif
 	return input_dialog_open(title, message, NULL, default_string, FALSE, remember);
 }
 
@@ -360,11 +355,7 @@ static void input_dialog_create(gboolean is_password)
 	g_signal_connect(G_OBJECT(entry), "activate",
 			 G_CALLBACK(entry_activated), NULL);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	combo = gtk_combo_box_entry_new_text();
-#else
 	combo = gtk_combo_box_text_new_with_entry();
-#endif
 	gtk_box_pack_start(GTK_BOX(vbox), combo, FALSE, FALSE, 0);
 	g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((combo)))), "activate",
 			 G_CALLBACK(combo_activated), NULL);
diff --git a/src/gtk/quicksearch.c b/src/gtk/quicksearch.c
index 724bbc3..3242aa7 100644
--- a/src/gtk/quicksearch.c
+++ b/src/gtk/quicksearch.c
@@ -242,15 +242,6 @@ static void quicksearch_set_popdown_strings(QuickSearch *quicksearch)
 {
 	GtkWidget *search_string_entry = quicksearch->search_string_entry;
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	combobox_unset_popdown_strings(GTK_COMBO_BOX(search_string_entry));
-	if (prefs_common.summary_quicksearch_type == ADVANCED_SEARCH_EXTENDED)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(search_string_entry),
-			quicksearch->extended_search_strings);	
-	else
-		combobox_set_popdown_strings(GTK_COMBO_BOX(search_string_entry),
-			quicksearch->normal_search_strings);
-#else
 	combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry));	
 	if (prefs_common.summary_quicksearch_type == ADVANCED_SEARCH_EXTENDED)
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry),
@@ -258,7 +249,6 @@ static void quicksearch_set_popdown_strings(QuickSearch *quicksearch)
 	else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry),
 			quicksearch->normal_search_strings);
-#endif
 }
 
 static void update_extended_buttons (QuickSearch *quicksearch)
@@ -763,11 +753,7 @@ QuickSearch *quicksearch_new()
 
 	gtk_widget_show(search_type);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	search_string_entry = gtk_combo_box_entry_new_text ();
-#else
 	search_string_entry = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(search_string_entry), -1);
 
 	vbox = gtk_vbox_new(TRUE, 0);
diff --git a/src/message_search.c b/src/message_search.c
index 33965bd..963346c 100644
--- a/src/message_search.c
+++ b/src/message_search.c
@@ -181,20 +181,11 @@ static void message_search_create(void)
 	gtk_widget_show (body_label);
 	gtk_box_pack_start (GTK_BOX (hbox1), body_label, FALSE, FALSE, 0);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	body_entry = gtk_combo_box_entry_new_text ();
-#else
 	body_entry = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(body_entry), -1);
 	if (prefs_common.message_search_history)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(body_entry),
-				prefs_common.message_search_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(body_entry),
 				prefs_common.message_search_history);
-#endif
 	gtk_widget_show (body_entry);
 	gtk_box_pack_start (GTK_BOX (hbox1), body_entry, TRUE, TRUE, 0);
 	g_signal_connect(G_OBJECT(body_entry), "changed",
@@ -278,31 +269,18 @@ static void message_search_execute(gboolean backward)
 	gboolean all_searched = FALSE;
 	gchar *body_str;
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	body_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.body_entry));
-#else
 	body_str = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.body_entry));
-#endif
 	if (!body_str)
 		body_str = gtk_editable_get_chars(
 				GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.body_entry))),0,-1);
 	if (!body_str || *body_str == '\0') return;
 
 	/* add to history */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	combobox_unset_popdown_strings(GTK_COMBO_BOX(search_window.body_entry));
-#else
 	combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(search_window.body_entry));
-#endif
 	prefs_common.message_search_history = add_history(
 			prefs_common.message_search_history, body_str);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	combobox_set_popdown_strings(GTK_COMBO_BOX(search_window.body_entry),
-			prefs_common.message_search_history);
-#else
 	combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(search_window.body_entry),
 			prefs_common.message_search_history);
-#endif
 
 	case_sens = gtk_toggle_button_get_active
 		(GTK_TOGGLE_BUTTON(search_window.case_checkbtn));
diff --git a/src/mimeview.c b/src/mimeview.c
index 3ffdd18..6f50792 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -299,9 +299,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
 	column = gtk_tree_view_get_column(GTK_TREE_VIEW(ctree), cols-1);
 							   
 	renderer = gtk_cell_renderer_text_new();
-#if(GTK_CHECK_VERSION(2,18,0))
 	gtk_cell_renderer_set_alignment(renderer, 1, 0.5);
-#endif
 	cols = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(ctree),
 					-1, titles[COL_SIZE], renderer,
 					"text", COL_SIZE, NULL);
diff --git a/src/plugins/bogofilter/bogofilter_gtk.c b/src/plugins/bogofilter/bogofilter_gtk.c
index fdae7f1..78b4b1a 100644
--- a/src/plugins/bogofilter/bogofilter_gtk.c
+++ b/src/plugins/bogofilter/bogofilter_gtk.c
@@ -186,31 +186,15 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
 	gtk_widget_show(hbox_save_spam);
 	gtk_box_pack_start (GTK_BOX (vbox2), hbox_save_spam, TRUE, TRUE, 0);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	spam_handle_combobox = gtk_combo_box_new_text();
-#else
 	spam_handle_combobox = gtk_combo_box_text_new();
-#endif
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(spam_handle_combobox),
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(spam_handle_combobox),
-#endif
 			_("Delete spam"));
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(spam_handle_combobox),
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(spam_handle_combobox),
-#endif
 			_("Save spam in..."));
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(spam_handle_combobox),
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(spam_handle_combobox),
-#endif
 			_("Only mark as spam"));
 
 	gtk_widget_show(spam_handle_combobox);
diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index ca0da60..08c0044 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -321,10 +321,8 @@ static void fancy_print(MimeViewer *_viewer)
 	/* Config for printing */
 	gtk_print_operation_set_print_settings(op, printing_get_settings());
 	gtk_print_operation_set_default_page_setup(op, printing_get_page_setup());
-#if GTK_CHECK_VERSION(2,18,0)
         /* enable Page Size and Orientation in the print dialog */
 	gtk_print_operation_set_embed_page_setup(op, TRUE);
-#endif
 
 	/* Start printing process */
 	res = webkit_web_frame_print_full(webkit_web_view_get_main_frame(viewer->view),
diff --git a/src/plugins/rssyl/rssyl_feed_props.c b/src/plugins/rssyl/rssyl_feed_props.c
index a425433..14e80f4 100644
--- a/src/plugins/rssyl/rssyl_feed_props.c
+++ b/src/plugins/rssyl/rssyl_feed_props.c
@@ -252,19 +252,10 @@ void rssyl_gtk_prop(RFolderItem *ritem)
 	gtk_entry_set_text(GTK_ENTRY(feedprop->url), ritem->url);
 
 	/* URL auth type combo */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	feedprop->auth_type = gtk_combo_box_new_text();
-	gtk_combo_box_append_text(GTK_COMBO_BOX(feedprop->auth_type),
-#else
 	feedprop->auth_type = gtk_combo_box_text_new();
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(feedprop->auth_type),
-#endif
 			_("No authentication"));
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(feedprop->auth_type),
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(feedprop->auth_type),
-#endif
 			_("HTTP Basic authentication"));
 	gtk_combo_box_set_active(GTK_COMBO_BOX(feedprop->auth_type),
 			ritem->auth->type);
@@ -327,25 +318,12 @@ void rssyl_gtk_prop(RFolderItem *ritem)
 			1, 0);
 
 	/* Silent update - combobox */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	feedprop->silent_update = gtk_combo_box_new_text();
-	gtk_combo_box_append_text(GTK_COMBO_BOX(feedprop->silent_update),
-#else
 	feedprop->silent_update = gtk_combo_box_text_new();
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(feedprop->silent_update),
-#endif
 			_("Always mark it as new"));
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(feedprop->silent_update),
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(feedprop->silent_update),
-#endif
 			_("Only mark it as new if its text has changed"));
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(feedprop->silent_update),
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(feedprop->silent_update),
-#endif
 			_("Never mark it as new"));
 	gtk_combo_box_set_active(GTK_COMBO_BOX(feedprop->silent_update),
 			ritem->silent_update);
diff --git a/src/plugins/vcalendar/vcal_meeting_gtk.c b/src/plugins/vcalendar/vcal_meeting_gtk.c
index 6f58e7d..898f5e9 100644
--- a/src/plugins/vcalendar/vcal_meeting_gtk.c
+++ b/src/plugins/vcalendar/vcal_meeting_gtk.c
@@ -1410,29 +1410,13 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
 
 	times = get_predefined_times();
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	meet->start_time = gtk_combo_box_entry_new_text();
-#else
 	meet->start_time = gtk_combo_box_text_new_with_entry();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(meet->start_time), -1);
-#if !GTK_CHECK_VERSION(2, 24, 0)	
-	combobox_set_popdown_strings(GTK_COMBO_BOX(meet->start_time), times);
-#else	
 	combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(meet->start_time), times);
-#endif
 	
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	meet->end_time = gtk_combo_box_entry_new_text();
-#else
 	meet->end_time = gtk_combo_box_text_new_with_entry();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(meet->end_time), -1);
-#if !GTK_CHECK_VERSION(2, 24, 0)	
-	combobox_set_popdown_strings(GTK_COMBO_BOX(meet->end_time), times);
-#else	
 	combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(meet->end_time), times);
-#endif
 
 	list_free_strings(times);
 	g_list_free(times);
diff --git a/src/prefs_display_header.c b/src/prefs_display_header.c
index 385f32c..ab1ec19 100644
--- a/src/prefs_display_header.c
+++ b/src/prefs_display_header.c
@@ -277,17 +277,9 @@ static void prefs_display_header_create(void)
 	gtk_widget_show (hdr_label);
 	gtk_box_pack_start (GTK_BOX (hbox1), hdr_label, FALSE, FALSE, 0);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	hdr_combo = gtk_combo_box_entry_new_text();
-#else
 	hdr_combo = gtk_combo_box_text_new_with_entry();
-#endif
 	for(i=0; i < 9 ; i++)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		gtk_combo_box_append_text(GTK_COMBO_BOX (hdr_combo),
-#else
 		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (hdr_combo),
-#endif
 			(*defaults[i] == '-') ? defaults[i]+1 : defaults[i]);
 	gtk_combo_box_set_active(GTK_COMBO_BOX(hdr_combo), 0);
 	gtk_widget_show (hdr_combo);
@@ -589,11 +581,7 @@ static void prefs_display_header_list_view_set_row(gboolean hidden)
 	gchar *entry_text;
 	GtkTreeModel *model;
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	entry_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(dispheader.hdr_combo));
-#else
 	entry_text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(dispheader.hdr_combo));
-#endif
 	if (!entry_text)
 		entry_text = gtk_editable_get_chars(
 				GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(dispheader.hdr_combo))),0,-1);
diff --git a/src/prefs_filtering_action.c b/src/prefs_filtering_action.c
index 587a418..6f8e98c 100644
--- a/src/prefs_filtering_action.c
+++ b/src/prefs_filtering_action.c
@@ -488,22 +488,14 @@ static void prefs_filtering_action_create(void)
 	gtk_table_attach(GTK_TABLE(table), hbox1, 1, 2, 1, 2, 
 			 GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	account_combo = gtk_combo_box_new_text ();
-#else
 	account_combo = gtk_combo_box_text_new ();
-#endif
 	gtk_size_group_add_widget(size_action, account_combo);
 
 	for (accounts = account_get_list() ; accounts != NULL;
 	     accounts = accounts->next) {
 		PrefsAccount *ac = (PrefsAccount *)accounts->data;
 		gchar *name = g_strdup(ac->account_name);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		gtk_combo_box_append_text(GTK_COMBO_BOX(account_combo), (gpointer) name);
-#else
 		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(account_combo), (gpointer) name);
-#endif
 		g_free(name);
 	}
 
@@ -541,22 +533,14 @@ static void prefs_filtering_action_create(void)
 	gtk_box_pack_start(GTK_BOX(hbox1), color_optmenu, FALSE, FALSE, 0);
 #endif
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	tags_combo = gtk_combo_box_new_text ();
-#else
 	tags_combo = gtk_combo_box_text_new ();
-#endif
 	gtk_size_group_add_widget(size_action, tags_combo);
 
 	for (tmp = tags = tags_get_list() ; tmp != NULL;
 	     tmp = tmp->next) {
 		gchar *name = g_strdup(tags_get_tag(GPOINTER_TO_INT(tmp->data)));
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		gtk_combo_box_append_text(GTK_COMBO_BOX(tags_combo), (gpointer) name);
-#else
 		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(tags_combo), (gpointer) name);
-#endif
 		g_free(name);
 	}
 	g_slist_free(tags);
@@ -987,11 +971,7 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
 		break;
 	case ACTION_SET_TAG:
 	case ACTION_UNSET_TAG:
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		destination = gtk_combo_box_get_active_text(GTK_COMBO_BOX(filtering_action.tags_combo));
-#else
 		destination = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(filtering_action.tags_combo));
-#endif
 		if (!destination || *destination == '\0') {
 			if (alert)
                                 alertpanel_error(_("Tag name is empty."));
@@ -1327,11 +1307,7 @@ static void prefs_filtering_action_enable_widget(GtkWidget* widget, const gboole
 
 	if(enable == TRUE)
 	{
-#if !GTK_CHECK_VERSION(2,24,0)
-		if(GTK_IS_COMBO_BOX(widget) || GTK_IS_COMBO_BOX_ENTRY(widget))
-#else
 		if(GTK_IS_COMBO_BOX(widget))
-#endif
 			gtk_combo_box_set_active(GTK_COMBO_BOX(widget), 0);
 		else if(GTK_IS_SPIN_BUTTON(widget))
 			gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), 0);
diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 602ba77..7cdc193 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -650,15 +650,11 @@ static void prefs_matcher_create(void)
 	gtk_box_pack_start(GTK_BOX(upper_hbox), criteria_label2, FALSE, FALSE, 0);
 
 	/* headers combo box entry */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	headers_combo = gtk_combo_box_entry_new_with_model(matcher.model_headers, 0);
-#else
 	headers_combo = gtk_combo_box_new_with_model_and_entry(matcher.model_headers);
 	GtkCellRenderer *cell = gtk_cell_renderer_text_new();
 	gtk_cell_renderer_set_alignment(cell, 0.0, 0.5);
 	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(headers_combo), cell, TRUE);
 	gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(headers_combo), 0);
-#endif
 	gtk_widget_set_size_request(headers_combo, 100, -1);
 	gtk_box_pack_start(GTK_BOX(upper_hbox), headers_combo, TRUE, TRUE, 0);
 	header_entry = gtk_bin_get_child(GTK_BIN((headers_combo)));
diff --git a/src/prefs_other.c b/src/prefs_other.c
index 1ea901a..56ef885 100644
--- a/src/prefs_other.c
+++ b/src/prefs_other.c
@@ -409,11 +409,7 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
 		{"<Actions>/Menu/Edit/Advanced/DelForwWord",		"<alt>D"}, /* - */
 	};
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(keybind.combo));
-#else
 	text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(keybind.combo));
-#endif
 
 	if (!strcmp(text, _("Default"))) {
 		menurc = default_menurc;
diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c
index e8ce780..4586cf3 100644
--- a/src/prefs_toolbar.c
+++ b/src/prefs_toolbar.c
@@ -378,11 +378,7 @@ static void prefs_toolbar_set_displayed(ToolbarPage *prefs_toolbar)
 
 static void add_item_to_plugin_combo(gpointer key, gpointer data, gpointer combo_box)
 {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), (const gchar*)key);
-#else
 	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), (const gchar*)key);
-#endif
 }
 
 static void prefs_toolbar_populate(ToolbarPage *prefs_toolbar)
@@ -392,13 +388,8 @@ static void prefs_toolbar_populate(ToolbarPage *prefs_toolbar)
 	GHashTable **hash;
 
 	prefs_toolbar->combo_action_list = toolbar_get_action_items(prefs_toolbar->source);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	combobox_set_popdown_strings(GTK_COMBO_BOX(prefs_toolbar->item_func_combo),
-				     prefs_toolbar->combo_action_list);
-#else
 	combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(prefs_toolbar->item_func_combo),
 				     prefs_toolbar->combo_action_list);
-#endif
 
 	/* get currently defined sylpheed actions */
 	if (prefs_common.actions_list != NULL) {
@@ -406,13 +397,8 @@ static void prefs_toolbar_populate(ToolbarPage *prefs_toolbar)
 			act = (gchar *)cur->data;
 			get_action_name(act, &act_name);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-			gtk_combo_box_append_text(
-				GTK_COMBO_BOX(prefs_toolbar->item_action_combo),
-#else
 			gtk_combo_box_text_append_text(
 				GTK_COMBO_BOX_TEXT(prefs_toolbar->item_action_combo),
-#endif
 				act_name);
 
 			g_free(act_name);
@@ -534,11 +520,7 @@ static void prefs_toolbar_register(GtkButton *button, ToolbarPage *prefs_toolbar
 		}
 
 		if (item_type == ITEM_FUNCTION) {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-			event = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
-#else
 			event = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(
-#endif
 						prefs_toolbar->item_func_combo));
 
 			if (is_duplicate(prefs_toolbar, event)) {
@@ -624,11 +606,7 @@ static void prefs_toolbar_substitute(GtkButton *button, ToolbarPage *prefs_toolb
 						  -1);
 
 		if (item_type == ITEM_FUNCTION) {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-			icon_event = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
-#else
 			icon_event = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(
-#endif
 						prefs_toolbar->item_func_combo));
 
 			if (is_duplicate(prefs_toolbar, icon_event)
@@ -822,11 +800,7 @@ static void item_type_changed(GtkComboBox *item_type_combo,
 static void action_selection_changed(GtkComboBox *action_combo,
 				ToolbarPage *prefs_toolbar)
 {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gchar *text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
-#else
 	gchar *text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(
-#endif
 			   prefs_toolbar->item_action_combo));
 
 	if(text != NULL) { /* action */
@@ -838,11 +812,7 @@ static void action_selection_changed(GtkComboBox *action_combo,
 static void plugin_selection_changed(GtkComboBox *action_combo,
                 ToolbarPage *prefs_toolbar)
 {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gchar *text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(prefs_toolbar->item_plugin_combo));
-#else
 	gchar *text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(prefs_toolbar->item_plugin_combo));
-#endif
 
 	if (text != NULL) { /* action */
 		gtk_entry_set_text(GTK_ENTRY(prefs_toolbar->item_text_entry), text);
@@ -853,11 +823,7 @@ static void plugin_selection_changed(GtkComboBox *action_combo,
 static void func_selection_changed(GtkComboBox *action_combo,
 				ToolbarPage *prefs_toolbar)
 {
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	gchar *text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
-#else
 	gchar *text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(
-#endif
 			   prefs_toolbar->item_func_combo));
 
 	if(text != NULL) { /* action */
@@ -968,33 +934,21 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar)
 			  (GtkAttachOptions) (GTK_FILL),
 			  (GtkAttachOptions) (0), 0, 0);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	item_action_combo = gtk_combo_box_new_text();
-#else
 	item_action_combo = gtk_combo_box_text_new();
-#endif
 	gtk_widget_set_size_request(item_action_combo, 200, -1);
 	gtk_table_attach (GTK_TABLE (table), item_action_combo, 1, 3, 1, 2,
 			  (GtkAttachOptions) (GTK_FILL),
 			  (GtkAttachOptions) (0), 0, 0);
 
 	/* available internal functions */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	item_func_combo = gtk_combo_box_new_text();
-#else
 	item_func_combo = gtk_combo_box_text_new();
-#endif
 	gtk_widget_set_size_request(item_func_combo, 200, -1);
 	gtk_table_attach (GTK_TABLE (table), item_func_combo, 1, 3, 1, 2,
 			  (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 			  (GtkAttachOptions) (0), 0, 0);
 
 	/* plugin-registered items */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	item_plugin_combo = gtk_combo_box_new_text();
-#else
 	item_plugin_combo = gtk_combo_box_text_new();
-#endif
 	gtk_widget_set_size_request(item_plugin_combo, 200, -1);
 	gtk_table_attach(GTK_TABLE(table), item_plugin_combo, 1, 3, 1, 2,
 			 (GtkAttachOptions) (GTK_FILL),
diff --git a/src/printing.c b/src/printing.c
index 27030b4..3ea1ab4 100644
--- a/src/printing.c
+++ b/src/printing.c
@@ -279,10 +279,8 @@ void printing_print_full(GtkWindow *parent, PrintRenderer *renderer, gpointer re
 	/* Config for printing */
 	gtk_print_operation_set_print_settings(op, settings);
 	gtk_print_operation_set_default_page_setup(op, page_setup);
-#if GTK_CHECK_VERSION(2,18,0)
         /* enable Page Size and Orientation in the print dialog */
 	gtk_print_operation_set_embed_page_setup(op, TRUE);
-#endif
 	/* signals */
 	g_signal_connect(op, "begin_print", G_CALLBACK(renderer->cb_begin_print), print_data);
 	g_signal_connect(op, "draw_page", G_CALLBACK(renderer->cb_draw_page), print_data);
diff --git a/src/summary_search.c b/src/summary_search.c
index ce7b727..40f7d6a 100644
--- a/src/summary_search.c
+++ b/src/summary_search.c
@@ -165,27 +165,15 @@ static gchar* add_history_get(GtkWidget *from, GList **history)
 {
 	gchar *result;
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	result = gtk_combo_box_get_active_text(GTK_COMBO_BOX(from));
-#else
 	result = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(from));
-#endif
 	if (!result)
 		result = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(from))), 0, -1);
 
 	if (result && result[0] != '\0') {
 		/* add to history */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_unset_popdown_strings(GTK_COMBO_BOX(from));
-#else
 		combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(from));
-#endif
 		*history = add_history(*history, result);
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(from), *history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(from), *history);
-#endif
 
 		return result;
 	} else {
@@ -341,20 +329,11 @@ static void summary_search_create(void)
 	gtk_table_set_row_spacings (GTK_TABLE (table1), 8);
 	gtk_table_set_col_spacings (GTK_TABLE (table1), 8);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	from_entry = gtk_combo_box_entry_new_text ();
-#else
 	from_entry = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(from_entry), -1);
 	if (prefs_common.summary_search_from_history)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(from_entry),
-				prefs_common.summary_search_from_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(from_entry),
 				prefs_common.summary_search_from_history);
-#endif
 	gtk_widget_show (from_entry);
 	gtk_table_attach (GTK_TABLE (table1), from_entry, 1, 3, 0, 1,
 			  GTK_EXPAND|GTK_FILL, 0, 0, 0);
@@ -365,20 +344,11 @@ static void summary_search_create(void)
 	g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((from_entry)))),
 			 "focus_out_event", G_CALLBACK(from_entry_focus_evt_out), NULL);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	to_entry = gtk_combo_box_entry_new_text ();
-#else
 	to_entry = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(to_entry), -1);
 	if (prefs_common.summary_search_to_history)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(to_entry),
-				prefs_common.summary_search_to_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(to_entry),
 				prefs_common.summary_search_to_history);
-#endif
 	gtk_widget_show (to_entry);
 	gtk_table_attach (GTK_TABLE (table1), to_entry, 1, 3, 1, 2,
 			  GTK_EXPAND|GTK_FILL, 0, 0, 0);
@@ -389,20 +359,11 @@ static void summary_search_create(void)
 	g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((to_entry)))),
 			 "focus_out_event", G_CALLBACK(to_entry_focus_evt_out), NULL);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	subject_entry = gtk_combo_box_entry_new_text ();
-#else
 	subject_entry = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(subject_entry), -1);
 	if (prefs_common.summary_search_subject_history)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(subject_entry),
-				prefs_common.summary_search_subject_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(subject_entry),
 				prefs_common.summary_search_subject_history);
-#endif
 	gtk_widget_show (subject_entry);
 	gtk_table_attach (GTK_TABLE (table1), subject_entry, 1, 3, 2, 3,
 			  GTK_EXPAND|GTK_FILL, 0, 0, 0);
@@ -413,20 +374,11 @@ static void summary_search_create(void)
 	g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((subject_entry)))),
 			 "focus_out_event", G_CALLBACK(subject_entry_focus_evt_out), NULL);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	body_entry = gtk_combo_box_entry_new_text ();
-#else
 	body_entry = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(body_entry), -1);
 	if (prefs_common.summary_search_body_history)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(body_entry),
-				prefs_common.summary_search_body_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(body_entry),
 				prefs_common.summary_search_body_history);
-#endif
 	gtk_widget_show (body_entry);
 	gtk_table_attach (GTK_TABLE (table1), body_entry, 1, 3, 3, 4,
 			  GTK_EXPAND|GTK_FILL, 0, 0, 0);
@@ -437,20 +389,11 @@ static void summary_search_create(void)
 	g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((body_entry)))),
 			 "focus_out_event", G_CALLBACK(body_entry_focus_evt_out), NULL);
 
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	adv_condition_entry = gtk_combo_box_entry_new_text ();
-#else
 	adv_condition_entry = gtk_combo_box_text_new_with_entry ();
-#endif
 	gtk_combo_box_set_active(GTK_COMBO_BOX(adv_condition_entry), -1);
 	if (prefs_common.summary_search_adv_condition_history)
-#if !GTK_CHECK_VERSION(2, 24, 0)
-		combobox_set_popdown_strings(GTK_COMBO_BOX(adv_condition_entry),
-				prefs_common.summary_search_adv_condition_history);
-#else
 		combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(adv_condition_entry),
 				prefs_common.summary_search_adv_condition_history);
-#endif
 	gtk_widget_show (adv_condition_entry);
 	gtk_table_attach (GTK_TABLE (table1), adv_condition_entry, 1, 2, 4, 5,
 			  GTK_EXPAND|GTK_FILL, 0, 0, 0);
@@ -965,11 +908,7 @@ static void adv_condition_btn_clicked(GtkButton *button, gpointer data)
 
 	/* re-use the current search value if it's a condition expression,
 	   otherwise ignore it silently */
-#if !GTK_CHECK_VERSION(2, 24, 0)
-	cond_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.adv_condition_entry));
-#else
 	cond_str = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.adv_condition_entry));
-#endif
 	if (cond_str && *cond_str != '\0') {
 		matchers = matcher_parser_get_cond((gchar*)cond_str, NULL);
 	}

commit 643edf05442da249656aabe85a41194c5cd62b89
Author: Ralph Sennhauser <ralph.sennhauser at gmail.com>
Date:   Wed Nov 8 20:12:27 2017 +0100

    Require gtk+ >= 2.24
    
    gtk+-2.24.0 was released 2011-01-30 and has seen over 30 maintenance
    releases since. Drop support for gtk+2 < 2.24 to ease porting to gtk+3
    and to cleanup existing compatibility code for old gtk+2 releases.
    
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser at gmail.com>

diff --git a/configure.ac b/configure.ac
index cafaf1e..03f8718 100644
--- a/configure.ac
+++ b/configure.ac
@@ -573,7 +573,7 @@ if test x"$enable_gtk3" = x"yes"; then
 	AM_CONDITIONAL(GTK3, true)
 	AM_CONDITIONAL(GTK2, false)
 else
-	PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16)
+	PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.24)
 fi
 AC_ARG_ENABLE(deprecated,
 		[  --disable-deprecated            Disable deprecated GTK functions],

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list