2009-12-19 [paul] 3.7.3cvs40
authorPaul Mangan <paul@claws-mail.org>
Sat, 19 Dec 2009 17:02:11 +0000 (17:02 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 19 Dec 2009 17:02:11 +0000 (17:02 +0000)
* src/statusbar.c
fix statusbar in GTK+ 2.19.1

ChangeLog
PATCHSETS
configure.ac
src/statusbar.c

index e17bd1e..8d1bbde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-19 [paul]      3.7.3cvs40
+
+       * src/statusbar.c
+               fix statusbar in GTK+ 2.19.1
+
 2009-12-10 [pawel]     3.7.3cvs39
 
        * src/compose.c
index 5d206f5..a94522c 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.534 -r 1.382.2.535 src/compose.c;  ) > 3.7.3cvs37.patchset
 ( cvs diff -u -r 1.382.2.535 -r 1.382.2.536 src/compose.c;  ) > 3.7.3cvs38.patchset
 ( cvs diff -u -r 1.382.2.536 -r 1.382.2.537 src/compose.c;  ) > 3.7.3cvs39.patchset
+( cvs diff -u -r 1.5.2.25 -r 1.5.2.26 src/statusbar.c;  ) > 3.7.3cvs40.patchset
index 59e7436..03ce4f0 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=39
+EXTRA_VERSION=40
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index fb5bd22..179da57 100644 (file)
@@ -50,6 +50,9 @@ gint statusbar_puts_all_hook_id = -1;
 GtkWidget *statusbar_create(void)
 {
        GtkWidget *statusbar;
+       GtkWidget *child;
+       GtkWidget *parent;
+       GtkWidget *hbox;
 
        statusbar = gtk_statusbar_new();
        gtk_widget_set_size_request(statusbar, 1, -1);
@@ -57,17 +60,18 @@ GtkWidget *statusbar_create(void)
        gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar), 
                                          FALSE);
        gtk_container_set_border_width(GTK_CONTAINER(statusbar), 1);
-
-       g_object_ref(GTK_STATUSBAR(statusbar)->label);
-       gtk_container_remove(GTK_CONTAINER(GTK_STATUSBAR(statusbar)->frame),
-               GTK_STATUSBAR(statusbar)->label);
-       gtk_widget_hide(GTK_STATUSBAR(statusbar)->frame);
-       gtk_box_pack_start (GTK_BOX(statusbar), GTK_STATUSBAR(statusbar)->label, 
-               TRUE, TRUE, 0);
-       g_object_unref(GTK_STATUSBAR(statusbar)->label);
-       gtk_container_remove(GTK_CONTAINER(statusbar),
-               GTK_STATUSBAR(statusbar)->frame);
-       GTK_STATUSBAR(statusbar)->frame = gtk_frame_new(NULL);
+#if GTK_CHECK_VERSION (2, 19, 1)
+       child = gtk_statusbar_get_message_area(GTK_STATUSBAR(statusbar));
+#else
+       child = GTK_STATUSBAR(statusbar)->label;
+#endif
+       parent = gtk_widget_get_parent(child);
+       gtk_container_remove(GTK_CONTAINER(parent), g_object_ref(child));
+       hbox = gtk_hbox_new(FALSE, 0);
+       gtk_container_add(GTK_CONTAINER(parent), hbox);
+       gtk_widget_show(hbox);
+       gtk_box_pack_start(GTK_BOX(hbox), child, TRUE, TRUE, 0);
+       g_object_unref(child);  
 
        return statusbar;
 }