mirror of
https://github.com/profanity-im/profanity.git
synced 2025-07-26 12:14:28 -04:00
Added /win command to access unlimited windows
This commit is contained in:
parent
659e449e12
commit
4738a15c89
@ -143,6 +143,7 @@ static gboolean _cmd_tiny(gchar **args, struct cmd_help_t help);
|
|||||||
static gboolean _cmd_titlebar(gchar **args, struct cmd_help_t help);
|
static gboolean _cmd_titlebar(gchar **args, struct cmd_help_t help);
|
||||||
static gboolean _cmd_vercheck(gchar **args, struct cmd_help_t help);
|
static gboolean _cmd_vercheck(gchar **args, struct cmd_help_t help);
|
||||||
static gboolean _cmd_who(gchar **args, struct cmd_help_t help);
|
static gboolean _cmd_who(gchar **args, struct cmd_help_t help);
|
||||||
|
static gboolean _cmd_win(gchar **args, struct cmd_help_t help);
|
||||||
static gboolean _cmd_wins(gchar **args, struct cmd_help_t help);
|
static gboolean _cmd_wins(gchar **args, struct cmd_help_t help);
|
||||||
static gboolean _cmd_xa(gchar **args, struct cmd_help_t help);
|
static gboolean _cmd_xa(gchar **args, struct cmd_help_t help);
|
||||||
|
|
||||||
@ -409,6 +410,14 @@ static struct cmd_t command_defs[] =
|
|||||||
"Example : /nick bob",
|
"Example : /nick bob",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
|
{ "/win",
|
||||||
|
_cmd_win, parse_args, 1, 1, NULL,
|
||||||
|
{ "/win num", "View a window.",
|
||||||
|
{ "/win num",
|
||||||
|
"------------------",
|
||||||
|
"Show the contents of a specific window in the main window area.",
|
||||||
|
NULL } } },
|
||||||
|
|
||||||
{ "/wins",
|
{ "/wins",
|
||||||
_cmd_wins, parse_args, 0, 1, NULL,
|
_cmd_wins, parse_args, 0, 1, NULL,
|
||||||
{ "/wins [tidy|prune]", "List or tidy active windows.",
|
{ "/wins [tidy|prune]", "List or tidy active windows.",
|
||||||
@ -1662,6 +1671,19 @@ _cmd_wins(gchar **args, struct cmd_help_t help)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
_cmd_win(gchar **args, struct cmd_help_t help)
|
||||||
|
{
|
||||||
|
int num = atoi(args[0]);
|
||||||
|
if (ui_win_exists(num)) {
|
||||||
|
ui_switch_win(num);
|
||||||
|
} else {
|
||||||
|
cons_show("Window %d does not exist.", num);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
gint _compare_commands(Command *a, Command *b)
|
gint _compare_commands(Command *a, Command *b)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user