about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-11-02 20:39:43 +0000
committerJames Booth <boothj5@gmail.com>2015-11-02 20:39:43 +0000
commit2ea0e1e9384f298264aac4df99fcf4d93a807564 (patch)
tree4e1e5463c472585f1c11e713d31cadde53b9951c
parent1c3eadbf1cba45bfba839cc6bf4e0ea249e6df1c (diff)
downloadprofani-tty-2ea0e1e9384f298264aac4df99fcf4d93a807564.tar.gz
Removed ui_titlebar_presence
-rw-r--r--src/profanity.c8
-rw-r--r--src/ui/core.c6
-rw-r--r--src/ui/titlebar.h1
-rw-r--r--src/ui/ui.h4
-rw-r--r--tests/unittests/ui/stub_ui.c4
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
@@ -395,12 +395,6 @@ ui_group_removed(const char *const contact, const char *const group)
 }
 
 void
-ui_titlebar_presence(contact_presence_t presence)
-{
-    title_bar_set_presence(presence);
-}
-
-void
 ui_handle_login_account_success(ProfAccount *account, int secured)
 {
     resource_presence_t resource_presence = accounts_get_login_presence(account->name);
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) {}