From 35239ee31998580d95b99c62abfb3d3f00c20453 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 26 Aug 2015 01:36:41 +0100 Subject: [PATCH] Added otr and pgp char to themes --- src/config/theme.c | 15 +++++++++++++++ theme_template | 2 ++ themes/boothj5 | 2 ++ 3 files changed, 19 insertions(+) diff --git a/src/config/theme.c b/src/config/theme.c index ee6bd73f..c4b25c73 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -465,6 +465,21 @@ _load_preferences(void) _set_boolean_preference("intype", PREF_INTYPE); _set_boolean_preference("enc.warn", PREF_ENC_WARN); + + if (g_key_file_has_key(theme, "ui", "otr.char", NULL)) { + gchar *ch = g_key_file_get_string(theme, "ui", "otr.char", NULL); + if (ch && strlen(ch) > 0) { + prefs_set_otr_char(ch[0]); + g_free(ch); + } + } + if (g_key_file_has_key(theme, "ui", "pgp.char", NULL)) { + gchar *ch = g_key_file_get_string(theme, "ui", "pgp.char", NULL); + if (ch && strlen(ch) > 0) { + prefs_set_pgp_char(ch[0]); + g_free(ch); + } + } } static gchar * diff --git a/theme_template b/theme_template index 56932ca2..c49d5f9c 100644 --- a/theme_template +++ b/theme_template @@ -75,3 +75,5 @@ occupants= occupants.size= occupants.jid= wins.autotidy= +otr.char= +pgp.char= diff --git a/themes/boothj5 b/themes/boothj5 index 22401681..a408d3b5 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -75,3 +75,5 @@ occupants=true occupants.size=15 occupants.jid=false wins.autotidy=true +otr.char=@ +pgp.char=%