summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/cfgfiles.c16
-rw-r--r--src/common/servlist.c6
-rw-r--r--src/common/text.c14
-rw-r--r--src/common/xchat.h5
-rw-r--r--src/fe-gtk/fe-gtk.c24
-rw-r--r--src/fe-gtk/setup.c31
6 files changed, 73 insertions, 23 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index da2fc107..352c0174 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -39,7 +39,7 @@
 
 #define DEF_FONT "Monospace 9"
 #ifdef WIN32
-#define DEF_FONT_ALTER "Arial Unicode MS,Lucida Sans Unicode,MS Gothic"
+#define DEF_FONT_ALTER "Arial Unicode MS,Lucida Sans Unicode,MS Gothic,Unifont"
 #endif
 
 void
@@ -580,9 +580,9 @@ const struct prefs vars[] = {
 	{"tab_trunc", P_OFFINT (truncchans), TYPE_INT},
 	{"tab_utils", P_OFFINT (windows_as_tabs), TYPE_BOOL},
 
-	{"text_auto_copy_color", P_OFFINT (autocopy_color), TYPE_BOOL},	
-	{"text_auto_copy_stamp", P_OFFINT (autocopy_stamp), TYPE_BOOL},
-	{"text_auto_copy_text", P_OFFINT (autocopy_text), TYPE_BOOL},
+	{"text_autocopy_color", P_OFFINT (autocopy_color), TYPE_BOOL},	
+	{"text_autocopy_stamp", P_OFFINT (autocopy_stamp), TYPE_BOOL},
+	{"text_autocopy_text", P_OFFINT (autocopy_text), TYPE_BOOL},
 	{"text_background", P_OFFSET (background), TYPE_STR},
 	{"text_color_nicks", P_OFFINT (colorednicks), TYPE_BOOL},
 #ifdef WIN32
@@ -597,7 +597,6 @@ const struct prefs vars[] = {
 	{"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT},
 	{"text_max_lines", P_OFFINT (max_lines), TYPE_INT},
 	{"text_replay", P_OFFINT (text_replay), TYPE_BOOL},
-	{"text_replay_strip_color", P_OFFINT (text_replay_strip_color), TYPE_BOOL},
 	{"text_search_case_match", P_OFFINT (text_search_case_match), TYPE_BOOL},
 	{"text_search_backward", P_OFFINT (text_search_backward), TYPE_BOOL},
 	{"text_search_highlight_all", P_OFFINT (text_search_highlight_all), TYPE_BOOL},
@@ -606,7 +605,9 @@ const struct prefs vars[] = {
 	{"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL},
 	{"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL},
 	{"text_spell_langs", P_OFFSET (spell_langs), TYPE_STR},
-	{"text_stripcolor", P_OFFINT (stripcolor), TYPE_BOOL},
+	{"text_stripcolor_msg", P_OFFINT (text_stripcolor_msg), TYPE_BOOL},
+	{"text_stripcolor_replay", P_OFFINT (text_stripcolor_replay), TYPE_BOOL},
+	{"text_stripcolor_topic", P_OFFINT (text_stripcolor_topic), TYPE_BOOL},
 	{"text_thin_sep", P_OFFINT (thin_separator), TYPE_BOOL},
 	{"text_tint_blue", P_OFFINT (tint_blue), TYPE_INT},
 	{"text_tint_green", P_OFFINT (tint_green), TYPE_INT},
@@ -689,7 +690,8 @@ load_config (void)
 	prefs.recon_delay = 10;
 	prefs.autocopy_text = 1;
 	prefs.text_replay = 1;
-	prefs.text_replay_strip_color = 1;
+	prefs.text_stripcolor_replay = 1;
+	prefs.text_stripcolor_topic = 1;
 	prefs.tabchannels = 1;
 	prefs.tab_layout = 2;	/* 0=Tabs 1=Reserved 2=Tree */
 	prefs.tab_sort = 1;
diff --git a/src/common/servlist.c b/src/common/servlist.c
index 7e89fd61..85644ea8 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -135,6 +135,12 @@ static const struct defaultserver def[] =
 	{"Beirut", 0},
 	{0,			"irc.beirut.com"},
 
+	{"Chat4all", 0},
+#ifdef USE_OPENSSL
+	{0,			"irc.chat4all.org/+7001"},
+#endif
+	{0,			"irc.chat4all.org"},
+
 	{"ChattingAway", 0},
 	{0,			"irc.chattingaway.com"},
 
diff --git a/src/common/text.c b/src/common/text.c
index 7ec5d0ae..220fca1b 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -340,12 +340,12 @@ scrollback_load (session *sess)
 			text = strchr (buf + 3, ' ');
 			if (text)
 			{
-				if (prefs.text_replay_strip_color)
+				if (prefs.text_stripcolor_replay)
 				{
 					text = strip_color (text + 1, -1, STRIP_COLOR);
 				}
 				fe_print_text (sess, text, stamp);
-				if (prefs.text_replay_strip_color)
+				if (prefs.text_stripcolor_replay)
 				{
 					g_free (text);
 				}
@@ -381,21 +381,21 @@ scrollback_load (session *sess)
 			text = strchr (buf + 3, ' ');
 			if (text)
 			{
-				if (prefs.text_replay_strip_color)
+				if (prefs.text_stripcolor_replay)
 				{
 					text = strip_color (text + 1, -1, STRIP_COLOR);
 				}
 				cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len);
 				if (cleaned_text != NULL)
 				{
-					if (prefs.text_replay_strip_color)
+					if (prefs.text_stripcolor_replay)
 					{
 						g_free (text);
 					}
 					text = cleaned_text;
 				}
 				fe_print_text (sess, text, stamp);
-				if (prefs.text_replay_strip_color)
+				if (prefs.text_stripcolor_replay)
 				{
 					g_free (text);
 				}
@@ -1799,7 +1799,7 @@ load_text_events ()
 
 /*
 	CL: format_event now handles filtering of arguments:
-	1) if prefs.stripcolor is set, filter all style control codes from arguments
+	1) if prefs.text_stripcolor_msg is set, filter all style control codes from arguments
 	2) always strip \010 (ATTR_HIDDEN) from arguments: it is only for use in the format string itself
 */
 #define ARG_FLAG(argn) (1 << (argn))
@@ -2095,7 +2095,7 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d)
 {
 	char *word[PDIWORDS];
 	int i;
-	unsigned int stripcolor_args = (prefs.stripcolor ? 0xFFFFFFFF : 0);
+	unsigned int stripcolor_args = (prefs.text_stripcolor_msg ? 0xFFFFFFFF : 0);
 	char tbuf[NICKLEN + 4];
 
 	if (prefs.colorednicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG))
diff --git a/src/common/xchat.h b/src/common/xchat.h
index 0ebe83cf..d9a64d68 100644
--- a/src/common/xchat.h
+++ b/src/common/xchat.h
@@ -236,7 +236,9 @@ struct xchatprefs
 	unsigned int autoopendccrecvwindow;
 	unsigned int autoopendccchatwindow;
 	unsigned int transparent;
-	unsigned int stripcolor;
+	unsigned int text_stripcolor_msg;
+	unsigned int text_stripcolor_replay;
+	unsigned int text_stripcolor_topic;
 	unsigned int timestamp;
 	unsigned int fastdccsend;
 	unsigned int dcc_send_fillspaces;
@@ -286,7 +288,6 @@ struct xchatprefs
 	unsigned int windows_as_tabs;
 	unsigned int indent_nicks;
 	unsigned int text_replay;
-	unsigned int text_replay_strip_color;
 	unsigned int show_marker;
 	unsigned int show_separator;
 	unsigned int thin_separator;
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index 8a7ce283..ad401bca 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -552,13 +552,31 @@ fe_set_topic (session *sess, char *topic, char *stripped_topic)
 {
 	if (!sess->gui->is_tab || sess == current_tab)
 	{
-		gtk_entry_set_text (GTK_ENTRY (sess->gui->topic_entry), stripped_topic);
+		if (prefs.text_stripcolor_topic)
+		{
+			gtk_entry_set_text (GTK_ENTRY (sess->gui->topic_entry), stripped_topic);
+		}
+		else
+		{
+			gtk_entry_set_text (GTK_ENTRY (sess->gui->topic_entry), topic);
+		}
 		mg_set_topic_tip (sess);
-	} else
+	}
+	else
 	{
 		if (sess->res->topic_text)
+		{
 			free (sess->res->topic_text);
-		sess->res->topic_text = strdup (stripped_topic);
+		}
+
+		if (prefs.text_stripcolor_topic)
+		{
+			sess->res->topic_text = strdup (stripped_topic);
+		}
+		else
+		{
+			sess->res->topic_text = strdup (topic);
+		}
 	}
 }
 
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index fafb8334..3cf059e3 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -143,7 +143,7 @@ static const char *const tabcompmenu[] =
 
 static const setting inputbox_settings[] =
 {
-	{ST_HEADER, N_("Input box"),0,0,0},
+	{ST_HEADER, N_("Input Box"),0,0,0},
 	{ST_TOGGLE, N_("Use the Text box font and colors"), P_OFFINTNL(style_inputbox),0,0,0},
 #if defined(USE_GTKSPELL) || defined(USE_LIBSEXY)
 	{ST_TOGGLE, N_("Spell checking"), P_OFFINTNL(gui_input_spell),0,0,0},
@@ -219,7 +219,7 @@ static const setting userlist_settings[] =
 	{ST_MENU,	N_("User list sorted by:"), P_OFFINTNL(userlist_sort), 0, ulmenutext, 0},
 	{ST_MENU,	N_("Show user list at:"), P_OFFINTNL(gui_ulist_pos), 0, ulpos, 1},
 
-	{ST_HEADER,	N_("Away tracking"),0,0,0},
+	{ST_HEADER,	N_("Away Tracking"),0,0,0},
 	{ST_TOGGLE,	N_("Track the Away status of users and mark them in a different color"), P_OFFINTNL(away_track),0,0,2},
 	{ST_NUMBER, N_("On channels smaller than:"), P_OFFINTNL(away_size_max),0,0,10000},
 
@@ -281,6 +281,15 @@ static const setting tabs_settings[] =
 	{ST_END, 0, 0, 0, 0, 0}
 };
 
+static const setting color_settings[] =
+{
+	{ST_TOGGLE, N_("Messages"), P_OFFINTNL(text_stripcolor_msg), 0, 0, 0},
+	{ST_TOGGLE, N_("Scrollback"), P_OFFINTNL(text_stripcolor_replay), 0, 0, 0},
+	{ST_TOGGLE, N_("Topic"), P_OFFINTNL(text_stripcolor_topic), 0, 0, 0},
+
+	{ST_END, 0, 0, 0, 0, 0}
+};
+
 static const char *const dccaccept[] =
 {
 	N_("No"),
@@ -413,7 +422,7 @@ static const setting advanced_settings[] =
 	{ST_TOGGLE, N_("Send window"), P_OFFINTNL(autoopendccsendwindow), 0, 0, 0},
 	{ST_TOGGLE, N_("Receive window"), P_OFFINTNL(autoopendccrecvwindow), 0, 0, 0},
 	{ST_TOGGLE, N_("Chat window"), P_OFFINTNL(autoopendccchatwindow), 0, 0, 0},
-	{ST_HEADER,	N_("Auto-Copy Behavior"),0,0,0},
+	{ST_HEADER,	N_("Auto Copy Behavior"),0,0,0},
 	{ST_TOGGLE, N_("Automatically copy selected text"), P_OFFINTNL(autocopy_text),
 					N_("Copy selected text to clipboard when left mouse button is released. "
 						"Otherwise, CONTROL-SHIFT-C will copy the "
@@ -464,7 +473,9 @@ static const setting logging_settings[] =
 {
 	{ST_HEADER,	N_("Logging"),0,0,0},
 	{ST_TOGGLE,	N_("Display scrollback from previous session"), P_OFFINTNL(text_replay), 0, 0, 0},
-	{ST_TOGGLE,	N_("Strip colors when displaying scrollback"), P_OFFINTNL(text_replay_strip_color), 0, 0, 0},
+#if 0 /* Now it's done under Colors */
+	{ST_TOGGLE,	N_("Strip colors when displaying scrollback"), P_OFFINTNL(text_stripcolor_replay), 0, 0, 0},
+#endif
 	{ST_TOGGLE,	N_("Enable logging of conversations to disk"), P_OFFINTNL(logging), 0, 0, 2},
 	{ST_ENTRY,	N_("Log filename:"), P_OFFSETNL(logmask), 0, 0, sizeof prefs.logmask},
 	{ST_LABEL,	N_("%s=Server %c=Channel %n=Network.")},
@@ -1417,6 +1428,18 @@ setup_create_color_page (void)
 	setup_create_other_colorR (_("Spell checker:"), COL_SPELL, 11, tab);
 #endif
 
+	setup_create_header (tab, 15, N_("Color Stripping"));
+
+	/* label = gtk_label_new (_("Strip colors from:"));
+	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+	gtk_table_attach (GTK_TABLE (tab), label, 2, 3, 16, 17,
+							GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0); */
+
+	for (i = 0; i < 3; i++)
+	{
+		setup_create_toggleL (tab, i + 16, &color_settings[i]);
+	}
+
 	return box;
 }