about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-16 18:13:22 +0000
committerJames Booth <boothj5@gmail.com>2014-01-16 18:13:22 +0000
commit9f6d6d44cc2bc0d883f2c7b561049910f5317b7e (patch)
tree0caa0d6c9bee1175206155b54b766c426b04a7a2
parentb0e727a7eff651c2d6f37daf76abd5b791458603 (diff)
downloadprofani-tty-9f6d6d44cc2bc0d883f2c7b561049910f5317b7e.tar.gz
Renamed title_bar_set_status -> title_bar_set_presence
-rw-r--r--src/command/commands.c2
-rw-r--r--src/profanity.c8
-rw-r--r--src/server_events.c2
-rw-r--r--src/ui/core.c2
-rw-r--r--src/ui/titlebar.c8
-rw-r--r--src/ui/ui.h2
6 files changed, 13 insertions, 11 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 6285254c..6adec3c5 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -2470,7 +2470,7 @@ _update_presence(const resource_presence_t resource_presence,
         presence_update(resource_presence, msg, 0);
 
         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);
         if (msg != NULL) {
diff --git a/src/profanity.c b/src/profanity.c
index 049d4bc4..9c44e0d5 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -228,7 +228,7 @@ _handle_idle_time()
                                 RESOURCE_AWAY);
                         cons_show("Idle for %d minutes, status set to away (priority %d), \"%s\".",
                             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();
                     } else {
                         int pri =
@@ -236,7 +236,7 @@ _handle_idle_time()
                                 RESOURCE_AWAY);
                         cons_show("Idle for %d minutes, status set to away (priority %d).",
                             prefs_get_autoaway_time(), pri);
-                        title_bar_set_status(CONTACT_AWAY);
+                        title_bar_set_presence(CONTACT_AWAY);
                         ui_current_page_off();
                     }
 
@@ -260,11 +260,11 @@ _handle_idle_time()
                         accounts_get_priority_for_presence_type(jabber_get_account_name(),
                             RESOURCE_ONLINE);
                     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();
                 } else if (strcmp(prefs_get_string(PREF_AUTOAWAY_MODE), "idle") == 0) {
                     presence_update(RESOURCE_ONLINE, NULL, 0);
-                    title_bar_set_status(CONTACT_ONLINE);
+                    title_bar_set_presence(CONTACT_ONLINE);
                 }
             }
         }
diff --git a/src/server_events.c b/src/server_events.c
index 57e04318..9165f0f8 100644
--- a/src/server_events.c
+++ b/src/server_events.c
@@ -57,7 +57,7 @@ handle_login_account_success(char *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);
     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);
     ui_current_page_off();
     status_bar_print_message(account->jid);
diff --git a/src/ui/core.c b/src/ui/core.c
index 36f6289b..f14c6803 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -414,7 +414,7 @@ static void
 _ui_disconnected(void)
 {
     wins_lost_connection();
-    title_bar_set_status(CONTACT_OFFLINE);
+    title_bar_set_presence(CONTACT_OFFLINE);
     status_bar_clear_message();
     status_bar_refresh();
 }
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c
index bbb55a26..61cae25a 100644
--- a/src/ui/titlebar.c
+++ b/src/ui/titlebar.c
@@ -30,7 +30,9 @@
 static WINDOW *win;
 static char *current_title = NULL;
 static char *recipient = NULL;
+
 static GTimer *typing_elapsed;
+
 static contact_presence_t current_status;
 
 static void _title_bar_draw_title(void);
@@ -44,7 +46,7 @@ _create_title_bar(void)
     win = newwin(1, cols, 0, 0);
     wbkgd(win, COLOUR_TITLE_TEXT);
     title_bar_console();
-    title_bar_set_status(CONTACT_OFFLINE);
+    title_bar_set_presence(CONTACT_OFFLINE);
     wrefresh(win);
     inp_put_back();
 }
@@ -116,7 +118,7 @@ _title_bar_show(const char * const title)
 }
 
 static void
-_title_bar_set_status(contact_presence_t status)
+_title_bar_set_presence(contact_presence_t status)
 {
     current_status = status;
     _title_bar_draw_status();
@@ -238,7 +240,7 @@ titlebar_init_module(void)
     title_bar_resize = _title_bar_resize;
     title_bar_refresh = _title_bar_refresh;
     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_typing = _title_bar_set_typing;
     title_bar_draw = _title_bar_draw;
diff --git a/src/ui/ui.h b/src/ui/ui.h
index f0f03622..249a4330 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -156,7 +156,7 @@ void (*title_bar_refresh)(void);
 void (*title_bar_resize)(void);
 void (*title_bar_show)(const char * const title);
 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_typing)(gboolean is_typing);
 void (*title_bar_draw)(void);