From 2ea0e1e9384f298264aac4df99fcf4d93a807564 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 2 Nov 2015 20:39:43 +0000 Subject: [PATCH] Removed ui_titlebar_presence --- src/profanity.c | 8 ++++---- src/ui/core.c | 6 ------ src/ui/titlebar.h | 1 - src/ui/ui.h | 4 +++- tests/unittests/ui/stub_ui.c | 4 +++- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/profanity.c b/src/profanity.c index e4db293d..a3afb3c2 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -227,7 +227,7 @@ _check_autoaway(void) } prefs_free_string(message); - ui_titlebar_presence(CONTACT_AWAY); + title_bar_set_presence(CONTACT_AWAY); } } else if (g_strcmp0(mode, "idle") == 0) { activity_state = ACTIVITY_ST_IDLE; @@ -267,7 +267,7 @@ _check_autoaway(void) } prefs_free_string(message); - ui_titlebar_presence(CONTACT_XA); + title_bar_set_presence(CONTACT_XA); } else if (check && (idle_ms < away_time_ms)) { activity_state = ACTIVITY_ST_ACTIVE; @@ -276,7 +276,7 @@ _check_autoaway(void) // send saved presence without last activity cl_ev_presence_send(saved_presence, saved_status, 0); contact_presence_t contact_pres = contact_presence_from_resource_presence(saved_presence); - ui_titlebar_presence(contact_pres); + title_bar_set_presence(contact_pres); } break; case ACTIVITY_ST_XA: @@ -288,7 +288,7 @@ _check_autoaway(void) // send saved presence without last activity cl_ev_presence_send(saved_presence, saved_status, 0); contact_presence_t contact_pres = contact_presence_from_resource_presence(saved_presence); - ui_titlebar_presence(contact_pres); + title_bar_set_presence(contact_pres); } break; } diff --git a/src/ui/core.c b/src/ui/core.c index 0f451d61..d9f8a6b1 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -394,12 +394,6 @@ ui_group_removed(const char *const contact, const char *const group) rosterwin_roster(); } -void -ui_titlebar_presence(contact_presence_t presence) -{ - title_bar_set_presence(presence); -} - void ui_handle_login_account_success(ProfAccount *account, int secured) { diff --git a/src/ui/titlebar.h b/src/ui/titlebar.h index 4e11107e..9328bd13 100644 --- a/src/ui/titlebar.h +++ b/src/ui/titlebar.h @@ -39,7 +39,6 @@ void create_title_bar(void); void title_bar_update_virtual(void); void title_bar_resize(void); void title_bar_console(void); -void title_bar_set_presence(contact_presence_t presence); void title_bar_set_connected(gboolean connected); void title_bar_set_tls(gboolean secured); void title_bar_switch(void); diff --git a/src/ui/ui.h b/src/ui/ui.h index 171e0dc6..c8e62069 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -132,7 +132,6 @@ void ui_prune_wins(void); gboolean ui_swap_wins(int source_win, int target_win); void ui_clear_win(ProfWin *window); void ui_auto_away(char *message, gint time, resource_presence_t res_presence); -void ui_titlebar_presence(contact_presence_t presence); void ui_handle_login_account_success(ProfAccount *account, int secured); void ui_update_presence(const resource_presence_t resource_presence, const char *const message, const char *const show); void ui_statusbar_new(const int win); @@ -300,6 +299,9 @@ void cons_show_contact_online(PContact contact, Resource *resource, GDateTime *l void cons_show_contact_offline(PContact contact, char *resource, char *status); void cons_theme_colours(void); +// title bar +void title_bar_set_presence(contact_presence_t presence); + // status bar void status_bar_inactive(const int win); void status_bar_active(const int win); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 3a2336c7..5a5f0da1 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -294,7 +294,6 @@ gboolean ui_swap_wins(int source_win, int target_win) return FALSE; } -void ui_titlebar_presence(contact_presence_t presence) {} void ui_handle_login_account_success(ProfAccount *account, int secured) {} void ui_update_presence(const resource_presence_t resource_presence, const char * const message, const char * const show) {} @@ -465,6 +464,9 @@ void cons_show_contact_online(PContact contact, Resource *resource, GDateTime *l void cons_show_contact_offline(PContact contact, char *resource, char *status) {} void cons_theme_colours(void) {} +// title bar +void title_bar_set_presence(contact_presence_t presence) {} + // status bar void status_bar_inactive(const int win) {} void status_bar_active(const int win) {}