mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Renamed title_bar_set_status -> title_bar_set_presence
This commit is contained in:
parent
b0e727a7ef
commit
9f6d6d44cc
@ -2470,7 +2470,7 @@ _update_presence(const resource_presence_t resource_presence,
|
|||||||
presence_update(resource_presence, msg, 0);
|
presence_update(resource_presence, msg, 0);
|
||||||
|
|
||||||
contact_presence_t contact_presence = contact_presence_from_resource_presence(resource_presence);
|
contact_presence_t contact_presence = contact_presence_from_resource_presence(resource_presence);
|
||||||
title_bar_set_status(contact_presence);
|
title_bar_set_presence(contact_presence);
|
||||||
|
|
||||||
gint priority = accounts_get_priority_for_presence_type(jabber_get_account_name(), resource_presence);
|
gint priority = accounts_get_priority_for_presence_type(jabber_get_account_name(), resource_presence);
|
||||||
if (msg != NULL) {
|
if (msg != NULL) {
|
||||||
|
@ -228,7 +228,7 @@ _handle_idle_time()
|
|||||||
RESOURCE_AWAY);
|
RESOURCE_AWAY);
|
||||||
cons_show("Idle for %d minutes, status set to away (priority %d), \"%s\".",
|
cons_show("Idle for %d minutes, status set to away (priority %d), \"%s\".",
|
||||||
prefs_get_autoaway_time(), pri, prefs_get_string(PREF_AUTOAWAY_MESSAGE));
|
prefs_get_autoaway_time(), pri, prefs_get_string(PREF_AUTOAWAY_MESSAGE));
|
||||||
title_bar_set_status(CONTACT_AWAY);
|
title_bar_set_presence(CONTACT_AWAY);
|
||||||
ui_current_page_off();
|
ui_current_page_off();
|
||||||
} else {
|
} else {
|
||||||
int pri =
|
int pri =
|
||||||
@ -236,7 +236,7 @@ _handle_idle_time()
|
|||||||
RESOURCE_AWAY);
|
RESOURCE_AWAY);
|
||||||
cons_show("Idle for %d minutes, status set to away (priority %d).",
|
cons_show("Idle for %d minutes, status set to away (priority %d).",
|
||||||
prefs_get_autoaway_time(), pri);
|
prefs_get_autoaway_time(), pri);
|
||||||
title_bar_set_status(CONTACT_AWAY);
|
title_bar_set_presence(CONTACT_AWAY);
|
||||||
ui_current_page_off();
|
ui_current_page_off();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,11 +260,11 @@ _handle_idle_time()
|
|||||||
accounts_get_priority_for_presence_type(jabber_get_account_name(),
|
accounts_get_priority_for_presence_type(jabber_get_account_name(),
|
||||||
RESOURCE_ONLINE);
|
RESOURCE_ONLINE);
|
||||||
cons_show("No longer idle, status set to online (priority %d).", pri);
|
cons_show("No longer idle, status set to online (priority %d).", pri);
|
||||||
title_bar_set_status(CONTACT_ONLINE);
|
title_bar_set_presence(CONTACT_ONLINE);
|
||||||
ui_current_page_off();
|
ui_current_page_off();
|
||||||
} else if (strcmp(prefs_get_string(PREF_AUTOAWAY_MODE), "idle") == 0) {
|
} else if (strcmp(prefs_get_string(PREF_AUTOAWAY_MODE), "idle") == 0) {
|
||||||
presence_update(RESOURCE_ONLINE, NULL, 0);
|
presence_update(RESOURCE_ONLINE, NULL, 0);
|
||||||
title_bar_set_status(CONTACT_ONLINE);
|
title_bar_set_presence(CONTACT_ONLINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ handle_login_account_success(char *account_name)
|
|||||||
resource_presence_t resource_presence = accounts_get_login_presence(account->name);
|
resource_presence_t resource_presence = accounts_get_login_presence(account->name);
|
||||||
contact_presence_t contact_presence = contact_presence_from_resource_presence(resource_presence);
|
contact_presence_t contact_presence = contact_presence_from_resource_presence(resource_presence);
|
||||||
cons_show_login_success(account);
|
cons_show_login_success(account);
|
||||||
title_bar_set_status(contact_presence);
|
title_bar_set_presence(contact_presence);
|
||||||
log_info("%s logged in successfully", account->jid);
|
log_info("%s logged in successfully", account->jid);
|
||||||
ui_current_page_off();
|
ui_current_page_off();
|
||||||
status_bar_print_message(account->jid);
|
status_bar_print_message(account->jid);
|
||||||
|
@ -414,7 +414,7 @@ static void
|
|||||||
_ui_disconnected(void)
|
_ui_disconnected(void)
|
||||||
{
|
{
|
||||||
wins_lost_connection();
|
wins_lost_connection();
|
||||||
title_bar_set_status(CONTACT_OFFLINE);
|
title_bar_set_presence(CONTACT_OFFLINE);
|
||||||
status_bar_clear_message();
|
status_bar_clear_message();
|
||||||
status_bar_refresh();
|
status_bar_refresh();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
static WINDOW *win;
|
static WINDOW *win;
|
||||||
static char *current_title = NULL;
|
static char *current_title = NULL;
|
||||||
static char *recipient = NULL;
|
static char *recipient = NULL;
|
||||||
|
|
||||||
static GTimer *typing_elapsed;
|
static GTimer *typing_elapsed;
|
||||||
|
|
||||||
static contact_presence_t current_status;
|
static contact_presence_t current_status;
|
||||||
|
|
||||||
static void _title_bar_draw_title(void);
|
static void _title_bar_draw_title(void);
|
||||||
@ -44,7 +46,7 @@ _create_title_bar(void)
|
|||||||
win = newwin(1, cols, 0, 0);
|
win = newwin(1, cols, 0, 0);
|
||||||
wbkgd(win, COLOUR_TITLE_TEXT);
|
wbkgd(win, COLOUR_TITLE_TEXT);
|
||||||
title_bar_console();
|
title_bar_console();
|
||||||
title_bar_set_status(CONTACT_OFFLINE);
|
title_bar_set_presence(CONTACT_OFFLINE);
|
||||||
wrefresh(win);
|
wrefresh(win);
|
||||||
inp_put_back();
|
inp_put_back();
|
||||||
}
|
}
|
||||||
@ -116,7 +118,7 @@ _title_bar_show(const char * const title)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_title_bar_set_status(contact_presence_t status)
|
_title_bar_set_presence(contact_presence_t status)
|
||||||
{
|
{
|
||||||
current_status = status;
|
current_status = status;
|
||||||
_title_bar_draw_status();
|
_title_bar_draw_status();
|
||||||
@ -238,7 +240,7 @@ titlebar_init_module(void)
|
|||||||
title_bar_resize = _title_bar_resize;
|
title_bar_resize = _title_bar_resize;
|
||||||
title_bar_refresh = _title_bar_refresh;
|
title_bar_refresh = _title_bar_refresh;
|
||||||
title_bar_show = _title_bar_show;
|
title_bar_show = _title_bar_show;
|
||||||
title_bar_set_status = _title_bar_set_status;
|
title_bar_set_presence = _title_bar_set_presence;
|
||||||
title_bar_set_recipient = _title_bar_set_recipient;
|
title_bar_set_recipient = _title_bar_set_recipient;
|
||||||
title_bar_set_typing = _title_bar_set_typing;
|
title_bar_set_typing = _title_bar_set_typing;
|
||||||
title_bar_draw = _title_bar_draw;
|
title_bar_draw = _title_bar_draw;
|
||||||
|
@ -156,7 +156,7 @@ void (*title_bar_refresh)(void);
|
|||||||
void (*title_bar_resize)(void);
|
void (*title_bar_resize)(void);
|
||||||
void (*title_bar_show)(const char * const title);
|
void (*title_bar_show)(const char * const title);
|
||||||
void (*title_bar_console)(void);
|
void (*title_bar_console)(void);
|
||||||
void (*title_bar_set_status)(contact_presence_t status);
|
void (*title_bar_set_presence)(contact_presence_t status);
|
||||||
void (*title_bar_set_recipient)(const char * const from);
|
void (*title_bar_set_recipient)(const char * const from);
|
||||||
void (*title_bar_set_typing)(gboolean is_typing);
|
void (*title_bar_set_typing)(gboolean is_typing);
|
||||||
void (*title_bar_draw)(void);
|
void (*title_bar_draw)(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user