about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c19
-rw-r--r--src/config/preferences.h7
2 files changed, 21 insertions, 5 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index de455245..f15952cd 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -533,7 +533,7 @@ prefs_set_boolean(preference_t pref, gboolean value)
     g_key_file_set_boolean(prefs, group, key, value);
 }
 
-char*
+gchar*
 prefs_get_string(preference_t pref)
 {
     const char* group = _get_group(pref);
@@ -553,14 +553,14 @@ prefs_get_string(preference_t pref)
     }
 }
 
-char*
+gchar*
 prefs_get_string_with_option(preference_t pref, gchar* option)
 {
     const char* group = _get_group(pref);
     const char* key = _get_key(pref);
     char* def = _get_default_string(pref);
 
-    char* result = g_key_file_get_locale_string(prefs, group, key, option, NULL);
+    gchar* result = g_key_file_get_locale_string(prefs, group, key, option, NULL);
 
     if (result == NULL) {
         // check for user set default
@@ -1869,6 +1869,9 @@ _get_group(preference_t pref)
     case PREF_CORRECTION_ALLOW:
     case PREF_MAM:
     case PREF_SILENCE_NON_ROSTER:
+    case PREF_STROPHE_VERBOSITY:
+    case PREF_STROPHE_SM_ENABLED:
+    case PREF_STROPHE_SM_RESEND:
         return PREF_GROUP_CONNECTION;
     case PREF_OTR_LOG:
     case PREF_OTR_POLICY:
@@ -2165,6 +2168,12 @@ _get_key(preference_t pref)
         return "mood";
     case PREF_VCARD_PHOTO_CMD:
         return "vcard.photo.cmd";
+    case PREF_STROPHE_VERBOSITY:
+        return "strophe.verbosity";
+    case PREF_STROPHE_SM_ENABLED:
+        return "strophe.sm.enabled";
+    case PREF_STROPHE_SM_RESEND:
+        return "strophe.sm.resend";
     default:
         return NULL;
     }
@@ -2217,6 +2226,8 @@ _get_default_boolean(preference_t pref)
     case PREF_INTYPE_CONSOLE:
     case PREF_NOTIFY_MENTION_WHOLE_WORD:
     case PREF_MOOD:
+    case PREF_STROPHE_SM_ENABLED:
+    case PREF_STROPHE_SM_RESEND:
         return TRUE;
     default:
         return FALSE;
@@ -2316,6 +2327,8 @@ _get_default_string(preference_t pref)
         return NULL; // Default to built-in method.
     case PREF_OX_LOG:
         return "on";
+    case PREF_STROPHE_VERBOSITY:
+        return "0";
     default:
         return NULL;
     }
diff --git a/src/config/preferences.h b/src/config/preferences.h
index 95a84865..ca8acea4 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -182,6 +182,9 @@ typedef enum {
     PREF_NOTIFY_ROOM_OFFLINE,
     PREF_OX_LOG,
     PREF_MOOD,
+    PREF_STROPHE_VERBOSITY,
+    PREF_STROPHE_SM_ENABLED,
+    PREF_STROPHE_SM_RESEND,
     PREF_VCARD_PHOTO_CMD,
 } preference_t;
 
@@ -329,8 +332,8 @@ void prefs_save_win_placement(ProfWinPlacement* placement);
 
 gboolean prefs_get_boolean(preference_t pref);
 void prefs_set_boolean(preference_t pref, gboolean value);
-char* prefs_get_string(preference_t pref);
-char* prefs_get_string_with_option(preference_t pref, gchar* option);
+gchar* prefs_get_string(preference_t pref);
+gchar* prefs_get_string_with_option(preference_t pref, gchar* option);
 void prefs_set_string(preference_t pref, char* value);
 void prefs_set_string_with_option(preference_t pref, char* option, char* value);
 void prefs_set_string_list_with_option(preference_t pref, char* option, const gchar* const* values);