summaryrefslogtreecommitdiff
path: root/src/fe-common/core/window-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-31 21:16:09 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-31 21:16:09 +0000
commitb82d10ca57899ec8c2b98f1816988c3edb33ca37 (patch)
tree41152341969e9191ffcc1ca894da57323f32dbe6 /src/fe-common/core/window-commands.c
parent138079e3bdcadaf163381fa9408609bb40f045ad (diff)
downloadirssi-b82d10ca57899ec8c2b98f1816988c3edb33ca37.zip
Theme fixes: /RELOAD reloads them, /SET current_theme changes the default
theme, you can have window specific themes with /WINDOW THEME. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@561 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/window-commands.c')
-rw-r--r--src/fe-common/core/window-commands.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c
index a418cec0..f9890ea7 100644
--- a/src/fe-common/core/window-commands.c
+++ b/src/fe-common/core/window-commands.c
@@ -27,6 +27,7 @@
#include "levels.h"
+#include "themes.h"
#include "windows.h"
#include "window-items.h"
@@ -355,6 +356,19 @@ static void cmd_window_list(void)
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_WINDOWLIST_FOOTER);
}
+/* SYNTAX: WINDOW THEME <name> */
+static void cmd_window_theme(const char *data)
+{
+ active_win->theme = theme_load(data);
+ if (active_win->theme != NULL) {
+ printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
+ IRCTXT_WINDOW_THEME_CHANGED, data);
+ } else {
+ printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
+ IRCTXT_THEME_NOT_FOUND, data);
+ }
+}
+
void window_commands_init(void)
{
command_bind("window", NULL, (SIGNAL_FUNC) cmd_window);
@@ -377,6 +391,7 @@ void window_commands_init(void)
command_bind("window move left", NULL, (SIGNAL_FUNC) cmd_window_move_left);
command_bind("window move right", NULL, (SIGNAL_FUNC) cmd_window_move_right);
command_bind("window list", NULL, (SIGNAL_FUNC) cmd_window_list);
+ command_bind("window theme", NULL, (SIGNAL_FUNC) cmd_window_theme);
}
void window_commands_deinit(void)
@@ -401,4 +416,5 @@ void window_commands_deinit(void)
command_unbind("window move left", (SIGNAL_FUNC) cmd_window_move_left);
command_unbind("window move right", (SIGNAL_FUNC) cmd_window_move_right);
command_unbind("window list", (SIGNAL_FUNC) cmd_window_list);
+ command_unbind("window theme", (SIGNAL_FUNC) cmd_window_theme);
}