about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-11-16 00:40:54 +0000
committerJames Booth <boothj5@gmail.com>2014-11-16 00:40:54 +0000
commit40dc8e2c495deac830403872346dff9dd2b24499 (patch)
treeb5d15c22eec80ce7c637721b61ac2ce92955e440 /src/ui
parent1479a5e134004568245996a22418dadb6b6da6f6 (diff)
downloadprofani-tty-40dc8e2c495deac830403872346dff9dd2b24499.tar.gz
Added /time setting
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c14
-rw-r--r--src/ui/ui.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 9f9b9e2a..8d4e041e 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -901,6 +901,18 @@ _cons_autoconnect_setting(void)
 }
 
 static void
+_cons_time_setting(void)
+{
+    char *pref_time = prefs_get_string(PREF_TIME);
+    if (g_strcmp0(pref_time, "minutes") == 0)
+        cons_show("Time (/time)                  : minutes");
+    else
+        cons_show("Time (/time)                  : seconds");
+
+    prefs_free_string(pref_time);
+}
+
+static void
 _cons_vercheck_setting(void)
 {
     if (prefs_get_boolean(PREF_VERCHECK))
@@ -976,6 +988,7 @@ _cons_show_ui_prefs(void)
     cons_flash_setting();
     cons_splash_setting();
     cons_wrap_setting();
+    cons_time_setting();
     cons_vercheck_setting();
     cons_mouse_setting();
     cons_statuses_setting();
@@ -1594,6 +1607,7 @@ console_init_module(void)
     cons_privileges_setting = _cons_privileges_setting;
     cons_beep_setting = _cons_beep_setting;
     cons_wrap_setting = _cons_wrap_setting;
+    cons_time_setting = _cons_time_setting;
     cons_presence_setting = _cons_presence_setting;
     cons_flash_setting = _cons_flash_setting;
     cons_splash_setting = _cons_splash_setting;
diff --git a/src/ui/ui.h b/src/ui/ui.h
index e1f48fbd..d453ce06 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -303,6 +303,7 @@ void (*cons_occupants_setting)(void);
 void (*cons_roster_setting)(void);
 void (*cons_presence_setting)(void);
 void (*cons_wrap_setting)(void);
+void (*cons_time_setting)(void);
 void (*cons_mouse_setting)(void);
 void (*cons_statuses_setting)(void);
 void (*cons_titlebar_setting)(void);