diff options
author | sabetts <sabetts> | 2003-08-23 06:48:24 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-08-23 06:48:24 +0000 |
commit | 59ad37223522bb0168b10a85cc891ecb59c30f4c (patch) | |
tree | c6d20345d4bd21337a595442590ac450201338ec /src/actions.c | |
parent | e8d4782f9666d4355718b2c00ef53c464f676da3 (diff) | |
download | ratpoison-59ad37223522bb0168b10a85cc891ecb59c30f4c.zip |
* src/split.c (remove_all_splits): only hide the windows in the
current screen.
* src/group.h (group_delete_group): new prototype
* src/group.c (group_last_window): find the last window in the
current screen.
(group_next_window): find next window in current screen.
(group_prev_window): find previous window in current screen.
* src/manage.c (force_maximize): call XSync() after first resize.
* src/globals.h (GROUP_DELETE_GROUP_OK): new define
(GROUP_DELETE_GROUP_NONEMPTY): likewise
* src/actions.h (cmd_gdelete): new prototype
* src/actions.c (user_commands): new command gdelete
(cmd_gdelete): new command
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c index 9b70e47..700ffd1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -102,7 +102,8 @@ static user_command user_commands[] = {"gprev", cmd_gprev, arg_VOID}, {"gnew", cmd_gnew, arg_VOID}, {"gnewbg", cmd_gnewbg, arg_VOID}, - {"gselect", cmd_gselect, arg_VOID}, + {"gselect", cmd_gselect, arg_STRING}, + {"gdelete", cmd_gdelete, arg_STRING}, {"groups", cmd_groups, arg_VOID}, {"gmove", cmd_gmove, arg_VOID}, {"gmerge", cmd_gmerge, arg_VOID}, @@ -3817,7 +3818,36 @@ cmd_listhook (int interactive, char *data) free(buffer); return tmp; } +} + +char * +cmd_gdelete (int interactive, char *data) +{ + rp_group *g; + if (data == NULL) + g = rp_current_group; + else + { + g = find_group (data); + if (!g) + { + message (" gdelete: cannot find group "); + return NULL; + } + } + + switch (group_delete_group (g)) + { + case GROUP_DELETE_GROUP_OK: + break; + case GROUP_DELETE_GROUP_NONEMPTY: + message (" gdelete: non-empty group "); + break; + default: + message (" gdelete: Unknown return code (this shouldn't happen) "); + } + return NULL; } |