diff options
author | sabetts <sabetts> | 2003-04-11 22:25:19 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-04-11 22:25:19 +0000 |
commit | 82326f9f3e2bcbf7eca407944a7a77387d79f0b8 (patch) | |
tree | afc5b3f6d8a08a74b69bdfad2908b4319b5dea9d /src/actions.c | |
parent | 8313f4587c369d9862e9eb1a31a671181c402029 (diff) | |
download | ratpoison-82326f9f3e2bcbf7eca407944a7a77387d79f0b8.zip |
* src/window.c (window_name): use WIN_NAME_* defines for possible
defaults.win_name values.
(window_name): remove case WIN_NAME_TITLE and glob it with the
default switch.
* src/main.c (init_defaults): use WIN_NAME_* defines for
possible defaults.win_name values.
* src/actions.c (cmd_defwinname): use WIN_NAME_* defines for
possible defaults.win_name values.
(cmd_defwinname): likewise
* src/data.h (WIN_NAME_TITLE): new define
(WIN_NAME_RES_CLASS): new define
(WIN_NAME_RES_NAME): new define
* src/window.c (add_to_window_list): use xstrdup to create the
default value for user_name.
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/actions.c b/src/actions.c index 1bd0930..4c4f221 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2222,11 +2222,11 @@ cmd_defwinname (int interactive, char *data) if (data == NULL && !interactive) switch (defaults.win_name) { - case 0: + case WIN_NAME_TITLE: return xstrdup ("title"); - case 1: + case WIN_NAME_RES_NAME: return xstrdup ("name"); - case 2: + case WIN_NAME_RES_CLASS: return xstrdup ("class"); default: PRINT_DEBUG (("Unknown win_name\n")); @@ -2244,11 +2244,11 @@ cmd_defwinname (int interactive, char *data) /* FIXME: Using strncmp is sorta dirty since `title' and `titlefoobar' would both match. But its quick and dirty. */ if (!strncmp (name, "title", 5)) - defaults.win_name = 0; + defaults.win_name = WIN_NAME_TITLE; else if (!strncmp (name, "name", 4)) - defaults.win_name = 1; + defaults.win_name = WIN_NAME_RES_NAME; else if (!strncmp (name, "class", 5)) - defaults.win_name = 2; + defaults.win_name = WIN_NAME_RES_CLASS; else message (" defwinname: invalid argument "); |