+2003-02-19 James Antill <james@and.org>
+
+ * src/partyline.c (textentry): Add ESC for "/list" parser when user
+ types "/list".
+
+ * src/misc.c (textbox_addtext): Fix attributes (bold, italic etc.
+ were never being set).
+ (textbox_addtext): Don't insert using tags if nothing changed, this
+ seems to work around a bug when using LANG=en_US.UTF-8 gtetrinet. Don't
+ ask me why.
+
2003-02-18 Jordi Mallach <jordi@sindominio.net>
* Makefile.am (INCLUDES): removed, not needed here.
g_assert(TETRI_TB_C_END_OFFSET <= TETRI_TB_END_OFFSET);
switch (text[i]) {
- case TETRI_TB_BOLD: attr_bold = !!attr_bold; break;
- case TETRI_TB_ITALIC: attr_italic = !!attr_italic; break;
- case TETRI_TB_UNDERLINE: attr_underline = !!attr_underline; break;
+ case TETRI_TB_BOLD: attr_bold = !attr_bold; break;
+ case TETRI_TB_ITALIC: attr_italic = !attr_italic; break;
+ case TETRI_TB_UNDERLINE: attr_underline = !attr_underline; break;
default: /* it is a color... */
if (text[i] > TETRI_TB_C_END_OFFSET) break;
if (text[i] == last) {
gtk_text_buffer_insert_with_tags (textbox->buffer, &iter, out, -1,
t_a, color, NULL);
}
- else
+ else if (color != lastcolor)
gtk_text_buffer_insert_with_tags (textbox->buffer, &iter, out, -1,
color, NULL);
+ else
+ gtk_text_buffer_insert (textbox->buffer, &iter, out, -1);
}
text = gtk_entry_get_text (GTK_ENTRY(widget));
if (strlen(text) == 0) return;
+
+ if (!strncmp("/list", text, strlen("/list")))
+ stop_list(); /* Parsing can't be perfect,
+ so make sure they can do it by hand... */
/* convert from UTF-8 to the current locale, will work with ISO8859-1 locales */
iso_text = g_locale_from_utf8 (text, -1, NULL, NULL, NULL);
+
/*
* GTetrinet
* Copyright (C) 1999, 2000, 2001, 2002, 2003 Ka-shu Wong (kswong@zip.com.au)
if (!strncmp ("You", line, 3))
{
/* we will use the error message as list stopper */
- list_issued--;
- if (list_issued <= 0)
- stop_list();
+ stop_list();
break;
}