Commit b933d92c647ae6e533aa4713abfb532bbb2ac2b7
1 parent
0478f33b
Exists in
master
and in
4 other branches
Testing if the action is enabled before activation.
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/actions/testprogram/testprogram.c
@@ -52,9 +52,11 @@ | @@ -52,9 +52,11 @@ | ||
52 | 52 | ||
53 | if(!action) { | 53 | if(!action) { |
54 | g_message("Invalid action name: \"%s\"",args); | 54 | g_message("Invalid action name: \"%s\"",args); |
55 | - } else { | 55 | + } else if(g_action_get_enabled(action)) { |
56 | g_message("Activating action \"%s\"",args); | 56 | g_message("Activating action \"%s\"",args); |
57 | g_action_activate(action,NULL); | 57 | g_action_activate(action,NULL); |
58 | + } else { | ||
59 | + g_message("Action \"%s\" is disabled",args); | ||
58 | } | 60 | } |
59 | 61 | ||
60 | return TRUE; | 62 | return TRUE; |