2012-11-15 [colin] 3.9.0cvs5
authorColin Leroy <colin@colino.net>
Thu, 15 Nov 2012 14:27:37 +0000 (14:27 +0000)
committerColin Leroy <colin@colino.net>
Thu, 15 Nov 2012 14:27:37 +0000 (14:27 +0000)
* src/main.c
* src/statusbar.c
* src/gtk/gtkcmclist.c
* src/gtk/gtkcmclist.h
a few more GTK+3 fixes. Segfaults on me, though.

ChangeLog
PATCHSETS
configure.ac
src/gtk/gtkcmclist.c
src/gtk/gtkcmclist.h
src/main.c
src/statusbar.c

index 0010578cf4009d1b08dcc42003c4cdb9a48dcd2d..d8146e6433c5db58fb0c2c752a3b7997ae394c2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-11-15 [colin]     3.9.0cvs5
+
+       * src/main.c
+       * src/statusbar.c
+       * src/gtk/gtkcmclist.c
+       * src/gtk/gtkcmclist.h
+               a few more GTK+3 fixes. Segfaults on me, though.
+
 2012-11-15 [colin]     3.9.0cvs4
 
        * src/Makefile.am
index efc95836f3cc24a230aff15e4e2d7e791a2a4588..161d5bdaccdb5931f347832a5d3c245f84cd666e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.3.2.39 -r 1.3.2.40 src/ssl_manager.c;  cvs diff -u -r 1.9.2.37 -r 1.9.2.38 src/gtk/sslcertwindow.c;  ) > 3.9.0cvs2.patchset
 ( cvs diff -u -r 1.1.2.12 -r 1.1.2.13 doc/man/claws-mail.1;  cvs diff -u -r 1.115.2.259 -r 1.115.2.260 src/main.c;  ) > 3.9.0cvs3.patchset
 ( cvs diff -u -r 1.155.2.103 -r 1.155.2.104 src/Makefile.am;  cvs diff -u -r 1.12.2.77 -r 1.12.2.78 src/action.c;  cvs diff -u -r 1.27.2.65 -r 1.27.2.66 src/addr_compl.c;  cvs diff -u -r 1.60.2.152 -r 1.60.2.153 src/addressbook.c;  cvs diff -u -r 1.5.10.39 -r 1.5.10.40 src/addrgather.c;  cvs diff -u -r 1.382.2.617 -r 1.382.2.618 src/compose.c;  cvs diff -u -r 1.14.2.65 -r 1.14.2.66 src/editaddress.c;  cvs diff -u -r 1.11.2.30 -r 1.11.2.31 src/editgroup.c;  cvs diff -u -r 1.115.2.260 -r 1.115.2.261 src/main.c;  cvs diff -u -r 1.274.2.354 -r 1.274.2.355 src/mainwindow.c;  cvs diff -u -r 1.3.12.43 -r 1.3.12.44 src/message_search.c;  cvs diff -u -r 1.16.2.46 -r 1.16.2.47 src/prefs_display_header.c;  cvs diff -u -r 1.1.4.79 -r 1.1.4.80 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.96 -r 1.43.2.97 src/prefs_matcher.c;  cvs diff -u -r 1.1.2.48 -r 1.1.2.49 src/prefs_other.c;  cvs diff -u -r 1.30.2.75 -r 1.30.2.76 src/prefs_toolbar.c;  cvs diff -u -r 1.1.2.40 -r 1.1.2.41 src/printing.c;  cvs diff -u -r 1.25.2.76 -r 1.25.2.77 src/stock_pixmap.c;  cvs diff -u -r 1.15.2.74 -r 1.15.2.75 src/summary_search.c;  cvs diff -u -r 1.395.2.456 -r 1.395.2.457 src/summaryview.c;  cvs diff -u -r 1.96.2.254 -r 1.96.2.255 src/textview.c;  cvs diff -u -r 1.20.2.28 -r 1.20.2.29 src/gtk/Makefile.am;  cvs diff -u -r 1.2.2.37 -r 1.2.2.38 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.2.26 -r 1.1.2.27 src/gtk/combobox.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/gtk/combobox.h;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/gtk/gtkcmclist.c;  cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/gtk/gtkcmclist.h;  cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/gtk/gtkcmctree.c;  cvs diff -u -r 1.1.4.65 -r 1.1.4.66 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.4.23 -r 1.1.4.24 src/gtk/gtkshruler.c;  cvs diff -u -r 1.5.2.105 -r 1.5.2.106 src/gtk/gtkutils.c;  cvs diff -u -r 1.4.2.67 -r 1.4.2.68 src/gtk/gtkutils.h;  cvs diff -u -r 1.2.2.48 -r 1.2.2.49 src/gtk/inputdialog.c;  cvs diff -u -r 1.1.2.119 -r 1.1.2.120 src/gtk/quicksearch.c;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/plugins/pgpcore/Makefile.am;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/plugins/pgpinline/Makefile.am;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/plugins/pgpmime/Makefile.am;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/smime/Makefile.am;  ) > 3.9.0cvs4.patchset
+( cvs diff -u -r 1.115.2.261 -r 1.115.2.262 src/main.c;  cvs diff -u -r 1.5.2.33 -r 1.5.2.34 src/statusbar.c;  cvs diff -u -r 1.1.2.24 -r 1.1.2.25 src/gtk/gtkcmclist.c;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/gtk/gtkcmclist.h;  ) > 3.9.0cvs5.patchset
index 2ab5b3e6d9979c51a3e9f9f4eca71d5a4d2ac587..5e697f4dc172593e36d9e468244f07ff7bda2f05 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=4
+EXTRA_VERSION=5
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index db17f9d276d94ba865a2b41ba825c06e85d7524a..f4bee46fe41386436ef5c3f5f813e44987134d6a 100644 (file)
@@ -175,6 +175,13 @@ 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 */
@@ -201,9 +208,11 @@ 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);
@@ -467,11 +476,13 @@ static void drag_dest_cell            (GtkCMCList         *clist,
 
 
 
-static GtkContainerClass *parent_class = NULL;
 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)
 {
@@ -499,6 +510,11 @@ 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)
@@ -519,7 +535,9 @@ gtk_cmclist_class_init (GtkCMCListClass *klass)
   widget_class = (GtkWidgetClass *) klass;
   container_class = (GtkContainerClass *) klass;
 
-  parent_class = g_type_class_peek (GTK_TYPE_CONTAINER);
+#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)
@@ -568,7 +586,9 @@ 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;
@@ -667,6 +687,12 @@ 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] =
@@ -1019,6 +1045,17 @@ 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
     }
 }
 
@@ -1067,6 +1104,18 @@ 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;
@@ -1156,7 +1205,7 @@ gtk_cmclist_constructor (GType                  type,
                       guint                  n_construct_properties,
                       GObjectConstructParam *construct_properties)
 {
-  GObject *object = G_OBJECT_CLASS (parent_class)->constructor (type,
+  GObject *object = G_OBJECT_CLASS (gtk_cmclist_parent_class)->constructor (type,
                                                                n_construct_properties,
                                                                construct_properties);
   GtkCMCList *clist = GTK_CMCLIST (object);
@@ -1330,6 +1379,7 @@ 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,
@@ -1340,6 +1390,7 @@ 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,
@@ -4504,11 +4555,11 @@ gtk_cmclist_destroy (GtkWidget *object)
       }
 
 #if !GTK_CHECK_VERSION(3, 0, 0)
-  if (GTK_OBJECT_CLASS (parent_class)->destroy)
-    (*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+  if (GTK_OBJECT_CLASS (gtk_cmclist_parent_class)->destroy)
+    (*GTK_OBJECT_CLASS (gtk_cmclist_parent_class)->destroy) (object);
 #else
-  if (GTK_WIDGET_CLASS (parent_class)->destroy)
-    (*GTK_WIDGET_CLASS (parent_class)->destroy) (object);
+  if (GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->destroy)
+    (*GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->destroy) (object);
 #endif
 }
 
@@ -4527,7 +4578,7 @@ gtk_cmclist_finalize (GObject *object)
   g_mem_chunk_destroy (clist->cell_mem_chunk);
   g_mem_chunk_destroy (clist->row_mem_chunk);
 #endif
-  G_OBJECT_CLASS (parent_class)->finalize (object);
+  G_OBJECT_CLASS (gtk_cmclist_parent_class)->finalize (object);
 }
 
 /* GTKWIDGET
@@ -4769,8 +4820,8 @@ gtk_cmclist_unrealize (GtkWidget *widget)
 
   clist->cursor_drag = NULL;
 
-  if (GTK_WIDGET_CLASS (parent_class)->unrealize)
-    (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
+  if (GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->unrealize)
+    (* GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->unrealize) (widget);
 }
 
 static void
@@ -4939,8 +4990,8 @@ gtk_cmclist_style_set (GtkWidget *widget,
 
   cm_return_if_fail (GTK_IS_CMCLIST (widget));
 
-  if (GTK_WIDGET_CLASS (parent_class)->style_set)
-    (*GTK_WIDGET_CLASS (parent_class)->style_set) (widget, previous_style);
+  if (GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->style_set)
+    (*GTK_WIDGET_CLASS (gtk_cmclist_parent_class)->style_set) (widget, previous_style);
 
   clist = GTK_CMCLIST (widget);
 
@@ -6581,7 +6632,8 @@ gtk_cmclist_set_focus_child (GtkContainer *container,
     if (clist->column[i].button == child)
       clist->focus_header_column = i;
   
-  parent_class->set_focus_child (container, child);
+  if (GTK_CONTAINER_CLASS (gtk_cmclist_parent_class)->set_focus_child)
+    (*GTK_CONTAINER_CLASS (gtk_cmclist_parent_class)->set_focus_child) (container, child);
 }
 
 static void
index b2518c2fc5036e0e503f4b5f39389a29ffa69053..17f1e3ac4e87565ba48eb4c78bb6fe9ebf151673 100644 (file)
@@ -248,9 +248,11 @@ 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,
index daa8ae62fb8a452d82eca6586df480fcc4c93142..1a1d717fc21efd65c7efc4aca34732392384c05a 100644 (file)
@@ -615,7 +615,7 @@ static gboolean sc_process_ice_messages (GIOChannel   *source,
        if (status == IceProcessMessagesIOError) {
                IcePointer context = IceGetConnectionContext (connection);
 
-               if (context && GTK_IS_OBJECT (context)) {
+               if (context && G_IS_OBJECT(context)) {
                guint disconnect_id = g_signal_lookup ("disconnect", G_OBJECT_TYPE (context));
 
                if (disconnect_id > 0)
index 25f9ef0cb1cb1e937ef4a58328451ef947e6e96b..3d826b97226931f68d6059e6aa0812e30eedce25 100644 (file)
@@ -61,9 +61,6 @@ GtkWidget *statusbar_create(void)
 #if !GTK_CHECK_VERSION(3, 0, 0)
        gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar), 
                                          FALSE);
-#else
-       gtk_window_set_has_resize_grip(GTK_WINDOW(statusbar), 
-                                         FALSE);
 #endif
        gtk_container_set_border_width(GTK_CONTAINER(statusbar), 1);
        child = gtk_statusbar_get_message_area(GTK_STATUSBAR(statusbar));