Attention flag for chat windows

User is able to toggle a flag for chat windows. This flag should be used to mark
the window for "Attention".

Use Ctrl+f to mark the window.
This commit is contained in:
DebXWoody
2021-05-29 08:05:03 +02:00
parent 69e3cebf26
commit 3520645366
8 changed files with 48 additions and 1 deletions

View File

@@ -471,6 +471,7 @@ cmd_ac_init(void)
wins_ac = autocomplete_new();
autocomplete_add(wins_ac, "unread");
autocomplete_add(wins_ac, "attention");
autocomplete_add(wins_ac, "prune");
autocomplete_add(wins_ac, "swap");

View File

@@ -973,6 +973,7 @@ static struct cmd_t command_defs[] = {
parse_args, 0, 3, NULL,
CMD_SUBFUNCS(
{ "unread", cmd_wins_unread },
{ "attention", cmd_wins_attention },
{ "prune", cmd_wins_prune },
{ "swap", cmd_wins_swap })
CMD_MAINFUNC(cmd_wins)
@@ -981,6 +982,7 @@ static struct cmd_t command_defs[] = {
CMD_SYN(
"/wins",
"/wins unread",
"/wins attention",
"/wins prune",
"/wins swap <source> <target>")
CMD_DESC(
@@ -988,6 +990,7 @@ static struct cmd_t command_defs[] = {
"Passing no argument will list all currently active windows and information about their usage.")
CMD_ARGS(
{ "unread", "List windows with unread messages." },
{ "attention", "Marked windows" },
{ "prune", "Close all windows with no unread messages." },
{ "swap <source> <target>", "Swap windows, target may be an empty position." })
CMD_NOEXAMPLES

View File

@@ -1298,6 +1298,13 @@ cmd_wins_unread(ProfWin* window, const char* const command, gchar** args)
return TRUE;
}
gboolean
cmd_wins_attention(ProfWin* window, const char* const command, gchar** args)
{
cons_show_wins(TRUE);
return TRUE;
}
gboolean
cmd_wins_prune(ProfWin* window, const char* const command, gchar** args)
{

View File

@@ -209,6 +209,7 @@ gboolean cmd_otr_sendfile(ProfWin* window, const char* const command, gchar** ar
gboolean cmd_wins(ProfWin* window, const char* const command, gchar** args);
gboolean cmd_wins_unread(ProfWin* window, const char* const command, gchar** args);
gboolean cmd_wins_attention(ProfWin* window, const char* const command, gchar** args);
gboolean cmd_wins_prune(ProfWin* window, const char* const command, gchar** args);
gboolean cmd_wins_swap(ProfWin* window, const char* const command, gchar** args);