diff options
author | sabetts <sabetts> | 2006-11-17 11:48:01 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2006-11-17 11:48:01 +0000 |
commit | df8d155eb949041943aa36baa4d0d485136922f9 (patch) | |
tree | fb4a0241981c75dda365f423f2acc96c027d4941 /src/actions.c | |
parent | 823f6297c6813ac9b55af456892910f08178d873 (diff) | |
download | ratpoison-df8d155eb949041943aa36baa4d0d485136922f9.zip |
* src/split.c (show_frame_indicator): use defaults.frame_fmt
(show_frame_message): format frame_fmt string with format_string
* src/messages.h (MESSAGE_FRAME_STRING): removed
* src/main.c (init_defaults): init defaults.frame_fmt
* src/data.h (struct rp_defaults): add frame_fmt
* src/actions.c (set_framefmt): new function
(init_set_vars): new set var "framefmt"
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c index 4a0b8f3..da01aba 100644 --- a/src/actions.c +++ b/src/actions.c @@ -57,6 +57,7 @@ static cmdret * set_inputwidth (struct cmdarg **args); static cmdret * set_waitcursor (struct cmdarg **args); static cmdret * set_winfmt (struct cmdarg **args); static cmdret * set_winname (struct cmdarg **args); +static cmdret * set_framefmt (struct cmdarg **args); static cmdret * set_fgcolor (struct cmdarg **args); static cmdret * set_bgcolor (struct cmdarg **args); static cmdret * set_barpadding (struct cmdarg **args); @@ -111,6 +112,7 @@ init_set_vars(void) add_set_var ("waitcursor", set_waitcursor, 1, "", arg_NUMBER); add_set_var ("winfmt", set_winfmt, 1, "", arg_REST); add_set_var ("winname", set_winname, 1, "", arg_STRING); + add_set_var ("framefmt", set_framefmt, 1, "", arg_REST); add_set_var ("fgcolor", set_fgcolor, 1, "", arg_STRING); add_set_var ("bgcolor", set_bgcolor, 1, "", arg_STRING); add_set_var ("barpadding", set_barpadding, 2, "", arg_NUMBER, "", arg_NUMBER); @@ -3721,6 +3723,18 @@ set_winname (struct cmdarg **args) } static cmdret * +set_framefmt (struct cmdarg **args) +{ + if (args[0] == NULL) + return cmdret_new (RET_SUCCESS, "%s", defaults.frame_fmt); + + free (defaults.frame_fmt); + defaults.frame_fmt = xstrdup (ARG_STRING(0)); + + return cmdret_new (RET_SUCCESS, NULL); +} + +static cmdret * set_fgcolor (struct cmdarg **args) { int i; |