Merge of cuix back in trunk

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4309 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
nattfodd 2006-08-08 21:11:20 +00:00
commit 8b75299729
12 changed files with 758 additions and 0 deletions

View file

@ -30,6 +30,9 @@
#include "printtext.h"
#include "gui-windows.h"
#include "textbuffer-reformat.h"
#ifdef HAVE_CUIX
#include "cuix.h"
#endif
/* SYNTAX: CLEAR [-all] [<refnum>] */
static void cmd_clear(const char *data)
@ -303,6 +306,23 @@ static void sig_away_changed(SERVER_REC *server)
}
}
#ifdef HAVE_CUIX
static void cmd_cuix(void)
{
if (!cuix_active)
{
/* textbuffer_view_clear(WINDOW_GUI(active_win)->view); */
cuix_active = 1;
cuix_create();
} else {
/* should never been called */
/* cuix_destroy (); */
cuix_active = 0;
/* textbuffer_view_clear(WINDOW_GUI(active_win)->view); */
}
}
#endif
void textbuffer_commands_init(void)
{
command_bind("clear", NULL, (SIGNAL_FUNC) cmd_clear);
@ -314,6 +334,9 @@ void textbuffer_commands_init(void)
command_bind("scrollback end", NULL, (SIGNAL_FUNC) cmd_scrollback_end);
command_bind("scrollback redraw", NULL, (SIGNAL_FUNC) cmd_scrollback_redraw);
command_bind("scrollback status", NULL, (SIGNAL_FUNC) cmd_scrollback_status);
#ifdef HAVE_CUIX
command_bind("cuix", NULL, (SIGNAL_FUNC) cmd_cuix);
#endif
command_set_options("clear", "all");
@ -331,6 +354,9 @@ void textbuffer_commands_deinit(void)
command_unbind("scrollback end", (SIGNAL_FUNC) cmd_scrollback_end);
command_unbind("scrollback redraw", (SIGNAL_FUNC) cmd_scrollback_redraw);
command_unbind("scrollback status", (SIGNAL_FUNC) cmd_scrollback_status);
#ifdef HAVE_CUIX
command_unbind("cuix", (SIGNAL_FUNC) cmd_cuix);
#endif
signal_remove("away mode changed", (SIGNAL_FUNC) sig_away_changed);
}