mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Status bar active on console messages when not in console
This commit is contained in:
parent
4e94654122
commit
a20c0569a6
@ -178,6 +178,7 @@ win_close_win(void)
|
|||||||
|
|
||||||
// go back to console window
|
// go back to console window
|
||||||
_set_current(0);
|
_set_current(0);
|
||||||
|
status_bar_active(0);
|
||||||
title_bar_title();
|
title_bar_title();
|
||||||
|
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
@ -207,22 +208,17 @@ win_show_wins(void)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
cons_show("");
|
||||||
|
cons_show("Active windows:");
|
||||||
|
_win_show_time(console->win);
|
||||||
|
wprintw(console->win, "1: Console\n");
|
||||||
|
|
||||||
for (i = 1; i < NUM_WINS; i++) {
|
for (i = 1; i < NUM_WINS; i++) {
|
||||||
if (windows[i] != NULL) {
|
if (windows[i] != NULL) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cons_show("");
|
|
||||||
|
|
||||||
if (count == 0) {
|
|
||||||
cons_show("No active windows.");
|
|
||||||
} else if (count == 1) {
|
|
||||||
cons_show("1 active window:");
|
|
||||||
} else {
|
|
||||||
cons_show("%d active windows:", count);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count != 0) {
|
if (count != 0) {
|
||||||
for (i = 1; i < NUM_WINS; i++) {
|
for (i = 1; i < NUM_WINS; i++) {
|
||||||
if (windows[i] != NULL) {
|
if (windows[i] != NULL) {
|
||||||
@ -1073,8 +1069,11 @@ cons_prefs(void)
|
|||||||
|
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1106,8 +1105,11 @@ cons_help(void)
|
|||||||
cons_show("/help [command] - Detailed help on a specific command.");
|
cons_show("/help [command] - Detailed help on a specific command.");
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1117,8 +1119,11 @@ cons_basic_help(void)
|
|||||||
cons_show("Basic Commands:");
|
cons_show("Basic Commands:");
|
||||||
_cons_show_basic_help();
|
_cons_show_basic_help();
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1137,8 +1142,11 @@ cons_settings_help(void)
|
|||||||
|
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1157,8 +1165,11 @@ cons_presence_help(void)
|
|||||||
|
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1176,8 +1187,11 @@ cons_navigation_help(void)
|
|||||||
cons_show("PAGE UP, PAGE DOWN : Page the main window.");
|
cons_show("PAGE UP, PAGE DOWN : Page the main window.");
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1208,8 +1222,11 @@ cons_bad_show(const char * const msg, ...)
|
|||||||
g_string_free(fmt_msg, TRUE);
|
g_string_free(fmt_msg, TRUE);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1230,8 +1247,11 @@ cons_show(const char * const msg, ...)
|
|||||||
g_string_free(fmt_msg, TRUE);
|
g_string_free(fmt_msg, TRUE);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1239,8 +1259,11 @@ cons_show_word(const char * const word)
|
|||||||
{
|
{
|
||||||
wprintw(console->win, "%s", word);
|
wprintw(console->win, "%s", word);
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1249,8 +1272,11 @@ cons_bad_command(const char * const cmd)
|
|||||||
_win_show_time(console->win);
|
_win_show_time(console->win);
|
||||||
wprintw(console->win, "Unknown command: %s\n", cmd);
|
wprintw(console->win, "Unknown command: %s\n", cmd);
|
||||||
|
|
||||||
if (current_index == 0)
|
if (current_index == 0) {
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1331,7 +1357,11 @@ cons_about(void)
|
|||||||
|
|
||||||
prefresh(console->win, 0, 0, 1, 0, rows-3, cols-1);
|
prefresh(console->win, 0, 0, 1, 0, rows-3, cols-1);
|
||||||
|
|
||||||
dirty = TRUE;
|
if (current_index == 0) {
|
||||||
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1357,6 +1387,12 @@ cons_check_version(gboolean not_available_msg)
|
|||||||
cons_show("");
|
cons_show("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (current_index == 0) {
|
||||||
|
dirty = TRUE;
|
||||||
|
} else {
|
||||||
|
status_bar_new(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1480,6 +1516,7 @@ win_switch_if_active(const int i)
|
|||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
title_bar_title();
|
title_bar_title();
|
||||||
|
status_bar_active(0);
|
||||||
} else {
|
} else {
|
||||||
title_bar_set_recipient(current->from);
|
title_bar_set_recipient(current->from);
|
||||||
title_bar_draw();;
|
title_bar_draw();;
|
||||||
|
Loading…
Reference in New Issue
Block a user