From f20a6b019860e347781c9a9bb9d0f382039211a3 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 29 Jun 2001 23:10:48 +0000 Subject: [PATCH] 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 --- src/fe-common/core/themes.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); }