diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-05-11 07:34:25 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-05-11 07:34:25 +0000 |
commit | f55b0c5e30c04f7b6630f3d860e8ef2901a72b6c (patch) | |
tree | 39045e6b218f043eda216686477d6165c812434a /src | |
parent | cc3055a48d4b90d86dc1f5b3878046795b2ed5b6 (diff) |
made a workaround for GTK+ bug #56070.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1690 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index 2d979873..742e88d5 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1872,7 +1872,7 @@ static SensitiveCond main_window_get_current_state(MainWindow *mainwin) void main_window_set_toolbar_sensitive(MainWindow *mainwin) { SensitiveCond state; - gboolean sensitive; + gboolean sensitive, prev_sensitive; gint n; gint i = 0; @@ -1924,8 +1924,18 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin) n = sizeof(entry) / sizeof(entry[0]); for (i = 0; i < n; i++) { if (entry[i].widget) { + prev_sensitive = + GTK_WIDGET_IS_SENSITIVE(entry[i].widget); sensitive = ((entry[i].cond & state) == entry[i].cond); - gtk_widget_set_sensitive(entry[i].widget, sensitive); + if (prev_sensitive != sensitive) { + /* workaround for GTK+ bug (#56070) */ + if (!prev_sensitive) + gtk_widget_hide(entry[i].widget); + gtk_widget_set_sensitive(entry[i].widget, + sensitive); + if (!prev_sensitive) + gtk_widget_show(entry[i].widget); + } } } } |