[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-22-gf139ad4ca

paul at claws-mail.org paul at claws-mail.org
Thu Dec 31 12:14:16 CET 2020


The branch, gtk3 has been updated
       via  f139ad4cae4fa0260c838acd082c843c6788159f (commit)
      from  e7e8d71e623eb34956817d797541efa539e65ac7 (commit)

Summary of changes:
 src/gtk/foldersort.c             |  22 -------
 src/gtk/gtkcmclist.c             | 127 ++-------------------------------------
 src/gtk/gtkcmclist.h             |   7 ---
 src/gtk/gtkshruler.c             |  43 -------------
 src/gtk/gtkutils.c               |  13 ----
 src/gtk/menu.h                   |   5 --
 src/gtk/spell_entry.c            |  33 ----------
 src/plugins/dillo/dillo_viewer.c |   6 --
 src/summary_search.c             |   3 -
 9 files changed, 5 insertions(+), 254 deletions(-)


- Log -----------------------------------------------------------------
commit f139ad4cae4fa0260c838acd082c843c6788159f
Author: paul <paul at claws-mail.org>
Date:   Thu Dec 31 11:14:11 2020 +0000

    remove gtk2 code

diff --git a/src/gtk/foldersort.c b/src/gtk/foldersort.c
index abbcf14cf..f416ef6cc 100644
--- a/src/gtk/foldersort.c
+++ b/src/gtk/foldersort.c
@@ -111,9 +111,6 @@ 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));
@@ -121,30 +118,11 @@ 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);
-	if (!gtk_tree_path_prev(path)) {
-		/* No previous path, are we already on top? */
-		gtk_tree_path_free(path);
-		return;
-	}
-
-	if (!gtk_tree_model_get_iter(model, &previter, path)) {
-		/* Eh? */
-		gtk_tree_path_free(path);
-		return;
-	}
-
-	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 105ced569..e02457d38 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -176,14 +176,11 @@ enum {
   ARG_TITLES_ACTIVE,
   ARG_REORDERABLE,
   ARG_USE_DRAG_ICONS,
-  ARG_SORT_TYPE
-#if GTK_CHECK_VERSION(3, 0, 0)
-  ,
+  ARG_SORT_TYPE,
   ARG_HADJUSTMENT,
   ARG_VADJUSTMENT,
   ARG_HSCROLL_POLICY,
   ARG_VSCROLL_POLICY
-#endif
 };
 
 /* GtkCMCList Methods */
@@ -194,11 +191,8 @@ 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
+// #endif
 static void gtk_cmclist_finalize (GObject   *object);
 static void gtk_cmclist_set_arg  (GObject *object,
 				guint      arg_id,
@@ -210,11 +204,6 @@ 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);
@@ -227,14 +216,12 @@ 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,
@@ -477,73 +464,26 @@ 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
-gtk_cmclist_get_type (void)
-{
-  static GType clist_type = 0;
-
-  if (!clist_type)
-    {
-      static const GTypeInfo clist_info =
-      {
-			sizeof (GtkCMCListClass),
-
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-
-			(GClassInitFunc) gtk_cmclist_class_init,
-			(GClassFinalizeFunc) NULL,
-			NULL,	/* class_data */
-
-			sizeof (GtkCMCList),
-			0,	/* n_preallocs */
-			(GInstanceInitFunc) gtk_cmclist_init,
-
-			(const GTypeValueTable *) NULL	/* value table */
-	};
-	clist_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkCMCList", &clist_info, (GTypeFlags)0);
-    }
-
-  return clist_type;
-}
-#else
 G_DEFINE_TYPE_WITH_CODE (GtkCMCList, gtk_cmclist, GTK_TYPE_CONTAINER,
                          G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE,
                          gtk_cmclist_scrollable_init))
-#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;
   
@@ -557,12 +497,8 @@ gtk_cmclist_class_init (GtkCMCListClass *klass)
   widget_class->motion_notify_event = gtk_cmclist_motion;
   widget_class->draw = gtk_cmclist_draw;
 
-#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;
@@ -582,9 +518,6 @@ 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;
@@ -673,23 +606,11 @@ 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),
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (GtkCMCListClass, set_scroll_adjustments),
-			      NULL, NULL,
-			      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_HSCROLL_POLICY, "hscroll-policy");
   g_object_class_override_property (object_class, ARG_VSCROLL_POLICY, "vscroll-policy");
-#endif
 
   clist_signals[SELECT_ROW] =
  		g_signal_new ("select_row",
@@ -1041,7 +962,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;
@@ -1051,7 +971,6 @@ gtk_cmclist_set_arg (GObject *object,
     case ARG_HSCROLL_POLICY:
     case ARG_VSCROLL_POLICY:
       break;
-#endif
     }
 }
 
@@ -1100,7 +1019,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;
@@ -1111,7 +1029,6 @@ gtk_cmclist_get_arg (GObject *object,
     case ARG_VSCROLL_POLICY:
       g_value_set_enum(value, GTK_SCROLL_NATURAL);
       break;
-#endif
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, arg_id, spec);
       break;
@@ -1343,19 +1260,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,
-				  GtkAdjustment *vadjustment)
-{
-  if (clist->hadjustment != hadjustment)
-    gtk_cmclist_set_hadjustment (clist, hadjustment);
-  if (clist->vadjustment != vadjustment)
-    gtk_cmclist_set_vadjustment (clist, vadjustment);
-}
-#endif
-
 void
 gtk_cmclist_set_shadow_type (GtkCMCList      *clist,
 			   GtkShadowType  type)
@@ -3364,11 +3268,6 @@ 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;
@@ -3395,11 +3294,6 @@ 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;
@@ -4506,12 +4400,8 @@ sync_selection (GtkCMCList *clist,
  *   gtk_cmclist_destroy
  *   gtk_cmclist_finalize
  */
-static void
-#if !GTK_CHECK_VERSION(3, 0, 0)
-gtk_cmclist_destroy (GtkObject *object)
-#else
-gtk_cmclist_destroy (GtkWidget *object)
-#endif
+static void gtk_cmclist_destroy (GtkWidget *object)
+
 {
   gint i;
   GtkCMCList *clist;
@@ -4559,13 +4449,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
@@ -5503,7 +5388,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,
@@ -5527,7 +5411,6 @@ gtk_cmclist_get_preferred_height (GtkWidget *widget,
 
   *minimal_height = *natural_height = requisition.height;
 }
-#endif
 
 static void
 gtk_cmclist_size_request (GtkWidget      *widget,
diff --git a/src/gtk/gtkcmclist.h b/src/gtk/gtkcmclist.h
index e3c1f09dd..ea2de3d2b 100644
--- a/src/gtk/gtkcmclist.h
+++ b/src/gtk/gtkcmclist.h
@@ -35,7 +35,6 @@
 G_BEGIN_DECLS
 
 
-#if GTK_CHECK_VERSION(3, 0, 0)
 /* Generic visibility flags */
 typedef enum
 {
@@ -43,7 +42,6 @@ typedef enum
   GTK_VISIBILITY_PARTIAL,
   GTK_VISIBILITY_FULL
 } GtkVisibility;
-#endif
 
 /* clist flags */
 enum {
@@ -243,11 +241,6 @@ 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/gtkshruler.c b/src/gtk/gtkshruler.c
index e3e23bb26..01d2b0b20 100644
--- a/src/gtk/gtkshruler.c
+++ b/src/gtk/gtkshruler.c
@@ -150,27 +150,20 @@ 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,19 +196,11 @@ 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));
@@ -296,11 +281,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;
@@ -717,7 +698,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,
@@ -741,7 +721,6 @@ gtk_shruler_get_preferred_height (GtkWidget *widget,
 
   *minimal_height = *natural_height = requisition.height;
 }
-#endif
 
 static void
 gtk_shruler_size_request (GtkWidget      *widget,
@@ -802,44 +781,22 @@ 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 4db881b0b..b8cdae049 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1247,10 +1247,6 @@ 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)
@@ -1262,11 +1258,6 @@ 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
@@ -1276,10 +1267,6 @@ 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/menu.h b/src/gtk/menu.h
index cfdff872e..94b08c5b9 100644
--- a/src/gtk/menu.h
+++ b/src/gtk/menu.h
@@ -93,11 +93,6 @@ 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_set_sensitive_all(GtkMenuShell *menu_shell, gboolean sensitive);
 
 #endif /* __MENU_H__ */
diff --git a/src/gtk/spell_entry.c b/src/gtk/spell_entry.c
index a29690898..7060027c3 100644
--- a/src/gtk/spell_entry.c
+++ b/src/gtk/spell_entry.c
@@ -45,15 +45,9 @@
 
 static void claws_spell_entry_init		(ClawsSpellEntry *entry);
 static void claws_spell_entry_finalize		(GObject *object);
-#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,
@@ -86,9 +80,6 @@ G_DEFINE_TYPE(ClawsSpellEntry, claws_spell_entry, GTK_TYPE_ENTRY)
 static void claws_spell_entry_class_init(ClawsSpellEntryClass *klass)
 {
 	GObjectClass	*g_object_class;
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	GtkObjectClass	*gtk_object_class;
-#endif
 	GtkWidgetClass	*widget_class;
 	
 	parent_class = g_type_class_peek_parent(klass);
@@ -96,19 +87,10 @@ static void claws_spell_entry_class_init(ClawsSpellEntryClass *klass)
 	g_object_class = G_OBJECT_CLASS(klass);
 	g_object_class->finalize = claws_spell_entry_finalize;
 	
-#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
 	
 	g_type_class_add_private(g_object_class,
 			sizeof(struct _ClawsSpellEntryPriv));
@@ -149,17 +131,10 @@ static void claws_spell_entry_finalize(GObject *object)
 	G_OBJECT_CLASS(parent_class)->finalize(object);
 }
 
-#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)
 {
@@ -454,11 +429,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);
 	GtkEntry *gtk_entry = GTK_ENTRY(widget);
@@ -469,11 +440,7 @@ static gint claws_spell_entry_expose(GtkWidget *widget, cairo_t *cr)
 		pango_layout_set_attributes(layout, entry->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/plugins/dillo/dillo_viewer.c b/src/plugins/dillo/dillo_viewer.c
index 3a48ac20f..8f0a8062f 100644
--- a/src/plugins/dillo/dillo_viewer.c
+++ b/src/plugins/dillo/dillo_viewer.c
@@ -27,9 +27,7 @@
 #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 +63,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(GObject *object, gpointer data)
-#endif
 {
 	DilloViewer *viewer = (DilloViewer *) data;
 	debug_print("Destroyed dillo socket %p\n", viewer->socket);
diff --git a/src/summary_search.c b/src/summary_search.c
index 12f4412e6..48d4a46af 100644
--- a/src/summary_search.c
+++ b/src/summary_search.c
@@ -27,9 +27,6 @@
 #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