[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1.9.4 tab-hilight patch (purple tabs)




>>>> I'm not sure if I'm ready for the 100 "What's a purple tab mean?" 
>>>> emails
>>>> ;)
>>>>
>>>> How about dark-red for new-data, and bright-red for new-message/data?
>>>> It might be more intuitive for people...?
>>>>     
>>>
>>> If at all possible, I'd like it if the colors could be customized. 
>>> Not all
>>> of us use themes with gray widgets... :)
>>>   
>>
>>
>> AOL. I've been patching the source to change the tab colours for a
>> while now...
>>  
>>
>
> Andrew, Joanne:
> you don't have to patch it, just change the color palette for colors 4 
> and 12..
> then restart the program.... i guess its not the best way though, i 
> think there
> should be a way to customize those colors...
>
> Peter:
> yeh i think these are the colors that xirssi uses ....
> i will submit updated patch, and i was thinking about this, but
> the colors are very similar, how about you change the default color 
> palette
> for colors 4 and 5, make 4 a little brighter and 5 a little darker,
> so that they can be distinguished a little easier..
>
> Nehal
>
here is updated one with darkred instead of purple

Nehal


diff -ur -x po xchat-1.9.4/src/common/inbound.c xchat-modified/src/common/inbound.c
--- xchat-1.9.4/src/common/inbound.c	2002-10-08 20:50:41.000000000 -0700
+++ xchat-modified/src/common/inbound.c	2002-11-07 21:55:09.000000000 -0800
@@ -288,6 +288,11 @@
 		return;
 
 	sess->highlight_tab = TRUE;
+	if (sess != current_tab)
+	{
+    	    sess->msg_said = TRUE;
+	    sess->new_data = FALSE;
+	}
 
 	user = find_name (sess, from);
 	if (user)
diff -ur -x po xchat-1.9.4/src/common/xchat.h xchat-modified/src/common/xchat.h
--- xchat-1.9.4/src/common/xchat.h	2002-11-02 22:27:47.000000000 -0800
+++ xchat-modified/src/common/xchat.h	2002-11-08 13:45:28.000000000 -0800
@@ -306,8 +306,9 @@
 
 	int userlisthidden;
 	int type;
-	int new_data:1;		/* new data avail? (red tab) */
+	int new_data:1;			/* new data avail? (darkred tab) */
 	int nick_said:1;		/* your nick mentioned? (blue tab) */
+	int msg_said:1;			/* new msg available? (red tab) */
 	int ignore_date:1;
 	int ignore_mode:1;
 	int ignore_names:1;
diff -ur -x po xchat-1.9.4/src/fe-gtk/fe-gtk.c xchat-modified/src/fe-gtk/fe-gtk.c
--- xchat-1.9.4/src/fe-gtk/fe-gtk.c	2002-11-04 19:53:53.000000000 -0800
+++ xchat-modified/src/fe-gtk/fe-gtk.c	2002-11-08 13:45:59.000000000 -0800
@@ -565,7 +565,11 @@
 		 sess->gui->is_tab && !sess->nick_said)
 	{
 		sess->new_data = TRUE;
-		tab_style (sess->gui->tab, red_style);
+		if (sess->msg_said) {
+		    tab_style (sess->gui->tab, red_style);
+		} else {
+		    tab_style (sess->gui->tab, darkred_style);
+		}
 	}
 }
 
diff -ur -x po xchat-1.9.4/src/fe-gtk/maingui.c xchat-modified/src/fe-gtk/maingui.c
--- xchat-1.9.4/src/fe-gtk/maingui.c	2002-10-23 04:52:56.000000000 -0700
+++ xchat-modified/src/fe-gtk/maingui.c	2002-11-08 13:46:48.000000000 -0800
@@ -70,6 +70,7 @@
 
 GtkStyle *red_style = NULL;
 GtkStyle *blue_style;
+GtkStyle *darkred_style;
 GtkStyle *input_style;
 
 
@@ -84,6 +85,9 @@
 
 	blue_style = gtk_style_copy (style);
 	blue_style->fg[0] = colors[12];
+
+	darkred_style = gtk_style_copy (style);
+	darkred_style->fg[0] = colors[5];
 }
 
 /* change the little icon to the left of your nickname */
@@ -230,9 +234,10 @@
 		sess->server->server_session = sess;
 	}
 
-	if (sess->new_data || sess->nick_said)
+	if (sess->new_data || sess->nick_said || sess->msg_said)
 	{
 		sess->nick_said = FALSE;
+		sess->msg_said = FALSE;
 		sess->new_data = FALSE;
 		tab_style (sess->gui->tab, NULL);
 	}
diff -ur -x po xchat-1.9.4/src/fe-gtk/maingui.h xchat-modified/src/fe-gtk/maingui.h
--- xchat-1.9.4/src/fe-gtk/maingui.h	2002-06-30 08:21:28.000000000 -0700
+++ xchat-modified/src/fe-gtk/maingui.h	2002-11-08 13:46:33.000000000 -0800
@@ -1,5 +1,6 @@
 extern GtkStyle *red_style;
 extern GtkStyle *blue_style;
+extern GtkStyle *darkred_style;
 extern GtkStyle *input_style;
 extern GtkWidget *main_menu;