about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-09-29 23:30:23 +0100
committerJames Booth <boothj5@gmail.com>2015-09-29 23:30:23 +0100
commit99fc70bd9283280bdb6056634c759196f549a4c6 (patch)
treecf08ac6c09eed76ff1350efa3c739268667de73e /src/config
parentac1164a3fa6f4c388399af06612e16eade16e46b (diff)
downloadprofani-tty-99fc70bd9283280bdb6056634c759196f549a4c6.tar.gz
Added last activity time format option
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c5
-rw-r--r--src/config/preferences.h1
-rw-r--r--src/config/theme.c1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index e594e9f6..c53c09bc 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -602,6 +602,7 @@ _get_group(preference_t pref)
         case PREF_WINS_AUTO_TIDY:
         case PREF_TIME:
         case PREF_TIME_STATUSBAR:
+        case PREF_TIME_LASTACTIVITY:
         case PREF_ROSTER:
         case PREF_ROSTER_OFFLINE:
         case PREF_ROSTER_RESOURCE:
@@ -756,6 +757,8 @@ _get_key(preference_t pref)
             return "time";
         case PREF_TIME_STATUSBAR:
             return "time.statusbar";
+        case PREF_TIME_LASTACTIVITY:
+            return "time.lastactivity";
         case PREF_ROSTER:
             return "roster";
         case PREF_ROSTER_OFFLINE:
@@ -845,6 +848,8 @@ _get_default_string(preference_t pref)
             return "%H:%M:%S";
         case PREF_TIME_STATUSBAR:
             return "%H:%M";
+        case PREF_TIME_LASTACTIVITY:
+            return "%d-%m-%y %H:%M:%S";
         case PREF_PGP_LOG:
             return "redact";
         default:
diff --git a/src/config/preferences.h b/src/config/preferences.h
index 1879c7d3..875db253 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -72,6 +72,7 @@ typedef enum {
     PREF_WINS_AUTO_TIDY,
     PREF_TIME,
     PREF_TIME_STATUSBAR,
+    PREF_TIME_LASTACTIVITY,
     PREF_STATUSES,
     PREF_STATUSES_CONSOLE,
     PREF_STATUSES_CHAT,
diff --git a/src/config/theme.c b/src/config/theme.c
index c4b25c73..588a3a42 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -434,6 +434,7 @@ _load_preferences(void)
     _set_boolean_preference("wins.autotidy", PREF_WINS_AUTO_TIDY);
     _set_string_preference("time", PREF_TIME);
     _set_string_preference("time.statusbar", PREF_TIME_STATUSBAR);
+    _set_string_preference("time.lastactivity", PREF_TIME_LASTACTIVITY);
 
     _set_boolean_preference("resource.title", PREF_RESOURCE_TITLE);
     _set_boolean_preference("resource.message", PREF_RESOURCE_MESSAGE);