summary refs log tree commit diff stats
path: root/src/fe-gtk/fe-gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk/fe-gtk.c')
-rw-r--r--src/fe-gtk/fe-gtk.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index 706ab776..cb9c0376 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);
+		}
 	}
 }