mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Configurable statusbar - see default config file (irssi.conf) for example
how to configure it. Added %> format which clears to end of line using the current bg color. Added support for multiple input lines (just the core, not used anywhere yet). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1821 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b32a9a9585
commit
dbe49236d2
20 changed files with 1643 additions and 1118 deletions
|
|
@ -144,6 +144,11 @@ int format_expand_styles(GString *out, const char **format, int *flags)
|
|||
g_string_append_c(out, 4);
|
||||
g_string_append_c(out, FORMAT_STYLE_DEFAULTS);
|
||||
break;
|
||||
case '>':
|
||||
/* clear to end of line */
|
||||
g_string_append_c(out, 4);
|
||||
g_string_append_c(out, FORMAT_STYLE_CLRTOEOL);
|
||||
break;
|
||||
case '[':
|
||||
/* code */
|
||||
format_expand_code(format, flags);
|
||||
|
|
@ -882,16 +887,19 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
|
|||
/* bell */
|
||||
if (settings_get_bool("bell_beeps"))
|
||||
signal_emit("beep", 0);
|
||||
} else if (type == 4 && *ptr == FORMAT_STYLE_CLRTOEOL) {
|
||||
/* clear to end of line */
|
||||
flags |= GUI_PRINT_FLAG_CLRTOEOL;
|
||||
}
|
||||
|
||||
if (*str != '\0') {
|
||||
if (*str != '\0' || (flags & GUI_PRINT_FLAG_CLRTOEOL)) {
|
||||
/* send the text to gui handler */
|
||||
signal_emit_id(signal_gui_print_text, 6, dest->window,
|
||||
GINT_TO_POINTER(fgcolor),
|
||||
GINT_TO_POINTER(bgcolor),
|
||||
GINT_TO_POINTER(flags), str,
|
||||
dest->level);
|
||||
flags &= ~GUI_PRINT_FLAG_INDENT;
|
||||
flags &= ~(GUI_PRINT_FLAG_INDENT|GUI_PRINT_FLAG_CLRTOEOL);
|
||||
}
|
||||
|
||||
if (type == '\n')
|
||||
|
|
@ -938,6 +946,8 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
|
|||
fgcolor = bgcolor = -1;
|
||||
flags &= GUI_PRINT_FLAG_INDENT;
|
||||
break;
|
||||
case FORMAT_STYLE_CLRTOEOL:
|
||||
break;
|
||||
default:
|
||||
if (*ptr != FORMAT_COLOR_NOCHANGE) {
|
||||
fgcolor = (unsigned char) *ptr-'0';
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#define GUI_PRINT_FLAG_MIRC_COLOR 0x10
|
||||
#define GUI_PRINT_FLAG_INDENT 0x20
|
||||
#define GUI_PRINT_FLAG_NEWLINE 0x40
|
||||
#define GUI_PRINT_FLAG_CLRTOEOL 0x80
|
||||
|
||||
#define MAX_FORMAT_PARAMS 10
|
||||
#define DEFAULT_FORMAT_ARGLIST_SIZE 200
|
||||
|
|
@ -121,6 +122,7 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text);
|
|||
#define FORMAT_STYLE_REVERSE (0x04 + FORMAT_STYLE_SPECIAL)
|
||||
#define FORMAT_STYLE_INDENT (0x05 + FORMAT_STYLE_SPECIAL)
|
||||
#define FORMAT_STYLE_DEFAULTS (0x06 + FORMAT_STYLE_SPECIAL)
|
||||
#define FORMAT_STYLE_CLRTOEOL (0x07 + FORMAT_STYLE_SPECIAL)
|
||||
int format_expand_styles(GString *out, const char **format, int *flags);
|
||||
|
||||
void formats_init(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue