[balsa/gtk3] GtkTable is deprecated



commit 55f59741a5f5a703815b157f38d9b72c21382355
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Apr 11 07:57:49 2013 -0400

    GtkTable is deprecated
    
        * libbalsa/misc.c (lb_create_size_group_func): GtkTable is
        deprecated.

 ChangeLog       |    5 +++++
 libbalsa/misc.c |    9 +++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f12ab71..79bab08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-04-11  Peter Bloomfield
 
+       * libbalsa/misc.c (lb_create_size_group_func): GtkTable is
+       deprecated.
+
+2013-04-11  Peter Bloomfield
+
        * libbalsa/libbalsa.c (libbalsa_init): g_thread_supported is
        deprecated in glib-2.36.
 
diff --git a/libbalsa/misc.c b/libbalsa/misc.c
index c2901f1..16438c6 100644
--- a/libbalsa/misc.c
+++ b/libbalsa/misc.c
@@ -1174,6 +1174,14 @@ libbalsa_create_grid_entry(GtkWidget * grid, GCallback changed_func,
 static void
 lb_create_size_group_func(GtkWidget * widget, gpointer data)
 {
+#if GTK_CHECK_VERSION(3, 4, 0)
+    if (GTK_IS_LABEL(widget) &&
+         GTK_IS_GRID(gtk_widget_get_parent(widget)))
+        gtk_size_group_add_widget(GTK_SIZE_GROUP(data), widget);
+    else if (GTK_IS_CONTAINER(widget))
+        gtk_container_foreach(GTK_CONTAINER(widget),
+                              lb_create_size_group_func, data);
+#else                           /* GTK_CHECK_VERSION(3, 4, 0) */
     if (GTK_IS_LABEL(widget) &&
         (GTK_IS_TABLE(gtk_widget_get_parent(widget)) ||
          GTK_IS_GRID(gtk_widget_get_parent(widget))))
@@ -1181,6 +1189,7 @@ lb_create_size_group_func(GtkWidget * widget, gpointer data)
     else if (GTK_IS_CONTAINER(widget))
         gtk_container_foreach(GTK_CONTAINER(widget),
                               lb_create_size_group_func, data);
+#endif                          /* GTK_CHECK_VERSION(3, 4, 0) */
 }
 
 GtkSizeGroup *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]