summaryrefslogtreecommitdiff
path: root/src/fe-common/core/themes.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-06-29 23:10:48 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-06-29 23:10:48 +0000
commitf20a6b019860e347781c9a9bb9d0f382039211a3 (patch)
tree8a04911c895253bb099e41eb4c4df405f042ee83 /src/fe-common/core/themes.c
parentf9c9e6fc758f75deca00cd737d9f30d62b3374c1 (diff)
downloadirssi-f20a6b019860e347781c9a9bb9d0f382039211a3.zip
If .theme suffix was given for /SET theme, irssi printed "theme changed to
xxx" message every time any setting was changed. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1596 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/themes.c')
-rw-r--r--src/fe-common/core/themes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c
index b5b3fd3f..6a8c42c4 100644
--- a/src/fe-common/core/themes.c
+++ b/src/fe-common/core/themes.c
@@ -1115,9 +1115,13 @@ static void change_theme(const char *name, int verbose)
static void read_settings(void)
{
const char *theme;
+ int len;
theme = settings_get_str("theme");
- if (strcmp(current_theme->name, theme) != 0)
+ len = strlen(current_theme->name);
+ if (strcmp(current_theme->name, theme) != 0 &&
+ (strncmp(current_theme->name, theme, len) != 0 ||
+ strcmp(theme+len, ".theme") != 0))
change_theme(theme, TRUE);
}