2006-08-16 [paul] 2.4.0cvs52
authorPaul Mangan <paul@claws-mail.org>
Wed, 16 Aug 2006 08:17:35 +0000 (08:17 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 16 Aug 2006 08:17:35 +0000 (08:17 +0000)
* src/toolbar.c
workaround GTK+ Bug 351600 - 'Can't re-click
on button after sensitivity update'
http://bugzilla.gnome.org/show_bug.cgi?id=351600
Thanks to Colin

ChangeLog
PATCHSETS
configure.ac
src/toolbar.c

index a4b695963d78c3ea196649463b58715810011029..e3b224623bfabb4a75e3fb3356112319b1578755 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-16 [paul]      2.4.0cvs52
+
+       * src/toolbar.c
+               workaround GTK+ Bug 351600 - 'Can't re-click
+               on button after sensitivity update'
+               http://bugzilla.gnome.org/show_bug.cgi?id=351600
+               Thanks to Colin
+
 2006-08-15 [colin]     2.4.0cvs51
 
        * src/plugins/pgpcore/prefs_gpg.c
index d11225169a107e1e9504ddde69ad32094d7ec0f4..fb9c8d33064b3dfc5c759e69b0eaf2591c883848 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/addressbook_foldersel.c;  ) > 2.4.0cvs49.patchset
 ( cvs diff -u -r 1.5.2.35 -r 1.5.2.36 src/gtk/gtkutils.c;  cvs diff -u -r 1.5.2.31 -r 1.5.2.32 src/gtk/pluginwindow.c;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/plugins/pgpcore/passphrase.c;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/pgpcore/passphrase.h;  cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/plugins/pgpcore/plugin.c;  cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/plugins/pgpcore/prefs_gpg.c;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/pgpcore/prefs_gpg.h;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/plugins/pgpcore/sgpgme.c;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/pgpcore/sgpgme.h;  ) > 2.4.0cvs50.patchset
 ( cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/plugins/pgpcore/prefs_gpg.c;  cvs diff -u -r 1.1.2.24 -r 1.1.2.25 src/plugins/pgpcore/sgpgme.c;  ) > 2.4.0cvs51.patchset
+( cvs diff -u -r 1.43.2.49 -r 1.43.2.50 src/toolbar.c;  ) > 2.4.0cvs52.patchset
index dd877b8607ee21ff1e297cb6077583f85610c01e..a08ff9e027ce68cc4fdc6531fa2cfc614f953efa 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=51
+EXTRA_VERSION=52
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f1a404e92b9077748ea08577c41dba1f855a8248..2effdeb24d67b5479d9af88ae7c5789a1081626c 100644 (file)
@@ -1838,6 +1838,15 @@ void toolbar_update(ToolbarType type, gpointer data)
        }
 }
 
+#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) {           \
+       gboolean in_btn = FALSE;                                \
+       if (GTK_IS_BUTTON(widget))                              \
+               in_btn = GTK_BUTTON(widget)->in_button;         \
+       gtk_widget_set_sensitive(widget, sensitive);            \
+       if (GTK_IS_BUTTON(widget))                              \
+               GTK_BUTTON(widget)->in_button = in_btn;         \
+}
+
 void toolbar_main_set_sensitive(gpointer data)
 {
        SensitiveCond state;
@@ -1960,7 +1969,7 @@ void toolbar_main_set_sensitive(gpointer data)
 
                if (e->widget != NULL) {
                        sensitive = ((e->cond & state) == e->cond);
-                       gtk_widget_set_sensitive(e->widget, sensitive); 
+                       GTK_BUTTON_SET_SENSITIVE(e->widget, sensitive); 
                }
        }
        
@@ -1984,32 +1993,32 @@ void toolbar_comp_set_sensitive(gpointer data, gboolean sensitive)
        GSList *items = compose->toolbar->action_list;
 
        if (compose->toolbar->send_btn)
-               gtk_widget_set_sensitive(compose->toolbar->send_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->send_btn, sensitive);
        if (compose->toolbar->sendl_btn)
-               gtk_widget_set_sensitive(compose->toolbar->sendl_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->sendl_btn, sensitive);
        if (compose->toolbar->draft_btn )
-               gtk_widget_set_sensitive(compose->toolbar->draft_btn , sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->draft_btn , sensitive);
        if (compose->toolbar->insert_btn )
-               gtk_widget_set_sensitive(compose->toolbar->insert_btn , sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->insert_btn , sensitive);
        if (compose->toolbar->attach_btn)
-               gtk_widget_set_sensitive(compose->toolbar->attach_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->attach_btn, sensitive);
        if (compose->toolbar->sig_btn)
-               gtk_widget_set_sensitive(compose->toolbar->sig_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->sig_btn, sensitive);
        if (compose->toolbar->exteditor_btn)
-               gtk_widget_set_sensitive(compose->toolbar->exteditor_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->exteditor_btn, sensitive);
        if (compose->toolbar->linewrap_current_btn)
-               gtk_widget_set_sensitive(compose->toolbar->linewrap_current_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->linewrap_current_btn, sensitive);
        if (compose->toolbar->linewrap_all_btn)
-               gtk_widget_set_sensitive(compose->toolbar->linewrap_all_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->linewrap_all_btn, sensitive);
        if (compose->toolbar->addrbook_btn)
-               gtk_widget_set_sensitive(compose->toolbar->addrbook_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->addrbook_btn, sensitive);
 #ifdef USE_ASPELL
        if (compose->toolbar->spellcheck_btn)
-               gtk_widget_set_sensitive(compose->toolbar->spellcheck_btn, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(compose->toolbar->spellcheck_btn, sensitive);
 #endif
        for (; items != NULL; items = g_slist_next(items)) {
                ToolbarSylpheedActions *item = (ToolbarSylpheedActions *)items->data;
-               gtk_widget_set_sensitive(item->widget, sensitive);
+               GTK_BUTTON_SET_SENSITIVE(item->widget, sensitive);
        }
 }