diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-11-17 22:36:27 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-11-17 22:36:27 +0000 |
commit | eda4f1134f86b271d8b042574df84a95937d4323 (patch) | |
tree | 19b81ffa1e129e69f58fd6ad09bc2e2a2741fec4 /gtk/gtkaction.c | |
parent | 03522ef802df0d29d18c7bba5c5010185751bd52 (diff) | |
download | gtk+-eda4f1134f86b271d8b042574df84a95937d4323.tar.gz |
Only activate if the action is sensitive. (#127187, Christian Persch)
Mon Nov 17 23:36:02 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_activate): Only activate if
the action is sensitive. (#127187, Christian Persch)
Diffstat (limited to 'gtk/gtkaction.c')
-rw-r--r-- | gtk/gtkaction.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 28694bab2f..7193312bf6 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -875,8 +875,9 @@ disconnect_proxy (GtkAction *action, * gtk_action_activate: * @action: the action object * - * Emits the "activate" signal on the specified action. - * This gets called by the proxy widgets when they get activated. + * Emits the "activate" signal on the specified action, if it isn't + * insensitive. This gets called by the proxy widgets when they get + * activated. * * It can also be used to manually activate an action. * @@ -885,7 +886,10 @@ disconnect_proxy (GtkAction *action, void gtk_action_activate (GtkAction *action) { - g_signal_emit (action, action_signals[ACTIVATE], 0); + g_return_if_fail (GTK_IS_ACTION (action)); + + if (action->private_data->sensitive) + g_signal_emit (action, action_signals[ACTIVATE], 0); } /** |