diff options
author | James Booth <boothj5@gmail.com> | 2016-09-22 21:42:00 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-09-22 21:42:00 +0100 |
commit | 3983ee1d6be8245901e83d7d06974005000a1721 (patch) | |
tree | 6e02792e4fcf2fb2bac09868ab997c29130f7650 /src/config | |
parent | f683a704ad164796ddd1dc6f49ea48098fc39219 (diff) | |
download | profani-tty-3983ee1d6be8245901e83d7d06974005000a1721.tar.gz |
Rename /titlebar -> /wintitle
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/preferences.c | 25 | ||||
-rw-r--r-- | src/config/preferences.h | 4 |
2 files changed, 21 insertions, 8 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c index de75008e..68a132e5 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -143,6 +143,19 @@ prefs_load(void) prefs_free_string(value); } + // move pre 0.5.0 titlebar settings to wintitle + if (g_key_file_has_key(prefs, PREF_GROUP_UI, "titlebar.show", NULL)) { + gboolean show = g_key_file_get_boolean(prefs, PREF_GROUP_UI, "titlebar.show", NULL); + g_key_file_set_boolean(prefs, PREF_GROUP_UI, "wintitle.show", show); + g_key_file_remove_key(prefs, PREF_GROUP_UI, "titlebar.show", NULL); + } + if (g_key_file_has_key(prefs, PREF_GROUP_UI, "titlebar.goodbye", NULL)) { + gboolean goodbye = g_key_file_get_boolean(prefs, PREF_GROUP_UI, "titlebar.goodbye", NULL); + g_key_file_set_boolean(prefs, PREF_GROUP_UI, "wintitle.goodbye", goodbye); + g_key_file_remove_key(prefs, PREF_GROUP_UI, "titlebar.goodbye", NULL); + } + + _save_prefs(); boolean_choice_ac = autocomplete_new(); @@ -1162,8 +1175,8 @@ _get_group(preference_t pref) case PREF_BEEP: case PREF_THEME: case PREF_VERCHECK: - case PREF_TITLEBAR_SHOW: - case PREF_TITLEBAR_GOODBYE: + case PREF_WINTITLE_SHOW: + case PREF_WINTITLE_GOODBYE: case PREF_FLASH: case PREF_INTYPE: case PREF_HISTORY: @@ -1282,10 +1295,10 @@ _get_key(preference_t pref) return "theme"; case PREF_VERCHECK: return "vercheck"; - case PREF_TITLEBAR_SHOW: - return "titlebar.show"; - case PREF_TITLEBAR_GOODBYE: - return "titlebar.goodbye"; + case PREF_WINTITLE_SHOW: + return "wintitle.show"; + case PREF_WINTITLE_GOODBYE: + return "wintitle.goodbye"; case PREF_FLASH: return "flash"; case PREF_TRAY: diff --git a/src/config/preferences.h b/src/config/preferences.h index 67f3e1e4..ee89bd90 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -49,8 +49,8 @@ typedef enum { PREF_BEEP, PREF_VERCHECK, PREF_THEME, - PREF_TITLEBAR_SHOW, - PREF_TITLEBAR_GOODBYE, + PREF_WINTITLE_SHOW, + PREF_WINTITLE_GOODBYE, PREF_FLASH, PREF_TRAY, PREF_TRAY_READ, |