Commit b933d92c647ae6e533aa4713abfb532bbb2ac2b7

Authored by Perry Werneck
1 parent 0478f33b

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 52  
53 53 if(!action) {
54 54 g_message("Invalid action name: \"%s\"",args);
55   - } else {
  55 + } else if(g_action_get_enabled(action)) {
56 56 g_message("Activating action \"%s\"",args);
57 57 g_action_activate(action,NULL);
  58 + } else {
  59 + g_message("Action \"%s\" is disabled",args);
58 60 }
59 61  
60 62 return TRUE;
... ...