]> git.mdlowis.com Git - proto/labwc.git/commitdiff
action: make action_arg_add_bool() static
authorJohan Malm <jgm323@gmail.com>
Sun, 26 Mar 2023 21:01:17 +0000 (22:01 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 26 Apr 2023 14:11:31 +0000 (15:11 +0100)
include/action.h
src/action.c

index c26f15a8697575f85f7f8d759c219a276d89c537..3f466e45152052d74ce130a9cecb63da4a63d08a 100644 (file)
@@ -21,7 +21,6 @@ struct action {
 struct action *action_create(const char *action_name);
 
 void action_arg_add_str(struct action *action, char *key, const char *value);
-void action_arg_add_bool(struct action *action, char *key, bool value);
 
 void action_arg_from_xml_node(struct action *action, char *nodename, char *content);
 
index a6bcfa9ae513399e42a37f5b7170cefcff2b0cb0..3f7042ca23b2d8346be69dd44b30d94eeeac02a9 100644 (file)
@@ -104,6 +104,31 @@ const char *action_names[] = {
        NULL
 };
 
+void
+action_arg_add_str(struct action *action, char *key, const char *value)
+{
+       assert(value && "Tried to add NULL action string argument");
+       struct action_arg_str *arg = znew(*arg);
+       arg->base.type = LAB_ACTION_ARG_STR;
+       if (key) {
+               arg->base.key = xstrdup(key);
+       }
+       arg->value = xstrdup(value);
+       wl_list_append(&action->args, &arg->base.link);
+}
+
+static void
+action_arg_add_bool(struct action *action, char *key, bool value)
+{
+       struct action_arg_bool *arg = znew(*arg);
+       arg->base.type = LAB_ACTION_ARG_BOOL;
+       if (key) {
+               arg->base.key = xstrdup(key);
+       }
+       arg->value = value;
+       wl_list_append(&action->args, &arg->base.link);
+}
+
 void
 action_arg_from_xml_node(struct action *action, char *nodename, char *content)
 {
@@ -538,27 +563,3 @@ actions_run(struct view *activator, struct server *server,
        }
 }
 
-void
-action_arg_add_str(struct action *action, char *key, const char *value)
-{
-       assert(value && "Tried to add NULL action string argument");
-       struct action_arg_str *arg = znew(*arg);
-       arg->base.type = LAB_ACTION_ARG_STR;
-       if (key) {
-               arg->base.key = xstrdup(key);
-       }
-       arg->value = xstrdup(value);
-       wl_list_append(&action->args, &arg->base.link);
-}
-
-void
-action_arg_add_bool(struct action *action, char *key, bool value)
-{
-       struct action_arg_bool *arg = znew(*arg);
-       arg->base.type = LAB_ACTION_ARG_BOOL;
-       if (key) {
-               arg->base.key = xstrdup(key);
-       }
-       arg->value = value;
-       wl_list_append(&action->args, &arg->base.link);
-}