[Commits] [SCM] claws branch, master, updated. 3.17.0-153-gf4607b4

claws at claws-mail.org claws at claws-mail.org
Wed Nov 7 12:46:38 CET 2018


The branch, master has been updated
       via  f4607b4b60f88fecd36f0c67c5d02462b8229a5f (commit)
      from  e6df99dfbc3e0c08b1d2a62aa8511cc981fca28f (commit)

Summary of changes:
 src/action.c                     |    7 --
 src/addr_compl.c                 |    8 --
 src/gtk/colorlabel.c             |   20 +----
 src/gtk/foldersort.c             |   10 ---
 src/gtk/gtkcmclist.c             |  162 +-------------------------------------
 src/gtk/gtkcmclist.h             |   13 ---
 src/gtk/gtkcmctree.c             |   14 ----
 src/gtk/gtkshruler.c             |   68 ----------------
 src/gtk/gtkutils.c               |    6 --
 src/gtk/logwindow.c              |    4 -
 src/gtk/menu.c                   |    4 -
 src/gtk/menu.h                   |    4 -
 src/gtk/quicksearch.c            |   12 ---
 src/gtk/spell_entry.c            |   30 -------
 src/main.c                       |    6 --
 src/mainwindow.c                 |    4 -
 src/plugins/dillo/dillo_viewer.c |    7 --
 src/prefs_account.c              |   32 --------
 src/prefs_filtering_action.c     |   26 ------
 src/prefs_folder_item.c          |    8 --
 src/prefs_matcher.c              |   32 --------
 src/printing.c                   |   23 ------
 src/statusbar.c                  |    2 -
 src/stock_pixmap.c               |   16 ----
 src/summary_search.c             |    2 -
 25 files changed, 2 insertions(+), 518 deletions(-)


- Log -----------------------------------------------------------------
commit f4607b4b60f88fecd36f0c67c5d02462b8229a5f
Author: Paul <paul at claws-mail.org>
Date:   Wed Nov 7 11:46:34 2018 +0000

    remove all gtk3 conditionals

diff --git a/src/action.c b/src/action.c
index af62f37..46d50f3 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1374,15 +1374,8 @@ static void create_io_dialog(Children *children)
 #endif
 		
 		progress_bar = gtk_progress_bar_new();
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress_bar),
 				GTK_PROGRESS_LEFT_TO_RIGHT);
-#else
-		gtk_orientable_set_orientation(GTK_ORIENTABLE(progress_bar),
-				GTK_ORIENTATION_HORIZONTAL);
-		gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(progress_bar),
-				FALSE);
-#endif
 		text = g_strdup_printf(format, _("Completed"), 
 		                       children->initial_nb);
 		gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar),
diff --git a/src/addr_compl.c b/src/addr_compl.c
index 713fd50..0853408 100644
--- a/src/addr_compl.c
+++ b/src/addr_compl.c
@@ -948,11 +948,7 @@ static void addrcompl_resize_window( CompletionWindow *cw ) {
 	gint x, y, width, height, depth;
 
 	/* Get current geometry of window */
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gdk_window_get_geometry( gtk_widget_get_window( cw->window ), &x, &y, &width, &height, &depth );
-#else
-	gdk_window_get_geometry( gtk_widget_get_window( cw->window ), &x, &y, &width, &height );
-#endif
 
 	gtk_widget_queue_resize_no_redraw(cw->list_view);
 	gtk_widget_size_request( cw->list_view, &r );
@@ -1475,11 +1471,7 @@ static void address_completion_create_completion_window( GtkEntry *entry_ )
 		GTK_SHADOW_OUT);
 	/* Use entry widget to create initial window */
 	gdkwin = gtk_widget_get_window(entry),
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gdk_window_get_geometry(gdkwin, &x, &y, &width, &height, &depth);
-#else
-	gdk_window_get_geometry(gdkwin, &x, &y, &width, &height);
-#endif
 	gdk_window_get_origin (gdkwin, &x, &y);
 	y += height;
 	gtk_window_move(GTK_WINDOW(window), x, y);
diff --git a/src/gtk/colorlabel.c b/src/gtk/colorlabel.c
index 78130ae..2703096 100644
--- a/src/gtk/colorlabel.c
+++ b/src/gtk/colorlabel.c
@@ -189,26 +189,18 @@ gchar *colorlabel_get_color_default_text(gint color_index)
 }
 
 static gboolean colorlabel_drawing_area_expose_event_cb
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	(GtkWidget *widget, GdkEventExpose *expose, gpointer data)
-#else
-	(GtkWidget *widget, cairo_t *cr, gpointer data)
-#endif
 {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_t *cr;
 	GdkWindow *drawable = gtk_widget_get_window(widget);
-#endif
 	GtkAllocation allocation;
 	gulong c = (gulong) GPOINTER_TO_INT(data);
 	GdkColor color;
 
 	INTCOLOR_TO_GDKCOLOR(c, color)
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gdk_colormap_alloc_color(gtk_widget_get_colormap(widget), &color, FALSE, TRUE);
 	cr = gdk_cairo_create(drawable);
-#endif
 	gtk_widget_get_allocation(widget, &allocation);
 
 	cairo_set_source_rgb(cr, 0., 0., 0.);
@@ -221,10 +213,8 @@ static gboolean colorlabel_drawing_area_expose_event_cb
 	    allocation.width - 2,
 	    allocation.height - 2);
 	cairo_fill(cr);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_destroy(cr);
-#endif
-	
+
 	return FALSE;
 }
 
@@ -241,19 +231,11 @@ static GtkWidget *colorlabel_create_color_widget(GdkColor color)
 			 (CL(g) << (gulong)  8) | \
 			 (CL(b)))
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	g_signal_connect(G_OBJECT(widget), "expose_event", 
 			 G_CALLBACK
 			   	(colorlabel_drawing_area_expose_event_cb),
 			 GINT_TO_POINTER
 			   	((gint)CR(color.red, color.green, color.blue)));
-#else
-	g_signal_connect(G_OBJECT(widget), "draw", 
-			 G_CALLBACK
-			   	(colorlabel_drawing_area_expose_event_cb),
-			 GINT_TO_POINTER
-			   	((gint)CR(color.red, color.green, color.blue)));
-#endif
 
 	return widget;
 }
diff --git a/src/gtk/foldersort.c b/src/gtk/foldersort.c
index fe5717d..9c5eb69 100644
--- a/src/gtk/foldersort.c
+++ b/src/gtk/foldersort.c
@@ -110,9 +110,7 @@ static void moveup_clicked(GtkWidget *widget, FolderSortDialog *dialog)
 	GtkTreeSelection *sel;
 	GtkTreeModel *model;
 	GtkTreeIter iter, previter;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkTreePath *path;
-#endif
 
 	/* Get currently selected iter */
 	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->folderlist));
@@ -120,13 +118,6 @@ static void moveup_clicked(GtkWidget *widget, FolderSortDialog *dialog)
 		return;
 
 	/* Now get the iter above it, if any */
-#if GTK_CHECK_VERSION(3, 0, 0)
-	previter = iter;
-	if (!gtk_tree_model_iter_previous(model, &previter)) {
-		/* No previous iter, are we already on top? */
-		return;
-	}
-#else
 	/* GTK+2 does not have gtk_tree_model_iter_previous(), so
 	 * we have to get through GtkPath */
 	path = gtk_tree_model_get_path(model, &iter);
@@ -143,7 +134,6 @@ static void moveup_clicked(GtkWidget *widget, FolderSortDialog *dialog)
 	}
 
 	gtk_tree_path_free(path);
-#endif
 
 	gtk_list_store_move_before(GTK_LIST_STORE(model), &iter, &previter);
 
diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index 3009e39..d3bb336 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -175,13 +175,6 @@ enum {
   ARG_REORDERABLE,
   ARG_USE_DRAG_ICONS,
   ARG_SORT_TYPE
-#if GTK_CHECK_VERSION(3, 0, 0)
-  ,
-  ARG_HADJUSTMENT,
-  ARG_VADJUSTMENT,
-  ARG_HADJUSTMENT_POLICY,
-  ARG_VADJUSTMENT_POLICY
-#endif
 };
 
 /* GtkCMCList Methods */
@@ -192,11 +185,7 @@ static GObject* gtk_cmclist_constructor (GType                  type,
 				       GObjectConstructParam *construct_params);
 
 /* GtkObject Methods */
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static void gtk_cmclist_destroy  (GtkObject *object);
-#else
-static void gtk_cmclist_destroy  (GtkWidget *object);
-#endif
 static void gtk_cmclist_finalize (GObject   *object);
 static void gtk_cmclist_set_arg  (GObject *object,
 				guint      arg_id,
@@ -208,36 +197,21 @@ static void gtk_cmclist_get_arg  (GObject *object,
 				GParamSpec *spec);
 
 /* GtkWidget Methods */
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static void gtk_cmclist_set_scroll_adjustments (GtkCMCList      *clist,
 					      GtkAdjustment *hadjustment,
 					      GtkAdjustment *vadjustment);
-#endif
 static void gtk_cmclist_realize         (GtkWidget        *widget);
 static void gtk_cmclist_unrealize       (GtkWidget        *widget);
 static void gtk_cmclist_map             (GtkWidget        *widget);
 static void gtk_cmclist_unmap           (GtkWidget        *widget);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gint gtk_cmclist_expose          (GtkWidget        *widget,
                                          GdkEventExpose   *event);
-#else
-static gint gtk_cmclist_expose          (GtkWidget *widget,
-                                         cairo_t *event);
-#endif
 static gint gtk_cmclist_button_press    (GtkWidget        *widget,
 				       GdkEventButton   *event);
 static gint gtk_cmclist_button_release  (GtkWidget        *widget,
 				       GdkEventButton   *event);
 static gint gtk_cmclist_motion          (GtkWidget        *widget, 
 			               GdkEventMotion   *event);
-#if GTK_CHECK_VERSION(3, 0, 0)
-static void gtk_cmclist_get_preferred_height (GtkWidget *widget,
-                                 gint      *minimal_height,
-                                 gint      *natural_height);
-static void gtk_cmclist_get_preferred_width (GtkWidget *widget,
-                                 gint      *minimal_width,
-                                 gint      *natural_width);
-#endif
 static void gtk_cmclist_size_request    (GtkWidget        *widget,
 				       GtkRequisition   *requisition);
 static void gtk_cmclist_size_allocate   (GtkWidget        *widget,
@@ -480,7 +454,6 @@ static guint clist_signals[LAST_SIGNAL] = {0};
 
 static const GtkTargetEntry clist_target_table = { "gtk-clist-drag-reorder", 0, 0};
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gpointer gtk_cmclist_parent_class = NULL;
 
 GType
@@ -512,41 +485,26 @@ gtk_cmclist_get_type (void)
 
   return clist_type;
 }
-#else
-G_DEFINE_TYPE_WITH_CODE (GtkCMCList, gtk_cmclist, GTK_TYPE_CONTAINER,
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE,
-                         NULL))
-#endif
 
 static void
 gtk_cmclist_class_init (GtkCMCListClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
-#if !GTK_CHECK_VERSION(3, 0, 0)
   GtkObjectClass *gtk_object_class;
-#endif
   GtkWidgetClass *widget_class;
   GtkContainerClass *container_class;
   GtkBindingSet *binding_set;
 
   object_class->constructor = gtk_cmclist_constructor;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
   gtk_object_class = (GtkObjectClass *) klass;
-#endif
   widget_class = (GtkWidgetClass *) klass;
   container_class = (GtkContainerClass *) klass;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
   gtk_cmclist_parent_class = g_type_class_peek (GTK_TYPE_CONTAINER);
-#endif
 
   object_class->finalize = gtk_cmclist_finalize;
-#if !GTK_CHECK_VERSION(3, 0, 0)
   gtk_object_class->destroy = gtk_cmclist_destroy;
-#else
-  widget_class->destroy = gtk_cmclist_destroy;
-#endif
   object_class->set_property = gtk_cmclist_set_arg;
   object_class->get_property = gtk_cmclist_get_arg;
   
@@ -558,17 +516,8 @@ gtk_cmclist_class_init (GtkCMCListClass *klass)
   widget_class->button_press_event = gtk_cmclist_button_press;
   widget_class->button_release_event = gtk_cmclist_button_release;
   widget_class->motion_notify_event = gtk_cmclist_motion;
-#if !GTK_CHECK_VERSION(3, 0, 0)
   widget_class->expose_event = gtk_cmclist_expose;
-#else
-  widget_class->draw = gtk_cmclist_expose;
-#endif
-#if !GTK_CHECK_VERSION(3, 0, 0)
   widget_class->size_request = gtk_cmclist_size_request;
-#else
-  widget_class->get_preferred_width = gtk_cmclist_get_preferred_width;
-  widget_class->get_preferred_height = gtk_cmclist_get_preferred_height;
-#endif
   widget_class->size_allocate = gtk_cmclist_size_allocate;
   widget_class->focus_in_event = gtk_cmclist_focus_in;
   widget_class->focus_out_event = gtk_cmclist_focus_out;
@@ -588,9 +537,7 @@ gtk_cmclist_class_init (GtkCMCListClass *klass)
   container_class->forall = gtk_cmclist_forall;
   container_class->set_focus_child = gtk_cmclist_set_focus_child;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
   klass->set_scroll_adjustments = gtk_cmclist_set_scroll_adjustments;
-#endif
   klass->refresh = clist_refresh;
   klass->select_row = real_select_row;
   klass->unselect_row = real_unselect_row;
@@ -679,7 +626,6 @@ gtk_cmclist_class_init (GtkCMCListClass *klass)
 				"sort-type",
 				GTK_TYPE_SORT_TYPE, 0,
 				G_PARAM_READWRITE));
-#if !GTK_CHECK_VERSION(3, 0, 0)
   widget_class->set_scroll_adjustments_signal =
  		g_signal_new ("set_scroll_adjustments",
 			      G_TYPE_FROM_CLASS (object_class),
@@ -689,13 +635,6 @@ gtk_cmclist_class_init (GtkCMCListClass *klass)
 			      claws_marshal_VOID__OBJECT_OBJECT,
 			      G_TYPE_NONE, 2,
 			      GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
-#else
-  /* Scrollable interface properties */
-  g_object_class_override_property (object_class, ARG_HADJUSTMENT, "hadjustment");
-  g_object_class_override_property (object_class, ARG_VADJUSTMENT, "vadjustment");
-  g_object_class_override_property (object_class, ARG_HADJUSTMENT_POLICY, "hscroll-policy");
-  g_object_class_override_property (object_class, ARG_VADJUSTMENT_POLICY, "vscroll-policy");
-#endif
 
   clist_signals[SELECT_ROW] =
  		g_signal_new ("select_row",
@@ -1047,17 +986,6 @@ gtk_cmclist_set_arg (GObject *object,
     case ARG_SORT_TYPE:
       gtk_cmclist_set_sort_type (clist, g_value_get_enum (value));
       break;
-#if GTK_CHECK_VERSION(3, 0, 0)
-    case ARG_HADJUSTMENT:
-      gtk_cmclist_set_hadjustment (clist, g_value_get_object (value));
-      break;
-    case ARG_VADJUSTMENT:
-      gtk_cmclist_set_vadjustment (clist, g_value_get_object (value));
-      break;
-    case ARG_HADJUSTMENT_POLICY:
-    case ARG_VADJUSTMENT_POLICY:
-      break;
-#endif
     }
 }
 
@@ -1106,18 +1034,6 @@ gtk_cmclist_get_arg (GObject *object,
     case ARG_SORT_TYPE:
       g_value_set_enum(value, clist->sort_type);
       break;
-#if GTK_CHECK_VERSION(3, 0, 0)
-    case ARG_HADJUSTMENT:
-      g_value_set_object(value, gtk_cmclist_get_hadjustment(clist));
-      break;
-    case ARG_VADJUSTMENT:
-      g_value_set_object(value, gtk_cmclist_get_vadjustment(clist));
-      break;
-    case ARG_HADJUSTMENT_POLICY:
-    case ARG_VADJUSTMENT_POLICY:
-      g_value_set_enum(value, GTK_SCROLL_NATURAL);
-      break;
-#endif
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, arg_id, spec);
       break;
@@ -1349,7 +1265,6 @@ gtk_cmclist_get_vadjustment (GtkCMCList *clist)
   return clist->vadjustment;
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static void
 gtk_cmclist_set_scroll_adjustments (GtkCMCList      *clist,
 				  GtkAdjustment *hadjustment,
@@ -1360,7 +1275,6 @@ gtk_cmclist_set_scroll_adjustments (GtkCMCList      *clist,
   if (clist->vadjustment != vadjustment)
     gtk_cmclist_set_vadjustment (clist, vadjustment);
 }
-#endif
 
 void
 gtk_cmclist_set_shadow_type (GtkCMCList      *clist,
@@ -3366,11 +3280,9 @@ gtk_cmclist_set_foreground (GtkCMCList       *clist,
     {
       clist_row->foreground = *color;
       clist_row->fg_set = TRUE;
-#if !GTK_CHECK_VERSION(3, 0, 0)
       if (gtk_widget_get_realized (GTK_WIDGET(clist)))
 	gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (clist)),
 			 &clist_row->foreground, TRUE, TRUE);
-#endif
     }
   else
     clist_row->fg_set = FALSE;
@@ -3397,11 +3309,9 @@ gtk_cmclist_set_background (GtkCMCList       *clist,
     {
       clist_row->background = *color;
       clist_row->bg_set = TRUE;
-#if !GTK_CHECK_VERSION(3, 0, 0)
       if (gtk_widget_get_realized (GTK_WIDGET(clist)))
 	gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (clist)),
 			 &clist_row->background, TRUE, TRUE);
-#endif
     }
   else
     clist_row->bg_set = FALSE;
@@ -4509,11 +4419,7 @@ sync_selection (GtkCMCList *clist,
  *   gtk_cmclist_finalize
  */
 static void
-#if !GTK_CHECK_VERSION(3, 0, 0)
 gtk_cmclist_destroy (GtkObject *object)
-#else
-gtk_cmclist_destroy (GtkWidget *object)
-#endif
 {
   gint i;
   GtkCMCList *clist;
@@ -4561,13 +4467,8 @@ gtk_cmclist_destroy (GtkWidget *object)
 	clist->column[i].button = NULL;
       }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
   if (GTK_OBJECT_CLASS (gtk_cmclist_parent_class)->destroy)
     (*GTK_OBJECT_CLASS (gtk_cmclist_parent_class)->destroy) (object);
-#else
-  if (GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->destroy)
-    (*GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->destroy) (object);
-#endif
 }
 
 static void
@@ -4629,19 +4530,13 @@ gtk_cmclist_realize (GtkWidget *widget)
   attributes.height = allocation.height - border_width * 2;
   attributes.wclass = GDK_INPUT_OUTPUT;
   attributes.visual = gtk_widget_get_visual (widget);
-#if !GTK_CHECK_VERSION(3, 0, 0)
   attributes.colormap = gtk_widget_get_colormap (widget);
-#endif
   attributes.event_mask = gtk_widget_get_events (widget);
   attributes.event_mask |= (GDK_EXPOSURE_MASK |
 			    GDK_BUTTON_PRESS_MASK |
 			    GDK_BUTTON_RELEASE_MASK |
 			    GDK_KEY_RELEASE_MASK);
-#if !GTK_CHECK_VERSION(3, 0, 0)
   attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
-#else
-  attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
-#endif
 
   /* main window */
   window = gdk_window_new (gtk_widget_get_parent_window (widget),
@@ -4737,7 +4632,6 @@ gtk_cmclist_realize (GtkWidget *widget)
 	clist_row->style = gtk_style_attach (clist_row->style,
 					     clist->clist_window);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
       if (clist_row->fg_set || clist_row->bg_set)
 	{
 	  GdkColormap *colormap;
@@ -4748,8 +4642,7 @@ gtk_cmclist_realize (GtkWidget *widget)
 	  if (clist_row->bg_set)
 	    gdk_colormap_alloc_color (colormap, &clist_row->background, TRUE, TRUE);
 	}
-#endif
-      
+
       for (j = 0; j < clist->columns; j++)
 	if  (clist_row->cell[j].style)
 	  clist_row->cell[j].style =
@@ -4919,15 +4812,9 @@ gtk_cmclist_unmap (GtkWidget *widget)
     }
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gint
 gtk_cmclist_expose (GtkWidget      *widget,
 		  GdkEventExpose *event)
-#else
-static gint
-gtk_cmclist_expose (GtkWidget *widget,
-          cairo_t *event)
-#endif
 {
   GtkCMCList *clist;
 
@@ -4939,40 +4826,19 @@ gtk_cmclist_expose (GtkWidget *widget,
       clist = GTK_CMCLIST (widget);
 
       /* exposure events on the list */
-#if !GTK_CHECK_VERSION(3, 0, 0)
       if (event->window == clist->clist_window)
 	draw_rows (clist, &event->area);
-#else
-      if (gtk_cairo_should_draw_window (event, clist->clist_window))
-        {
-	GdkRectangle area;
 
-	/* FIXME: get proper area */
-	if (gdk_cairo_get_clip_rectangle (event, &area))
-	  draw_rows (clist, &area);
-        }
-#endif
-
-#if !GTK_CHECK_VERSION(3, 0, 0)
       if (event->window == clist->title_window)
-#else
-      if (gtk_cairo_should_draw_window (event, clist->title_window))
-#endif
 	{
 	  gint i;
 	  
 	  for (i = 0; i < clist->columns; i++)
 	    {
 	      if (clist->column[i].button) {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_container_propagate_expose (GTK_CONTAINER (clist),
 						clist->column[i].button,
 						event);
-#else
-		gtk_container_propagate_draw (GTK_CONTAINER (clist),
-						clist->column[i].button,
-						event);
-#endif
 	      }
 	    }
 	}
@@ -5501,32 +5367,6 @@ gtk_cmclist_motion (GtkWidget      *widget,
   return FALSE;
 }
 
-#if GTK_CHECK_VERSION(3, 0, 0)
-static void
-gtk_cmclist_get_preferred_width (GtkWidget *widget,
-                                 gint      *minimal_width,
-                                 gint      *natural_width)
-{
-  GtkRequisition requisition;
-
-  gtk_cmclist_size_request (widget, &requisition);
-
-  *minimal_width = *natural_width = requisition.width;
-}
-
-static void
-gtk_cmclist_get_preferred_height (GtkWidget *widget,
-                                  gint      *minimal_height,
-                                  gint      *natural_height)
-{
-  GtkRequisition requisition;
-
-  gtk_cmclist_size_request (widget, &requisition);
-
-  *minimal_height = *natural_height = requisition.height;
-}
-#endif
-
 static void
 gtk_cmclist_size_request (GtkWidget      *widget,
 			GtkRequisition *requisition)
diff --git a/src/gtk/gtkcmclist.h b/src/gtk/gtkcmclist.h
index e3c1f09..a9f196f 100644
--- a/src/gtk/gtkcmclist.h
+++ b/src/gtk/gtkcmclist.h
@@ -34,17 +34,6 @@
 
 G_BEGIN_DECLS
 
-
-#if GTK_CHECK_VERSION(3, 0, 0)
-/* Generic visibility flags */
-typedef enum
-{
-  GTK_VISIBILITY_NONE,
-  GTK_VISIBILITY_PARTIAL,
-  GTK_VISIBILITY_FULL
-} GtkVisibility;
-#endif
-
 /* clist flags */
 enum {
   GTK_CMCLIST_IN_DRAG             = 1 <<  0,
@@ -243,11 +232,9 @@ struct _GtkCMCListClass
 {
   GtkContainerClass parent_class;
   
-#if !GTK_CHECK_VERSION(3, 0, 0)
   void  (*set_scroll_adjustments) (GtkCMCList       *clist,
 				   GtkAdjustment  *hadjustment,
 				   GtkAdjustment  *vadjustment);
-#endif
   void   (*refresh)             (GtkCMCList       *clist);
   void   (*select_row)          (GtkCMCList       *clist,
 				 gint            row,
diff --git a/src/gtk/gtkcmctree.c b/src/gtk/gtkcmctree.c
index 13dbdb5..a31ed1b 100644
--- a/src/gtk/gtkcmctree.c
+++ b/src/gtk/gtkcmctree.c
@@ -944,22 +944,14 @@ static void
 gtk_cmctree_class_init (GtkCMCTreeClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-#if !GTK_CHECK_VERSION(3, 0, 0)
   GtkObjectClass *object_class;
-#else /* for simplicity */
-  GtkWidgetClass *object_class;
-#endif
   GtkWidgetClass *widget_class;
   GtkCMCListClass *clist_class;
   GtkBindingSet *binding_set;
 
   gobject_class->constructor = gtk_cmctree_constructor;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
   object_class = (GtkObjectClass *) klass;
-#else /* for simplicity */
-  object_class = (GtkWidgetClass *) klass;
-#endif
   widget_class = (GtkWidgetClass *) klass;
   container_class = (GtkContainerClass *) klass;
   clist_class = (GtkCMCListClass *) klass;
@@ -1298,7 +1290,6 @@ ctree_attach_styles (GtkCMCTree     *ctree,
     GTK_CMCTREE_ROW (node)->row.style =
       gtk_style_attach (GTK_CMCTREE_ROW (node)->row.style, clist->clist_window);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
   if (GTK_CMCTREE_ROW (node)->row.fg_set || GTK_CMCTREE_ROW (node)->row.bg_set)
     {
       GdkColormap *colormap;
@@ -1309,7 +1300,6 @@ ctree_attach_styles (GtkCMCTree     *ctree,
       if (GTK_CMCTREE_ROW (node)->row.bg_set)
 	gdk_colormap_alloc_color (colormap, &(GTK_CMCTREE_ROW (node)->row.background), TRUE, TRUE);
     }
-#endif
 
   for (i = 0; i < clist->columns; i++)
     if  (GTK_CMCTREE_ROW (node)->row.cell[i].style)
@@ -4441,11 +4431,9 @@ gtk_cmctree_node_set_foreground (GtkCMCTree       *ctree,
     {
       GTK_CMCTREE_ROW (node)->row.foreground = *color;
       GTK_CMCTREE_ROW (node)->row.fg_set = TRUE;
-#if !GTK_CHECK_VERSION(3, 0, 0)
       if (gtk_widget_get_realized (GTK_WIDGET(ctree)))
 	gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (ctree)),
 			 &GTK_CMCTREE_ROW (node)->row.foreground, TRUE, TRUE);
-#endif
     }
   else
     GTK_CMCTREE_ROW (node)->row.fg_set = FALSE;
@@ -4465,11 +4453,9 @@ gtk_cmctree_node_set_background (GtkCMCTree       *ctree,
     {
       GTK_CMCTREE_ROW (node)->row.background = *color;
       GTK_CMCTREE_ROW (node)->row.bg_set = TRUE;
-#if !GTK_CHECK_VERSION(3, 0, 0)
       if (gtk_widget_get_realized (GTK_WIDGET(ctree)))
 	gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (ctree)),
 			 &GTK_CMCTREE_ROW (node)->row.background, TRUE, TRUE);
-#endif
     }
   else
     GTK_CMCTREE_ROW (node)->row.bg_set = FALSE;
diff --git a/src/gtk/gtkshruler.c b/src/gtk/gtkshruler.c
index 9191d82..f6df16f 100644
--- a/src/gtk/gtkshruler.c
+++ b/src/gtk/gtkshruler.c
@@ -150,27 +150,14 @@ static void          gtk_shruler_map           (GtkWidget      *widget);
 static void          gtk_shruler_unmap         (GtkWidget      *widget);
 static void          gtk_shruler_size_allocate (GtkWidget      *widget,
                                               GtkAllocation  *allocation);
-#if GTK_CHECK_VERSION(3, 0, 0)
-static void gtk_shruler_get_preferred_height (GtkWidget *widget,
-                                 gint      *minimal_height,
-                                 gint      *natural_height);
-static void gtk_shruler_get_preferred_width (GtkWidget *widget,
-                                 gint      *minimal_width,
-                                 gint      *natural_width);
-#endif
 static void          gtk_shruler_size_request  (GtkWidget      *widget,
                                               GtkRequisition *requisition);
 static void          gtk_shruler_style_set     (GtkWidget      *widget,
                                               GtkStyle       *prev_style);
 static gboolean      gtk_shruler_motion_notify (GtkWidget      *widget,
                                               GdkEventMotion *event);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gboolean      gtk_shruler_expose        (GtkWidget      *widget,
                                               GdkEventExpose *event);
-#else
-static gboolean      gtk_shruler_expose        (GtkWidget *widget,
-                                              cairo_t *cr);
-#endif
 
 static void          gtk_shruler_draw_ticks    (GtkSHRuler      *ruler);
 static void          gtk_shruler_make_pixmap   (GtkSHRuler      *ruler);
@@ -203,23 +190,12 @@ gtk_shruler_class_init (GtkSHRulerClass *klass)
   widget_class->map                 = gtk_shruler_map;
   widget_class->unmap               = gtk_shruler_unmap;
   widget_class->size_allocate       = gtk_shruler_size_allocate;
-#if !GTK_CHECK_VERSION(3, 0, 0)
   widget_class->size_request        = gtk_shruler_size_request;
-#else
-  widget_class->get_preferred_width = gtk_shruler_get_preferred_width;
-  widget_class->get_preferred_height = gtk_shruler_get_preferred_height;
-#endif
   widget_class->style_set           = gtk_shruler_style_set;
   widget_class->motion_notify_event = gtk_shruler_motion_notify;
-#if !GTK_CHECK_VERSION(3, 0, 0)
   widget_class->expose_event        = gtk_shruler_expose;
-#else
-  widget_class->draw                = gtk_shruler_expose;
-#endif
 
-#if !GLIB_CHECK_VERSION(2, 58, 0)
   g_type_class_add_private (object_class, sizeof (GtkSHRulerPrivate));
-#endif
 
   g_object_class_install_property (object_class,
                                    PROP_ORIENTATION,
@@ -296,11 +272,7 @@ gtk_shruler_init (GtkSHRuler *ruler)
   gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
 
   priv->orientation   = GTK_ORIENTATION_HORIZONTAL;
-#if !GTK_CHECK_VERSION(3, 0, 0)
   priv->unit          = GTK_PIXELS;
-#else
-  priv->unit          = 0;
-#endif
   priv->lower         = 0;
   priv->upper         = 0;
   priv->position      = 0;
@@ -716,32 +688,6 @@ gtk_shruler_size_allocate (GtkWidget     *widget,
     }
 }
 
-#if GTK_CHECK_VERSION(3, 0, 0)
-static void
-gtk_shruler_get_preferred_width (GtkWidget *widget,
-                                 gint      *minimal_width,
-                                 gint      *natural_width)
-{
-  GtkRequisition requisition;
-
-  gtk_shruler_size_request (widget, &requisition);
-
-  *minimal_width = *natural_width = requisition.width;
-}
-
-static void
-gtk_shruler_get_preferred_height (GtkWidget *widget,
-                                  gint      *minimal_height,
-                                  gint      *natural_height)
-{
-  GtkRequisition requisition;
-
-  gtk_shruler_size_request (widget, &requisition);
-
-  *minimal_height = *natural_height = requisition.height;
-}
-#endif
-
 static void
 gtk_shruler_size_request (GtkWidget      *widget,
                          GtkRequisition *requisition)
@@ -801,44 +747,30 @@ gtk_shruler_motion_notify (GtkWidget      *widget,
   return FALSE;
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gboolean
 gtk_shruler_expose (GtkWidget      *widget,
                    GdkEventExpose *event)
-#else
-static gboolean
-gtk_shruler_expose (GtkWidget *widget,
-                    cairo_t   *cr)
-#endif
 {
   if (gtk_widget_is_drawable (widget))
     {
       GtkSHRuler        *ruler = GTK_SHRULER (widget);
       GtkSHRulerPrivate *priv  = GTK_SHRULER_GET_PRIVATE (ruler);
       GtkAllocation     allocation;
-#if !GTK_CHECK_VERSION(3, 0, 0)
       cairo_t          *cr;
-#endif
 
       gtk_shruler_draw_ticks (ruler);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
       cr = gdk_cairo_create (gtk_widget_get_window (widget));
       gdk_cairo_region (cr, event->region);
       cairo_clip (cr);
-#endif
 
       gtk_widget_get_allocation (widget, &allocation);
-#if !GTK_CHECK_VERSION(3, 0, 0)
       cairo_translate (cr, allocation.x, allocation.y);
-#endif
 
       cairo_set_source_surface (cr, priv->backing_store, 0, 0);
       cairo_paint (cr);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
       cairo_destroy (cr);
-#endif
     }
 
   return FALSE;
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 4b70c58..7d1e244 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1224,10 +1224,8 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
 {
 	GtkWidget *btn;
 	GtkWidget *btn_label;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GdkColormap *cmap;
 	gboolean success[2];
-#endif
 	GdkColor uri_color[2] = {{0, 0, 0, 0xffff}, {0, 0xffff, 0, 0}};
 	gchar *local_url = NULL;
 	if (!url)
@@ -1241,11 +1239,9 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
 	btn = gtk_button_new_with_label(label?label:url);
 	gtk_button_set_relief(GTK_BUTTON(btn), GTK_RELIEF_NONE);
 	btn_label = gtk_bin_get_child(GTK_BIN((btn)));
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	cmap = gdk_drawable_get_colormap(gtk_widget_get_window(window));
 	gdk_colormap_alloc_colors(cmap, uri_color, 2, FALSE, TRUE, success);
 	if (success[0] == TRUE && success[1] == TRUE) {
-#endif
 		GtkStyle *style;
 		gtk_widget_ensure_style(btn_label);
 		style = gtk_style_copy
@@ -1255,10 +1251,8 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
 		style->fg[GTK_STATE_PRELIGHT] = uri_color[0];
 		gtk_widget_set_style(btn_label, style);
 		g_object_unref(style);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	} else
 		g_warning("color allocation failed");
-#endif
 
 	g_signal_connect(G_OBJECT(btn), "enter",
 			 G_CALLBACK(link_btn_enter), window);
diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c
index 47ff1c8..e7c763f 100644
--- a/src/gtk/logwindow.c
+++ b/src/gtk/logwindow.c
@@ -156,10 +156,8 @@ LogWindow *log_window_create(LogInstance instance)
 void log_window_init(LogWindow *logwin)
 {
 	GtkTextBuffer *buffer;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GdkColormap *colormap;
 	gboolean success[LOG_COLORS];
-#endif
 	GdkColor color[LOG_COLORS];
 	gint i;
 
@@ -181,7 +179,6 @@ void log_window_init(LogWindow *logwin)
 	logwin->status_nok_color = color[6];
 	logwin->status_skip_color = color[7];
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	colormap = gdk_drawable_get_colormap(gtk_widget_get_window(logwin->window));
 	gdk_colormap_alloc_colors(colormap, color, LOG_COLORS, FALSE, TRUE, success);
 
@@ -199,7 +196,6 @@ void log_window_init(LogWindow *logwin)
 			break;
 		}
 	}
-#endif
 
 	buffer = logwin->buffer;
 	gtk_text_buffer_create_tag(buffer, "message",
diff --git a/src/gtk/menu.c b/src/gtk/menu.c
index 438a56b..050b109 100644
--- a/src/gtk/menu.c
+++ b/src/gtk/menu.c
@@ -26,9 +26,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
-#endif
 #include "menu.h"
 #include "utils.h"
 #include "gtkutils.h"
@@ -211,7 +209,6 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
 		*y -= mreq.height;
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 gint menu_find_option_menu_index(GtkCMOptionMenu *optmenu, gpointer data,
 				 GCompareFunc func)
 {
@@ -245,4 +242,3 @@ gint menu_find_option_menu_index(GtkCMOptionMenu *optmenu, gpointer data,
 
 	return found;
 }
-#endif
diff --git a/src/gtk/menu.h b/src/gtk/menu.h
index 7e4b0da..b00d9fb 100644
--- a/src/gtk/menu.h
+++ b/src/gtk/menu.h
@@ -22,9 +22,7 @@
 
 #include <glib.h>
 #include <gtk/gtk.h>
-#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
-#endif
 
 #define MENU_VAL_ID "Claws::Menu::ValueID"
 #define MENU_VAL_DATA "Claws::Menu::ValueDATA"
@@ -96,10 +94,8 @@ void cm_toggle_menu_set_active_full(GtkUIManager *gui_manager, gchar *menu, gboo
 gchar *cm_menu_item_get_shortcut(GtkUIManager *gui_manager, gchar *menu);
 GtkWidget *cm_menu_item_new_label_from_url(gchar *label);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 gint menu_find_option_menu_index(GtkCMOptionMenu *optmenu, gpointer data,
 				 GCompareFunc func);
-#endif
 
 void menu_button_position	(GtkMenu		*menu,
 				 gint			*x,
diff --git a/src/gtk/quicksearch.c b/src/gtk/quicksearch.c
index c3485c5..f79cbff 100644
--- a/src/gtk/quicksearch.c
+++ b/src/gtk/quicksearch.c
@@ -28,9 +28,7 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
-#endif
 #include "utils.h"
 #include "combobox.h"
 #include "menu.h"
@@ -58,9 +56,7 @@ struct _QuickSearch
 {
 	GtkWidget			*hbox_search;
 	GtkWidget			*search_type;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget			*search_type_opt;
-#endif
 	GtkWidget			*search_string_entry;
 	GtkWidget			*search_condition_expression;
 	GtkWidget			*search_description;
@@ -221,14 +217,12 @@ gboolean quicksearch_is_fast(QuickSearch *quicksearch)
 
 static void quicksearch_set_type(QuickSearch *quicksearch, gint type)
 {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gint index;
 	quicksearch->request.type = type;
 	index = menu_find_option_menu_index(GTK_CMOPTION_MENU(quicksearch->search_type_opt), 
 					GINT_TO_POINTER(type),
 					NULL);
 	gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(quicksearch->search_type_opt), index);	
-#endif
 }
 
 static gchar *quicksearch_get_text(QuickSearch * quicksearch)
@@ -651,9 +645,7 @@ QuickSearch *quicksearch_new()
 	QuickSearch *quicksearch;
 
 	GtkWidget *hbox_search;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *search_type_opt;
-#endif
 	GtkWidget *search_type;
 	GtkWidget *search_string_entry;
 	GtkWidget *search_hbox;
@@ -681,11 +673,9 @@ QuickSearch *quicksearch_new()
 	/* quick search */
 	hbox_search = gtk_hbox_new(FALSE, 0);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	search_type_opt = gtk_cmoption_menu_new();
 	gtk_widget_show(search_type_opt);
 	gtk_box_pack_start(GTK_BOX(hbox_search), search_type_opt, FALSE, FALSE, 0);
-#endif
 
 	search_type = gtk_menu_new();
 	MENUITEM_ADD (search_type, menuitem,
@@ -763,11 +753,9 @@ QuickSearch *quicksearch_new()
 			 G_CALLBACK(searchtype_autorun_changed),
 			 quicksearch);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(search_type_opt), search_type);
 
 	quicksearch->search_type_opt = search_type_opt;
-#endif
 	quicksearch_set_type(quicksearch, prefs_common.summary_quicksearch_type);
 
 	gtk_widget_show(search_type);
diff --git a/src/gtk/spell_entry.c b/src/gtk/spell_entry.c
index 6904d41..44b91bc 100644
--- a/src/gtk/spell_entry.c
+++ b/src/gtk/spell_entry.c
@@ -44,15 +44,9 @@
 #include "gtkutils.h"
 
 static void claws_spell_entry_init		(ClawsSpellEntry *entry);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static void claws_spell_entry_destroy		(GtkObject *object);
 static gint claws_spell_entry_expose		(GtkWidget *widget,
 						 GdkEventExpose *event);
-#else
-static void claws_spell_entry_destroy		(GtkWidget *object);
-static gint claws_spell_entry_expose		(GtkWidget *widget,
-						 cairo_t *cr);
-#endif
 static gint claws_spell_entry_button_press	(GtkWidget *widget,
 						 GdkEventButton *event);
 static gboolean claws_spell_entry_popup_menu	(GtkWidget *widget,
@@ -95,26 +89,17 @@ static void claws_spell_entry_class_init(ClawsSpellEntryClass *klass)
 #if !GLIB_CHECK_VERSION(2,58, 0)
 	GObjectClass	*g_object_class;
 #endif
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkObjectClass	*gtk_object_class;
-#endif
 	GtkWidgetClass	*widget_class;
 	
 	parent_class = g_type_class_peek_parent(klass);
 	
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_object_class = GTK_OBJECT_CLASS(klass);
 	gtk_object_class->destroy = claws_spell_entry_destroy;
-#endif
 	
 	widget_class = GTK_WIDGET_CLASS(klass);
 	widget_class->button_press_event = claws_spell_entry_button_press;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	widget_class->expose_event = claws_spell_entry_expose;
-#else
-	widget_class->draw = claws_spell_entry_expose;
-	widget_class->destroy = claws_spell_entry_destroy;
-#endif
 
 #if !GLIB_CHECK_VERSION(2,58, 0)
 	g_object_class = G_OBJECT_CLASS(klass);
@@ -142,17 +127,10 @@ static void claws_spell_entry_init(ClawsSpellEntry *entry)
 			G_CALLBACK(claws_spell_entry_preedit_changed), NULL);
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static void claws_spell_entry_destroy(GtkObject *object)
 {
 	GTK_OBJECT_CLASS(parent_class)->destroy(object);
 }
-#else
-static void claws_spell_entry_destroy(GtkWidget *object)
-{
-	GTK_WIDGET_CLASS(parent_class)->destroy(object);
-}
-#endif
 
 GtkWidget *claws_spell_entry_new(void)
 {
@@ -469,11 +447,7 @@ void claws_spell_entry_recheck_all(ClawsSpellEntry *entry)
 	}
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gint claws_spell_entry_expose(GtkWidget *widget, GdkEventExpose *event)
-#else
-static gint claws_spell_entry_expose(GtkWidget *widget, cairo_t *cr)
-#endif
 {
 	ClawsSpellEntry *entry = CLAWS_SPELL_ENTRY(widget);
 	ClawsSpellEntryPrivate *priv = CLAWS_SPELL_ENTRY_GET_PRIVATE(entry);
@@ -485,11 +459,7 @@ static gint claws_spell_entry_expose(GtkWidget *widget, cairo_t *cr)
 		pango_layout_set_attributes(layout, priv->attr_list);
 	}
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	return GTK_WIDGET_CLASS(parent_class)->expose_event (widget, event);
-#else
-	return GTK_WIDGET_CLASS(parent_class)->draw (widget, cr);
-#endif
 }
 
 static gint claws_spell_entry_button_press(GtkWidget *widget, GdkEventButton *event)
diff --git a/src/main.c b/src/main.c
index 0f17016..eff8f86 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1032,9 +1032,7 @@ int main(int argc, char *argv[])
 
 #ifdef CRASH_DIALOG
 	if (cmd.crash) {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_set_locale();
-#endif
 		gtk_init(&argc, &argv);
 		crash_main(cmd.crash_params);
 #ifdef G_OS_WIN32
@@ -1067,9 +1065,7 @@ int main(int argc, char *argv[])
 
 	reset_statistics();
 	
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_set_locale();
-#endif
 	gtk_init(&argc, &argv);
 
 #ifdef G_OS_WIN32
@@ -1116,11 +1112,9 @@ int main(int argc, char *argv[])
 	}
 #endif
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_widget_set_default_colormap(
 		gdk_screen_get_system_colormap(
 			gdk_screen_get_default()));
-#endif
 
 	gtkut_create_ui_manager();
 
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 30376f0..5fa621d 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1432,10 +1432,8 @@ MainWindow *main_window_create()
 	FolderView *folderview;
 	SummaryView *summaryview;
 	MessageView *messageview;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GdkColormap *colormap;
 	gboolean success[4];
-#endif
 	GdkColor color[4];
 	GtkWidget *ac_menu;
 	gint i;
@@ -2093,14 +2091,12 @@ MainWindow *main_window_create()
 	color[2] = folderview->color_new;
 	color[3] = folderview->color_op;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	colormap = gdk_drawable_get_colormap(gtk_widget_get_window(window));
 	gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
 	for (i = 0; i < 4; i++) {
 		if (success[i] == FALSE)
 			g_warning("MainWindow: color allocation %d failed", i);
 	}
-#endif
 
 	debug_print("done.\n");
 
diff --git a/src/plugins/dillo/dillo_viewer.c b/src/plugins/dillo/dillo_viewer.c
index 24411cf..b41cc35 100644
--- a/src/plugins/dillo/dillo_viewer.c
+++ b/src/plugins/dillo/dillo_viewer.c
@@ -27,9 +27,6 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <gtk/gtkx.h>
-#endif
 #include <gdk/gdkx.h>
 
 #include "common/claws.h"
@@ -65,11 +62,7 @@ static GtkWidget *dillo_get_widget(MimeViewer *_viewer)
 	return GTK_WIDGET(viewer->widget);
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
-static gboolean socket_destroy_cb(GtkObject *object, gpointer data)
-#else
 static gboolean socket_destroy_cb(GtkObject *object, gpointer data)
-#endif
 {
 	DilloViewer *viewer = (DilloViewer *) data;
 	debug_print("Destroyed dillo socket %p\n", viewer->socket);
diff --git a/src/prefs_account.c b/src/prefs_account.c
index 29eeae6..5f1cc8f 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -34,9 +34,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
-#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
-#endif
 #include "main.h"
 #include "prefs_gtk.h"
 #include "prefs_account.h"
@@ -324,10 +322,8 @@ typedef struct AdvancedPage
 	GtkWidget *nntpport_spinbtn;
 	GtkWidget *domain_checkbtn;
 	GtkWidget *domain_entry;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *crosspost_checkbtn;
  	GtkWidget *crosspost_colormenu;
-#endif
 
 #ifndef G_OS_WIN32
 	GtkWidget *tunnelcmd_checkbtn;
@@ -393,11 +389,9 @@ static void prefs_account_set_autochk_interval_to_widgets(PrefParam *pparam);
 static void prefs_account_enum_set_data_from_radiobtn	(PrefParam *pparam);
 static void prefs_account_enum_set_radiobtn		(PrefParam *pparam);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static void crosspost_color_toggled(void);
 static void prefs_account_crosspost_set_data_from_colormenu(PrefParam *pparam);
 static void prefs_account_crosspost_set_colormenu(PrefParam *pparam);
-#endif
 
 static void prefs_account_nntpauth_toggled(GtkToggleButton *button,
 					   gpointer user_data);
@@ -940,7 +934,6 @@ static PrefParam advanced_param[] = {
 	 &advanced_page.tunnelcmd_entry,
 	 prefs_set_data_from_entry, prefs_set_entry},
 #endif
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	{"mark_crosspost_read", "FALSE", &tmp_ac_prefs.mark_crosspost_read, P_BOOL,
 	 &advanced_page.crosspost_checkbtn,
 	 prefs_set_data_from_toggle, prefs_set_toggle},
@@ -949,7 +942,6 @@ static PrefParam advanced_param[] = {
 	 &advanced_page.crosspost_colormenu,
 	 prefs_account_crosspost_set_data_from_colormenu,
 	 prefs_account_crosspost_set_colormenu},
-#endif
 
 	{"set_sent_folder", "FALSE", &tmp_ac_prefs.set_sent_folder, P_BOOL,
 	 &advanced_page.sent_folder_checkbtn,
@@ -3061,11 +3053,9 @@ static void advanced_create_widget_func(PrefsPage * _page,
 	GtkWidget *checkbtn_domain;
 	GtkWidget *entry_domain;
 	gchar *tip_domain;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *checkbtn_crosspost;
  	GtkWidget *colormenu_crosspost;
  	GtkWidget *menu;
-#endif
 #ifndef G_OS_WIN32
 	GtkWidget *checkbtn_tunnelcmd;
 	GtkWidget *entry_tunnelcmd;
@@ -3157,7 +3147,6 @@ static void advanced_create_widget_func(PrefsPage * _page,
 	SET_TOGGLE_SENSITIVITY (checkbtn_tunnelcmd, entry_tunnelcmd);
 #endif
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	PACK_HBOX (hbox1);
 	PACK_CHECK_BUTTON (hbox1, checkbtn_crosspost, 
 			   _("Mark cross-posted messages as read and color:"));
@@ -3172,7 +3161,6 @@ static void advanced_create_widget_func(PrefsPage * _page,
 	menu = colorlabel_create_color_menu();
 	gtk_cmoption_menu_set_menu (GTK_CMOPTION_MENU(colormenu_crosspost), menu);
 	SET_TOGGLE_SENSITIVITY(checkbtn_crosspost, colormenu_crosspost);
-#endif
 #undef PACK_HBOX
 #undef PACK_PORT_SPINBTN
 
@@ -3236,10 +3224,8 @@ static void advanced_create_widget_func(PrefsPage * _page,
 	page->nntpport_spinbtn		= spinbtn_nntpport;
 	page->domain_checkbtn		= checkbtn_domain;
 	page->domain_entry		= entry_domain;
-#if !GTK_CHECK_VERSION(3, 0, 0)
  	page->crosspost_checkbtn	= checkbtn_crosspost;
  	page->crosspost_colormenu	= colormenu_crosspost;
-#endif
 
 #ifndef G_OS_WIN32
 	page->tunnelcmd_checkbtn	= checkbtn_tunnelcmd;
@@ -4351,7 +4337,6 @@ PrefsAccount *prefs_account_open(PrefsAccount *ac_prefs, gboolean *dirty)
 	}
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static void crosspost_color_toggled(void)
 {
 	gboolean is_active;
@@ -4384,7 +4369,6 @@ static void prefs_account_crosspost_set_colormenu(PrefParam *pparam)
 	menuitem = gtk_menu_get_active(GTK_MENU(menu));
 	gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
 }
-#endif
 
 static void pop_bfr_smtp_tm_set_sens(GtkWidget *widget, gpointer data)
 {
@@ -4953,10 +4937,8 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_show(advanced_page.nntpport_hbox);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_show(advanced_page.crosspost_checkbtn);
 		gtk_widget_show(advanced_page.crosspost_colormenu);
-#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -5053,10 +5035,8 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
-#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -5162,10 +5142,8 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_show(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
-#endif
 #ifndef G_OS_WIN32
 		gtk_widget_show(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_show(advanced_page.tunnelcmd_entry);
@@ -5260,10 +5238,8 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
-#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -5365,10 +5341,8 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
 		gtk_widget_show(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
-#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -5427,14 +5401,9 @@ static void prefs_account_showpwd_checkbtn_toggled(GtkToggleButton *button,
 static void prefs_account_entry_changed_newline_check_cb(GtkWidget *entry,
 		gpointer user_data)
 {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	static GdkColor red;
 	static gboolean colors_initialised = FALSE;
-#else
-	static GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 };
-#endif
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (strchr(gtk_entry_get_text(GTK_ENTRY(entry)), '\n') != NULL) {
 		/* Entry contains a newline, light it up. */
 		debug_print("found newline in string, painting entry red\n");
@@ -5453,7 +5422,6 @@ static void prefs_account_entry_changed_newline_check_cb(GtkWidget *entry,
 	} else {
 		gtk_widget_modify_base(entry, GTK_STATE_NORMAL, NULL);
 	}
-#endif
 }
 
 static void prefs_account_filter_on_recv_toggled(GtkToggleButton *button,
diff --git a/src/prefs_filtering_action.c b/src/prefs_filtering_action.c
index 6f8e98c..5dc58db 100644
--- a/src/prefs_filtering_action.c
+++ b/src/prefs_filtering_action.c
@@ -33,9 +33,7 @@
 #include <string.h>
 #include <errno.h>
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
-#endif
 #include "main.h"
 #include "prefs_gtk.h"
 #include "prefs_filtering_action.h"
@@ -122,9 +120,7 @@ static struct FilteringAction_ {
 	GtkWidget *dest_entry;
 	GtkWidget *dest_btn;
 	GtkWidget *exec_btn;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *color_optmenu;
-#endif
 	GtkWidget *header_combo;
 	GtkWidget *header_entry;
 #ifndef USE_ALT_ADDRBOOK
@@ -185,9 +181,7 @@ static struct {
 	{ N_("Message flags"), 	N_("Mark as spam"),		ACTION_MARK_AS_SPAM },
 	{ N_("Message flags"), 	N_("Mark as ham"),		ACTION_MARK_AS_HAM },
 	{ NULL, 		N_("Execute"),			ACTION_EXECUTE },
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	{ NULL, 		N_("Color label"),		ACTION_COLOR },
-#endif
 	{ N_("Resend"), 	N_("Forward"),			ACTION_FORWARD },
 	{ N_("Resend"), 	N_("Forward as attachment"),	ACTION_FORWARD_AS_ATTACHMENT },
 	{ N_("Resend"), 	N_("Redirect"),			ACTION_REDIRECT },
@@ -285,11 +279,9 @@ void prefs_filtering_action_open(GSList *action_list,
 	if (!filtering_action.window) {
 		prefs_filtering_action_create();
 	} else {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		/* update color label menu */
 		gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(filtering_action.color_optmenu),
 				colorlabel_create_color_menu());
-#endif
 	}
 
 	manage_window_set_transient(GTK_WINDOW(filtering_action.window));
@@ -375,9 +367,7 @@ static void prefs_filtering_action_create(void)
 
 	GtkWidget *exec_btn;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *color_optmenu;
-#endif
 
 	static GdkGeometry geometry;
 
@@ -524,14 +514,12 @@ static void prefs_filtering_action_create(void)
 	score_entry = gtk_spin_button_new_with_range(-1000, 1000, 1);
 	gtk_box_pack_start(GTK_BOX(hbox1), score_entry, FALSE, FALSE, 0);
 	
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	color_optmenu = gtk_cmoption_menu_new();
 	gtk_size_group_add_widget(size_action, color_optmenu);
 	gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(color_optmenu),
 				 colorlabel_create_color_menu());
 	prefs_filtering_action_check_widget_width(color_optmenu);
 	gtk_box_pack_start(GTK_BOX(hbox1), color_optmenu, FALSE, FALSE, 0);
-#endif
 
 	tags_combo = gtk_combo_box_text_new ();
 	gtk_size_group_add_widget(size_action, tags_combo);
@@ -658,9 +646,7 @@ static void prefs_filtering_action_create(void)
 	filtering_action.dest_entry = dest_entry;
 	filtering_action.dest_btn = dest_btn;
 	filtering_action.exec_btn = exec_btn;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	filtering_action.color_optmenu = color_optmenu;
-#endif
 	filtering_action.score_entry = score_entry;
 	filtering_action.header_combo = header_combo;
 	filtering_action.header_entry = header_entry;
@@ -861,10 +847,8 @@ static gint prefs_filtering_action_get_matching_from_action(Action action_id)
 		return MATCHACTION_REDIRECT;
 	case ACTION_EXECUTE:
 		return MATCHACTION_EXECUTE;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case ACTION_COLOR:
 		return MATCHACTION_COLOR;
-#endif
 	case ACTION_HIDE:
 		return MATCHACTION_HIDE;
 	case ACTION_IGNORE:
@@ -936,13 +920,11 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
 			return NULL;
 		}
 		break;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case ACTION_COLOR:
 		labelcolor = colorlabel_get_color_menu_active_item(
 			gtk_cmoption_menu_get_menu(GTK_CMOPTION_MENU(filtering_action.color_optmenu)));
 		destination = NULL;	
 		break;
-#endif
         case ACTION_CHANGE_SCORE:
         case ACTION_SET_SCORE:
         	score = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(
@@ -1313,10 +1295,8 @@ static void prefs_filtering_action_enable_widget(GtkWidget* widget, const gboole
 			gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), 0);
 		else if(GTK_IS_ENTRY(widget))
 			gtk_entry_set_text(GTK_ENTRY(widget), "");
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		else if(GTK_IS_CMOPTION_MENU(widget))
 			gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(widget), 0);
-#endif
 		
 		gtk_widget_set_sensitive(widget, TRUE);
 		gtk_widget_show(widget);
@@ -1380,10 +1360,8 @@ static void prefs_filtering_action_type_selection_changed(GtkWidget *combo,
 	prefs_filtering_action_enable_widget(filtering_action.exec_btn,
 						(value == ACTION_EXECUTE));
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	prefs_filtering_action_enable_widget(filtering_action.color_optmenu,
 						(value == ACTION_COLOR));
-#endif
 
 	prefs_filtering_action_enable_widget(filtering_action.header_combo,
 					(value == ACTION_ADD_TO_ADDRESSBOOK));	
@@ -1409,11 +1387,9 @@ static void prefs_filtering_action_type_selection_changed(GtkWidget *combo,
 	case ACTION_MOVE:
 		gtk_label_set_text(GTK_LABEL(filtering_action.label3), _("Destination"));
 		break;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case ACTION_COLOR:
 		gtk_label_set_text(GTK_LABEL(filtering_action.label3), _("Color"));
 		break;
-#endif
 	case ACTION_EXECUTE:
 		gtk_label_set_text(GTK_LABEL(filtering_action.label3), _("Execute"));
 		break;
@@ -1617,7 +1593,6 @@ static gboolean prefs_filtering_actions_selected
 		combobox_select_by_data(GTK_COMBO_BOX(filtering_action.action_combo),
 				     ACTION_EXECUTE);
 		break;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHACTION_COLOR:
 		combobox_select_by_data(GTK_COMBO_BOX(filtering_action.action_combo),
 				     ACTION_COLOR);
@@ -1627,7 +1602,6 @@ static gboolean prefs_filtering_actions_selected
 						filtering_action.color_optmenu));
 		g_signal_emit_by_name(G_OBJECT(menu), "selection-done", menu);
 		break;
-#endif
 	case MATCHACTION_CHANGE_SCORE:
 		combobox_select_by_data(GTK_COMBO_BOX(filtering_action.action_combo),
 				     ACTION_CHANGE_SCORE);
diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c
index aca5b7d..ffa7c42 100644
--- a/src/prefs_folder_item.c
+++ b/src/prefs_folder_item.c
@@ -1819,12 +1819,8 @@ static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
 
 static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
 {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	static GdkColor red;
 	static gboolean colors_initialised = FALSE;
-#else
-	static GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 };
-#endif
 	static gchar buf[BUFFSIZE];
 	FolderItemGeneralPage *page = (FolderItemGeneralPage *)data;
 	gchar *test_string, *regexp;
@@ -1850,7 +1846,6 @@ static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
 		return;
 	}
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (!colors_initialised) {
 		if (!gdk_color_parse("#ff7070", &red)) {
 	        g_warning("color parse failed: red");
@@ -1859,14 +1854,11 @@ static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
 		colors_initialised = gdk_colormap_alloc_color(
 				gdk_colormap_get_system(), &red, FALSE, TRUE);
 	}
-#endif
 
 	preg = summary_compile_simplify_regexp(regexp);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (colors_initialised)
 		gtk_widget_modify_base(page->entry_simplify_subject,
 				GTK_STATE_NORMAL, preg ? NULL : &red);
-#endif
 
 	if (preg != NULL) {
 		string_remove_match(buf, BUFFSIZE, test_string, preg);
diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 8db0d79..78cbf7a 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -32,9 +32,7 @@
 #include <string.h>
 #include <errno.h>
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
-#endif
 #include "main.h"
 #include "prefs_gtk.h"
 #include "prefs_matcher.h"
@@ -99,9 +97,7 @@ static struct Matcher {
 	GtkWidget *addressbook_folder_combo;
 	GtkWidget *case_checkbtn;
 	GtkWidget *regexp_checkbtn;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *color_optmenu;
-#endif
 	GtkWidget *calendar;
 	GtkWidget *time_label;
 	GtkWidget *time_entry;
@@ -462,11 +458,9 @@ void prefs_matcher_open(MatcherList *matchers, PrefsMatcherSignal *cb)
 		prefs_matcher_models_create();
 		prefs_matcher_create();
 	} else {
-#if !GTK_CHECK_VERSION(3, 0, 0)
 		/* update color label menu */
 		gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(matcher.color_optmenu),
 				colorlabel_create_color_menu());
-#endif
 	}
 
 	manage_window_set_transient(GTK_WINDOW(matcher.window));
@@ -555,9 +549,7 @@ static void prefs_matcher_create(void)
 
 	GtkWidget *test_btn;
 	GtkWidget *addressbook_select_btn;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *color_optmenu;
-#endif
 	GtkWidget *calendar;
 	GtkWidget *time_label;
 	GtkWidget *time_entry;
@@ -712,13 +704,11 @@ static void prefs_matcher_create(void)
 	match_combo = gtkut_sc_combobox_create(NULL, TRUE);
 	gtk_box_pack_start(GTK_BOX(match_hbox), match_combo, TRUE, TRUE, 0);
 	
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	/* color labels combo */
 	color_optmenu = gtk_cmoption_menu_new();
 	gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(color_optmenu),
 				 colorlabel_create_color_menu());
 	gtk_box_pack_start(GTK_BOX(match_hbox), color_optmenu, FALSE, FALSE, 0);
-#endif
 	
 	/* address header name */
 	header_addr_combo = combobox_text_new(TRUE,
@@ -896,9 +886,7 @@ static void prefs_matcher_create(void)
 #ifndef USE_ALT_ADDRBOOK
 	matcher.addressbook_select_btn = addressbook_select_btn;
 #endif
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	matcher.color_optmenu = color_optmenu;
-#endif
 	matcher.match_label = match_label;
 	matcher.criteria_label2 = criteria_label2;
 	matcher.headers_combo = headers_combo;
@@ -988,9 +976,7 @@ static void prefs_matcher_reset_condition(void)
 		gtk_combo_box_set_active(GTK_COMBO_BOX(matcher.match_combo), 0);
 	if (match_combo2_model_set())
 		gtk_combo_box_set_active(GTK_COMBO_BOX(matcher.match_combo2), 0);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(matcher.color_optmenu), 0);
-#endif
 	gtk_spin_button_set_value(GTK_SPIN_BUTTON(matcher.numeric_entry), 0);
 	gtk_entry_set_text(GTK_ENTRY(matcher.header_entry), "");
 	gtk_entry_set_text(GTK_ENTRY(matcher.header_addr_entry), "");
@@ -1134,11 +1120,9 @@ static gint prefs_matcher_get_criteria_from_matching(gint matching_id)
 	case MATCHCRITERIA_PARTIAL:
 	case MATCHCRITERIA_NOT_PARTIAL:
 		return CRITERIA_PARTIAL;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHCRITERIA_COLORLABEL:
 	case MATCHCRITERIA_NOT_COLORLABEL:
 		return CRITERIA_COLORLABEL;
-#endif
 	case MATCHCRITERIA_IGNORE_THREAD:
 	case MATCHCRITERIA_NOT_IGNORE_THREAD:
 		return CRITERIA_IGNORE_THREAD;
@@ -1263,10 +1247,8 @@ static gint prefs_matcher_get_matching_from_criteria(gint criteria_id)
 		return MATCHCRITERIA_SIGNED;
 	case CRITERIA_PARTIAL:
 		return MATCHCRITERIA_PARTIAL;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case CRITERIA_COLORLABEL:
 		return MATCHCRITERIA_COLORLABEL;
-#endif
 	case CRITERIA_IGNORE_THREAD:
 		return MATCHCRITERIA_IGNORE_THREAD;
 	case CRITERIA_WATCH_THREAD:
@@ -1369,10 +1351,8 @@ static gint prefs_matcher_not_criteria(gint matcher_criteria)
 		return MATCHCRITERIA_NOT_SIGNED;
 	case MATCHCRITERIA_PARTIAL:
 		return MATCHCRITERIA_NOT_PARTIAL;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHCRITERIA_COLORLABEL:
 		return MATCHCRITERIA_NOT_COLORLABEL;
-#endif
 	case MATCHCRITERIA_IGNORE_THREAD:
 		return MATCHCRITERIA_NOT_IGNORE_THREAD;
 	case MATCHCRITERIA_WATCH_THREAD:
@@ -1439,10 +1419,8 @@ static gint prefs_matcher_get_criteria(void)
 	case MATCH_HEADER:
 		header = gtk_entry_get_text(GTK_ENTRY(matcher.header_entry));
 		return header_name_to_crit(header);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCH_LABEL:
 		return CRITERIA_COLORLABEL;
-#endif
 	case MATCH_PARTIAL:
 		return CRITERIA_PARTIAL;
 	case MATCH_TEST:
@@ -1641,13 +1619,11 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
 			value *= KB_SIZE;
 		break;
 		
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case CRITERIA_COLORLABEL:
 		value = colorlabel_get_color_menu_active_item
 			(gtk_cmoption_menu_get_menu(GTK_CMOPTION_MENU
 				(matcher.color_optmenu))); 
 		break;
-#endif
 
 	case CRITERIA_HEADER:
 		header = gtk_entry_get_text(GTK_ENTRY(matcher.header_entry));
@@ -2015,10 +1991,8 @@ static void prefs_matcher_criteria_select(GtkWidget *widget,
 				    (value == MATCH_TEST));
 	prefs_matcher_enable_widget(matcher.addressbook_select_btn,
 				    (value == MATCH_ABOOK));
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	prefs_matcher_enable_widget(matcher.color_optmenu,
 				    (value == MATCH_LABEL));
-#endif
 	prefs_matcher_enable_widget(matcher.upper_filler,
 				    MATCH_CASE_REGEXP(value));
 	prefs_matcher_enable_widget(matcher.lower_filler,
@@ -2065,14 +2039,12 @@ static void prefs_matcher_criteria_select(GtkWidget *widget,
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), FALSE);
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
 		break;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCH_LABEL:
 		gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(matcher.color_optmenu), 0);
 		prefs_matcher_set_model(matcher.match_combo2, matcher.model_set);
 		gtk_label_set_text(GTK_LABEL(matcher.match_label), _("Label"));
 		gtk_label_set_text(GTK_LABEL(matcher.match_label2), _("is"));
 		break;
-#endif
 	case MATCH_PARTIAL:
 		prefs_matcher_set_model(matcher.criteria_combo2, matcher.model_partial);
 		gtk_label_set_text(GTK_LABEL(matcher.criteria_label2), _("Value:"));
@@ -2413,11 +2385,9 @@ static void prefs_matcher_set_criteria(const gint criteria)
 	case CRITERIA_TEST:
 		match_criteria = MATCH_TEST;
 		break;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case CRITERIA_COLORLABEL:
 		match_criteria = MATCH_LABEL;
 		break;
-#endif
 	case CRITERIA_TAG:
 	case CRITERIA_TAGGED:
 		match_criteria = MATCH_TAGS;
@@ -2673,7 +2643,6 @@ static gboolean prefs_matcher_selected(GtkTreeSelection *selector,
 		}
 		break;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHCRITERIA_NOT_COLORLABEL:
 	case MATCHCRITERIA_COLORLABEL:
 		gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(matcher.color_optmenu),
@@ -2681,7 +2650,6 @@ static gboolean prefs_matcher_selected(GtkTreeSelection *selector,
 		menu = gtk_cmoption_menu_get_menu(GTK_CMOPTION_MENU(matcher.color_optmenu));
 		g_signal_emit_by_name(G_OBJECT(menu), "selection-done", menu);
 		break;
-#endif
 
 	case MATCHCRITERIA_NOT_HEADER:
 	case MATCHCRITERIA_HEADER:
diff --git a/src/printing.c b/src/printing.c
index 3ea1ab4..1fa5cb7 100644
--- a/src/printing.c
+++ b/src/printing.c
@@ -93,11 +93,7 @@ static gboolean cb_preview_close(GtkWidget*, GdkEventAny*, gpointer);
 static void     cb_preview_size_allocate(GtkWidget*, GtkAllocation*);
 static void     cb_preview_ready(GtkPrintOperationPreview*,
 				 GtkPrintContext*, gpointer);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gboolean cb_preview_expose(GtkWidget*, GdkEventExpose*, gpointer);
-#else
-static gboolean cb_preview_expose(GtkWidget*, cairo_t*, gpointer);
-#endif
 static void     cb_preview_got_page_size(GtkPrintOperationPreview*,
 					 GtkPrintContext*,
 					 GtkPageSetup*, gpointer);
@@ -606,15 +602,9 @@ static void cb_preview_ready(GtkPrintOperationPreview *preview,
 	preview_data->current_page = preview_data->pages_to_print;
 	preview_data->context = context;
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	g_signal_connect(preview_data->area, "expose_event",
 			 G_CALLBACK(cb_preview_expose),
 			 preview_data);
-#else
-	g_signal_connect(preview_data->area, "draw",
-			 G_CALLBACK(cb_preview_expose),
-			 preview_data);
-#endif
 
 	gtk_widget_queue_draw(preview_data->area);
 }
@@ -645,30 +635,19 @@ static void cb_preview_got_page_size(GtkPrintOperationPreview *preview,
 				    paper_width, paper_height);
 }
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 static gboolean cb_preview_expose(GtkWidget *widget, GdkEventExpose *event,
 				  gpointer data)
-#else
-static gboolean cb_preview_expose(GtkWidget *widget, cairo_t *cr,
-				  gpointer data)
-#endif
 {
 	PreviewData *preview_data = data;
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_t *cr;
-#endif
 
 	debug_print("preview_expose (current %p)\n", preview_data->current_page);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	cr = gdk_cairo_create(gtk_widget_get_window(preview_data->area));
-#endif
 
 	/* background */
 	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_rectangle(cr, event->area.x, event->area.y, event->area.width, event->area.height);
-#endif
 	cairo_fill(cr);
 
 	/* shadow */
@@ -686,9 +665,7 @@ static gboolean cb_preview_expose(GtkWidget *widget, cairo_t *cr,
 	cairo_fill(cr);
 
 	gtk_print_context_set_cairo_context(preview_data->context, cr, PREVIEW_SCALE, PREVIEW_SCALE);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_destroy(cr);
-#endif
 
 	if (preview_data->current_page) {
 		preview_data->rendering = TRUE;
diff --git a/src/statusbar.c b/src/statusbar.c
index 3d59c45..3cc4511 100644
--- a/src/statusbar.c
+++ b/src/statusbar.c
@@ -48,10 +48,8 @@ GtkWidget *statusbar_create(void)
 
 	statusbar = gtk_statusbar_new();
 	statusbar_list = g_list_append(statusbar_list, statusbar);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar), 
 					  FALSE);
-#endif
 	gtk_container_set_border_width(GTK_CONTAINER(statusbar), 1);
 	child = gtk_statusbar_get_message_area(GTK_STATUSBAR(statusbar));
 	parent = gtk_widget_get_parent(child);
diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c
index 87d640a..2d7ce87 100644
--- a/src/stock_pixmap.c
+++ b/src/stock_pixmap.c
@@ -996,15 +996,9 @@ static gboolean do_pix_draw(GtkWidget *widget, cairo_t *cr,
 	return TRUE;
 }
 
-#if !GTK_CHECK_VERSION(3,0,0)
 static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, GdkEventExpose *expose,
                                                    OverlayData *data)
-#else
-static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, cairo_t *cr,
-						    OverlayData *data)
-#endif
 {
-#if !GTK_CHECK_VERSION(3,0,0)
 	cairo_t *cr;
 	GdkWindow *drawable = gtk_widget_get_window(widget);
 	gboolean result;
@@ -1016,9 +1010,6 @@ static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, cairo_t *
 	result = do_pix_draw(widget, cr, data);
 	cairo_destroy(cr);
 	return result;
-#else
-	return do_pix_draw(widget, cr, data);
-#endif
 }
 
 static void pixmap_with_overlay_destroy_cb(GtkWidget *object, OverlayData *data)
@@ -1067,11 +1058,9 @@ GtkWidget *stock_pixmap_widget_with_overlay(StockPixmap icon,
 	g_object_ref_sink(stock_wid);
 	gtk_widget_get_requisition(stock_wid, &requisition);
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (gtk_image_get_storage_type(GTK_IMAGE(stock_wid)) == GTK_IMAGE_PIXMAP)
 		data->is_pixmap = TRUE;
 	else
-#endif
 		data->is_pixmap = FALSE;
 
 	if (data->is_pixmap) {
@@ -1127,13 +1116,8 @@ GtkWidget *stock_pixmap_widget_with_overlay(StockPixmap icon,
 	widget = gtk_drawing_area_new();
 	gtk_widget_set_size_request(widget, data->base_width + border_x * 2,
 			      data->base_height + border_y * 2);
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	g_signal_connect(G_OBJECT(widget), "expose_event",
 			 G_CALLBACK(pixmap_with_overlay_expose_event_cb), data);
-#else
-	g_signal_connect(G_OBJECT(widget), "draw",
-			 G_CALLBACK(pixmap_with_overlay_expose_event_cb), data);
-#endif
 	g_signal_connect(G_OBJECT(widget), "destroy",
 			 G_CALLBACK(pixmap_with_overlay_destroy_cb), data);
 	g_object_set_data(G_OBJECT(widget), "highlight", &(data->highlight));
diff --git a/src/summary_search.c b/src/summary_search.c
index 654d881..3f1c846 100644
--- a/src/summary_search.c
+++ b/src/summary_search.c
@@ -28,9 +28,7 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
-#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtk/gtksctree.h"
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list