Added last activity time format option

This commit is contained in:
James Booth
2015-09-29 23:30:23 +01:00
parent ac1164a3fa
commit 99fc70bd92
9 changed files with 81 additions and 28 deletions

View File

@@ -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:

View File

@@ -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,

View File

@@ -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);