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 | |
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 6 | ||||
-rw-r--r-- | src/mainwindow.c | 14 |
3 files changed, 24 insertions, 2 deletions
@@ -1,5 +1,11 @@ 2007-05-10 + * src/mainwindow.c: main_window_set_toolbar_sensitive(): made a + workaround for the GTK+ bug (Bug 56070 - Can't click button after + setting it sensitive.) + +2007-05-10 + * src/summaryview.c: fixed wrong status on persist qsearch filter. 2007-05-10 diff --git a/ChangeLog.ja b/ChangeLog.ja index 6381a255..fa8db3d5 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,11 @@ 2007-05-10 + * src/mainwindow.c: main_window_set_toolbar_sensitive(): GTK+ のバグ + (Bug 56070 - Can't click button after setting it sensitive.) + への対策を行った。 + +2007-05-10 + * src/summaryview.c: 持続するクイック検索フィルタでステータスが誤って いたのを修正。 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); + } } } } |