commit e200f88614b2ad794fd3370690f3bbe044b34ce1
parent 29433018c7f23c449aff6a4708aa19f6f22b8ab5
Author: Paul Mangan <paul@claws-mail.org>
Date: Sat, 19 Dec 2009 17:02:11 +0000
2009-12-19 [paul] 3.7.3cvs40
* src/statusbar.c
fix statusbar in GTK+ 2.19.1
Diffstat:
4 files changed, 22 insertions(+), 12 deletions(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -3913,3 +3913,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/statusbar.c b/src/statusbar.c
@@ -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;
}