From bd239326b01eb891aa941ad0059ec5d9b669a92c Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Wed, 19 Sep 2018 15:29:06 -0500 Subject: [PATCH] got rid of TODO comments that are no longer needed, different implementation was used --- common/theme.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/common/theme.c b/common/theme.c index c97b50f..f95ece9 100644 --- a/common/theme.c +++ b/common/theme.c @@ -76,37 +76,20 @@ void themeStartup(ThemePreset preset) { int waveBlending; const char *AText, *BText; bool good_cfg = config_read_file(&cfg, tmp_path); - if(!good_cfg){//config file is messed up - config_t tmp = {0}; - cfg = tmp;//clear the config - config_init(&cfg);/*reinitize so that we can create the theme.cfg with the default theme (TODO:NightlyFox)*/ - } switch (preset) { case THEME_PRESET_LIGHT: default: themeDefault = &themeLight; if (good_cfg) theme = config_lookup(&cfg, "lightTheme"); - else{ - /*(TODO:NightlyFox) - theme.cfg file does not exist or is corrupted/misconfigured! - setup config here with default themes*/ - } break; case THEME_PRESET_DARK: themeDefault = &themeDark; if (good_cfg) - theme = config_lookup(&cfg, "darkTheme"); - else{ - /*(TODO:NightlyFox) theme.cfg - file does not exist or is corrupted/misconfigured! - setup config here with default themes*/ - } + theme = config_lookup(&cfg, "darkTheme"); break; } - /*(TODO:NightlyFox) write the config here - so you only have to do it once*/ if (good_cfg) { if (theme != NULL) { if (!colorFromSetting(config_setting_lookup(theme, "textColor"), &text)) @@ -151,4 +134,4 @@ void themeStartup(ThemePreset preset) { themeCurrent = *themeDefault; } config_destroy(&cfg); -} +} \ No newline at end of file