about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-06 01:14:21 +0100
committerJames Booth <boothj5@gmail.com>2014-04-06 01:14:21 +0100
commitc9d28b69991560a049c9a482e74a0c9b24bd9b53 (patch)
tree35788b912877d1781a08474744826f254928719f
parent4248b61a0cb760acfa10d9ba8346c5a2829c67a6 (diff)
downloadprofani-tty-c9d28b69991560a049c9a482e74a0c9b24bd9b53.tar.gz
Inlined status_bar_update_time
-rw-r--r--src/ui/statusbar.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c
index bbb3b781..4eacf992 100644
--- a/src/ui/statusbar.c
+++ b/src/ui/statusbar.c
@@ -48,7 +48,6 @@ static int dirty;
 static GDateTime *last_time;
 static int current;
 
-static void _status_bar_update_time(void);
 static void _update_win_statuses(void);
 static void _mark_new(int num);
 static void _mark_active(int num);
@@ -98,7 +97,18 @@ _status_bar_update_virtual(void)
     }
 
     if (dirty) {
-        _status_bar_update_time();
+        gchar *date_fmt = g_date_time_format(last_time, "%H:%M");
+        assert(date_fmt != NULL);
+
+        wattron(status_bar, COLOUR_STATUS_BRACKET);
+        mvwaddch(status_bar, 0, 1, '[');
+        wattroff(status_bar, COLOUR_STATUS_BRACKET);
+        mvwprintw(status_bar, 0, 2, date_fmt);
+        wattron(status_bar, COLOUR_STATUS_BRACKET);
+        mvwaddch(status_bar, 0, 7, ']');
+        wattroff(status_bar, COLOUR_STATUS_BRACKET);
+        g_free(date_fmt);
+
         _update_win_statuses();
         wnoutrefresh(status_bar);
         inp_put_back();
@@ -341,25 +351,6 @@ _status_bar_clear_message(void)
 }
 
 static void
-_status_bar_update_time(void)
-{
-    gchar *date_fmt = g_date_time_format(last_time, "%H:%M");
-    assert(date_fmt != NULL);
-
-    wattron(status_bar, COLOUR_STATUS_BRACKET);
-    mvwaddch(status_bar, 0, 1, '[');
-    wattroff(status_bar, COLOUR_STATUS_BRACKET);
-    mvwprintw(status_bar, 0, 2, date_fmt);
-    wattron(status_bar, COLOUR_STATUS_BRACKET);
-    mvwaddch(status_bar, 0, 7, ']');
-    wattroff(status_bar, COLOUR_STATUS_BRACKET);
-
-    g_free(date_fmt);
-
-    dirty = TRUE;
-}
-
-static void
 _update_win_statuses(void)
 {
     int i;