summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/maingui.c2
-rw-r--r--src/fe-gtk/palette.c32
-rw-r--r--src/fe-gtk/rawlog.c25
-rw-r--r--src/fe-gtk/setup.c5
-rw-r--r--src/fe-gtk/userlistgui.c4
5 files changed, 39 insertions, 29 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 0009198e..96f5e6b2 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -2611,7 +2611,7 @@ mg_create_center (session *sess, session_gui *gui, GtkWidget *box)
 	mg_create_textarea (sess, vbox);
 	mg_create_entry (sess, vbox);
 
-	g_idle_add ((GSourceFunc)mg_add_pane_signals, gui);
+	mg_add_pane_signals (gui);
 }
 
 static void
diff --git a/src/fe-gtk/palette.c b/src/fe-gtk/palette.c
index 7507cbf4..f40fd8b4 100644
--- a/src/fe-gtk/palette.c
+++ b/src/fe-gtk/palette.c
@@ -39,22 +39,22 @@
 
 GdkColor colors[] = {
 	/* colors for xtext */
-	{0, 0xd3d3, 0xd7d7, 0xcfcf}, /* 16 white */
-	{0, 0x2e2e, 0x3434, 0x3636}, /* 17 black */
-	{0, 0x3434, 0x6565, 0xa4a4}, /* 18 blue */
-	{0, 0x4e4e, 0x9a9a, 0x0606}, /* 19 green */
-	{0, 0xcccc, 0x0000, 0x0000}, /* 20 red */
-	{0, 0x8f8f, 0x3939, 0x0202}, /* 21 light red */
-	{0, 0x5c5c, 0x3535, 0x6666}, /* 22 purple */
-	{0, 0xcece, 0x5c5c, 0x0000}, /* 23 orange */
-	{0, 0xc4c4, 0xa0a0, 0x0000}, /* 24 yellow */
-	{0, 0x7373, 0xd2d2, 0x1616}, /* 25 green */
-	{0, 0x1111, 0xa8a8, 0x7979}, /* 26 aqua */
-	{0, 0x5858, 0xa1a1, 0x9d9d}, /* 27 light aqua */
-	{0, 0x5757, 0x7979, 0x9e9e}, /* 28 blue */
-	{0, 0xa0d0, 0x42d4, 0x6562}, /* 29 light purple */
-	{0, 0x5555, 0x5757, 0x5353}, /* 30 grey */
-	{0, 0x8888, 0x8a8a, 0x8585}, /* 31 light grey */
+	{0, 0xd3d3, 0xd7d7, 0xcfcf}, /* 0 white */
+	{0, 0x2e2e, 0x3434, 0x3636}, /* 1 black */
+	{0, 0x3434, 0x6565, 0xa4a4}, /* 2 blue */
+	{0, 0x4e4e, 0x9a9a, 0x0606}, /* 3 green */
+	{0, 0xcccc, 0x0000, 0x0000}, /* 4 red */
+	{0, 0x8f8f, 0x3939, 0x0202}, /* 5 light red */
+	{0, 0x5c5c, 0x3535, 0x6666}, /* 6 purple */
+	{0, 0xcece, 0x5c5c, 0x0000}, /* 7 orange */
+	{0, 0xc4c4, 0xa0a0, 0x0000}, /* 8 yellow */
+	{0, 0x7373, 0xd2d2, 0x1616}, /* 9 green */
+	{0, 0x1111, 0xa8a8, 0x7979}, /* 10 aqua */
+	{0, 0x5858, 0xa1a1, 0x9d9d}, /* 11 light aqua */
+	{0, 0x5757, 0x7979, 0x9e9e}, /* 12 blue */
+	{0, 0xa0d0, 0x42d4, 0x6562}, /* 13 light purple */
+	{0, 0x5555, 0x5757, 0x5353}, /* 14 grey */
+	{0, 0x8888, 0x8a8a, 0x8585}, /* 15 light grey */
 
 	{0, 0xd3d3, 0xd7d7, 0xcfcf}, /* 16 white */
 	{0, 0x2e2e, 0x3434, 0x3636}, /* 17 black */
diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c
index d0564406..736013c9 100644
--- a/src/fe-gtk/rawlog.c
+++ b/src/fe-gtk/rawlog.c
@@ -154,20 +154,29 @@ open_rawlog (struct server *serv)
 void
 fe_add_rawlog (server *serv, char *text, int len, int outbound)
 {
+	char **split_text;
 	char *new_text;
+	int i;
 
 	if (!serv->gui->rawlog_window)
 		return;
 
-	new_text = malloc (len + 7);
+	split_text = g_strsplit (text, "\r\n", 0);
 
-	len = sprintf (new_text, "\0033>>\017 %s", text);
-	if (outbound)
+	for (i = 0; i < g_strv_length (split_text); i++)
 	{
-		new_text[1] = '4';
-		new_text[2] = '<';
-		new_text[3] = '<';
+		if (split_text[i][0] == 0)
+			break;
+
+		if (outbound)
+			new_text = g_strconcat ("\0034<<\017 ", split_text[i], NULL);
+		else
+			new_text = g_strconcat ("\0033>>\017 ", split_text[i], NULL);
+
+		gtk_xtext_append (GTK_XTEXT (serv->gui->rawlog_textlist)->buffer, new_text, strlen (new_text));
+
+		g_free (new_text);
 	}
-	gtk_xtext_append (GTK_XTEXT (serv->gui->rawlog_textlist)->buffer, new_text, len);
-	free (new_text);
+
+	g_strfreev (split_text);
 }
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index 9132de1f..dbeeb796 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -505,12 +505,13 @@ static const setting advanced_settings[] =
 #ifdef WIN32
 	{ST_ENTRY,  N_("Alternative fonts:"), P_OFFSETNL(hex_text_font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.hex_text_font_alternative},
 #endif
-	{ST_NUMBER,	N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
-	{ST_NUMBER,	N_("Auto join delay:"), P_OFFINTNL(hex_irc_join_delay), 0, 0, 9999},
 	{ST_TOGGLE,	N_("Display MODEs in raw form"), P_OFFINTNL(hex_irc_raw_modes), 0, 0, 0},
 	{ST_TOGGLE,	N_("Whois on notify"), P_OFFINTNL(hex_notify_whois_online), N_("Sends a /WHOIS when a user comes online in your notify list."), 0, 0},
 	{ST_TOGGLE,	N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default."), 0, 0},
 	{ST_TOGGLE,	N_("Display lists in compact mode"), P_OFFINTNL(hex_gui_compact), N_("Use less spacing between user list/channel tree rows."), 0, 0},
+	{ST_TOGGLE,	N_("Automatically reconnect to servers on disconnect"), P_OFFINTNL(hex_net_auto_reconnect), 0, 0, 1},
+	{ST_NUMBER,	N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
+	{ST_NUMBER,	N_("Auto join delay:"), P_OFFINTNL(hex_irc_join_delay), 0, 0, 9999},
 	{ST_HEADER,	N_("Auto Open DCC Windows"),0,0,0},
 	{ST_TOGGLE, N_("Send window"), P_OFFINTNL(hex_gui_autoopen_send), 0, 0, 0},
 	{ST_TOGGLE, N_("Receive window"), P_OFFINTNL(hex_gui_autoopen_recv), 0, 0, 0},
diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c
index c2f2a462..530d213f 100644
--- a/src/fe-gtk/userlistgui.c
+++ b/src/fe-gtk/userlistgui.c
@@ -320,7 +320,7 @@ fe_userlist_rehash (session *sess, struct User *user)
 	if (!iter)
 		return;
 
-	if (prefs.hex_away_track && prefs.hex_away_size_max && user->away)
+	if (prefs.hex_away_track && user->away)
 		nick_color = COL_AWAY;
 	else if (prefs.hex_gui_ulist_color)
 		nick_color = text_color_of(user->nick);
@@ -340,7 +340,7 @@ fe_userlist_insert (session *sess, struct User *newuser, int row, int sel)
 	char *nick;
 	int nick_color = 0;
 
-	if (prefs.hex_away_track && prefs.hex_away_size_max && newuser->away)
+	if (prefs.hex_away_track && newuser->away)
 		nick_color = COL_AWAY;
 	else if (prefs.hex_gui_ulist_color)
 		nick_color = text_color_of(newuser->nick);