summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-11-03 01:42:47 +0100
committerBerke Viktor <bviktor@hexchat.org>2012-11-03 01:42:47 +0100
commit396d74322af6af7a6d813643ecab2a3f9b3f7bba (patch)
treeeba74c5951120abd2e0f85a7fc0fe213ea5d1b8f
parent58e7e967db34e88b6a76801d8d05e3ce68a21295 (diff)
Rainbow user list colors and more senseful variable names
-rw-r--r--src/fe-gtk/pixmaps.c25
-rw-r--r--src/fe-gtk/pixmaps.h13
-rw-r--r--src/fe-gtk/userlistgui.c14
-rw-r--r--src/pixmaps/Makefile.am16
-rw-r--r--src/pixmaps/pixmaps-xp.vcxproj12
-rw-r--r--src/pixmaps/pixmaps-xp.vcxproj.filters20
-rw-r--r--src/pixmaps/pixmaps.vcxproj12
-rw-r--r--src/pixmaps/pixmaps.vcxproj.filters20
-rw-r--r--src/pixmaps/ulist_founder.png (renamed from src/pixmaps/orange.png)bin788 -> 788 bytes
-rw-r--r--src/pixmaps/ulist_halfop.png (renamed from src/pixmaps/hop.png)bin832 -> 832 bytes
-rw-r--r--src/pixmaps/ulist_netop.png (renamed from src/pixmaps/red.png)bin699 -> 699 bytes
-rw-r--r--src/pixmaps/ulist_op.png (renamed from src/pixmaps/op.png)bin824 -> 824 bytes
-rw-r--r--src/pixmaps/ulist_owner.png (renamed from src/pixmaps/voice.png)bin831 -> 831 bytes
-rw-r--r--src/pixmaps/ulist_voice.png (renamed from src/pixmaps/purple.png)bin837 -> 837 bytes
-rw-r--r--win32/hexchat-xp.props2
-rw-r--r--win32/hexchat.props2
16 files changed, 69 insertions, 67 deletions
diff --git a/src/fe-gtk/pixmaps.c b/src/fe-gtk/pixmaps.c
index f260a22c..a1fa9842 100644
--- a/src/fe-gtk/pixmaps.c
+++ b/src/fe-gtk/pixmaps.c
@@ -34,12 +34,13 @@
 GdkPixbuf *pix_xchat;
 GdkPixbuf *pix_book;
 
-GdkPixbuf *pix_orange;
-GdkPixbuf *pix_purple;
-GdkPixbuf *pix_red;
-GdkPixbuf *pix_op;
-GdkPixbuf *pix_hop;
-GdkPixbuf *pix_voice;
+GdkPixbuf *pix_ulist_voice;
+GdkPixbuf *pix_ulist_halfop;
+GdkPixbuf *pix_ulist_op;
+GdkPixbuf *pix_ulist_owner;
+GdkPixbuf *pix_ulist_founder;
+GdkPixbuf *pix_ulist_netop;
+
 
 GdkPixbuf *pix_tray_msg;
 GdkPixbuf *pix_tray_hilight;
@@ -127,12 +128,12 @@ pixmaps_init (void)
 	pix_xchat = load_pixmap ("hexchat", hexchatpng, 1);
 
 	/* userlist icons, with inlined defaults */
-	pix_hop = load_pixmap ("hop", hoppng, 1);
-	pix_orange = load_pixmap ("orange", orangepng, 1);
-	pix_purple = load_pixmap ("purple", purplepng, 1);
-	pix_red = load_pixmap ("red", redpng, 1);
-	pix_op = load_pixmap ("op", oppng, 1);
-	pix_voice = load_pixmap ("voice", voicepng, 1);
+	pix_ulist_voice = load_pixmap ("ulist_voice", png_ulist_voice, 1);
+	pix_ulist_halfop = load_pixmap ("ulist_halfop", png_ulist_halfop, 1);
+	pix_ulist_op = load_pixmap ("ulist_op", png_ulist_op, 1);
+	pix_ulist_owner = load_pixmap ("ulist_owner", png_ulist_owner, 1);
+	pix_ulist_founder = load_pixmap ("ulist_founder", png_ulist_founder, 1);
+	pix_ulist_netop = load_pixmap ("ulist_netop", png_ulist_netop, 1);
 
 	/* tray icons, with inlined defaults */
 	pix_tray_msg = load_pixmap ("message", traymsgpng, 1);
diff --git a/src/fe-gtk/pixmaps.h b/src/fe-gtk/pixmaps.h
index df84c7b2..d5e60642 100644
--- a/src/fe-gtk/pixmaps.h
+++ b/src/fe-gtk/pixmaps.h
@@ -1,10 +1,11 @@
+extern GdkPixbuf *pix_ulist_voice;
+extern GdkPixbuf *pix_ulist_halfop;
+extern GdkPixbuf *pix_ulist_op;
+extern GdkPixbuf *pix_ulist_owner;
+extern GdkPixbuf *pix_ulist_founder;
+extern GdkPixbuf *pix_ulist_netop;
+
 extern GdkPixbuf *pix_book;
-extern GdkPixbuf *pix_hop;
-extern GdkPixbuf *pix_orange;
-extern GdkPixbuf *pix_purple;
-extern GdkPixbuf *pix_red;
-extern GdkPixbuf *pix_op;
-extern GdkPixbuf *pix_voice;
 extern GdkPixbuf *pix_xchat;
 
 extern GdkPixbuf *pix_tray_msg;
diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c
index 74fd5cdf..2859f598 100644
--- a/src/fe-gtk/userlistgui.c
+++ b/src/fe-gtk/userlistgui.c
@@ -76,10 +76,10 @@ get_user_icon (server *serv, struct User *user)
 	/* these ones are hardcoded */
 	switch (user->prefix[0])
 	{
-	case 0: return NULL;
-	case '@': return pix_op;
-	case '%': return pix_hop;
-	case '+': return pix_voice;
+		case 0: return NULL;
+		case '+': return pix_ulist_voice;
+		case '%': return pix_ulist_halfop;
+		case '@': return pix_ulist_op;
 	}
 
 	/* find out how many levels above Op this user is */
@@ -94,9 +94,9 @@ get_user_icon (server *serv, struct User *user)
 			{
 				switch (level)
 				{
-				case 0: return pix_red;	/* 1 level above op */
-				case 1: return pix_purple;	 /* 2 levels above op */
-				case 2: return pix_orange;	/* 3 levels above op */
+					case 0: return pix_ulist_owner;		/* 1 level above op */
+					case 1: return pix_ulist_founder;	/* 2 levels above op */
+					case 2: return pix_ulist_netop;		/* 3 levels above op */
 				}
 				break;	/* 4+, no icons */
 			}
diff --git a/src/pixmaps/Makefile.am b/src/pixmaps/Makefile.am
index 5fc0bac0..6e3e5ab0 100644
--- a/src/pixmaps/Makefile.am
+++ b/src/pixmaps/Makefile.am
@@ -1,22 +1,22 @@
 ## Process this file with automake to produce Makefile.in
 
-LIST =	traymsgpng $(srcdir)/message.png \
+LIST =		png_ulist_voice $(srcdir)/ulist_voice.png \
+			png_ulist_halfop $(srcdir)/ulist_halfop.png \
+			png_ulist_op $(srcdir)/ulist_op.png \
+			png_ulist_owner $(srcdir)/ulist_owner.png \
+			png_ulist_founder $(srcdir)/ulist_founder.png \
+			png_ulist_netop $(srcdir)/ulist_netop.png \
+			traymsgpng $(srcdir)/message.png \
 			trayhilightpng $(srcdir)/highlight.png \
 			trayfilepng $(srcdir)/fileoffer.png \
 			bookpng $(srcdir)/book.png \
-			hoppng $(srcdir)/hop.png \
-			oppng $(srcdir)/op.png \
-			orangepng $(srcdir)/orange.png \
-			purplepng $(srcdir)/purple.png \
-			redpng $(srcdir)/red.png \
-			voicepng $(srcdir)/voice.png \
 			channelpng $(srcdir)/channel.png \
 			dialogpng $(srcdir)/dialog.png \
 			serverpng $(srcdir)/server.png \
 			utilpng $(srcdir)/util.png \
 			hexchatpng $(srcdir)/../../hexchat.png
 
-PNGS = message.png highlight.png fileoffer.png book.png hop.png op.png orange.png purple.png red.png voice.png channel.png dialog.png server.png util.png
+PNGS = ulist_voice.png ulist_halfop.png ulist_op.png ulist_owner.png ulist_founder.png ulist_netop.png message.png highlight.png fileoffer.png book.png channel.png dialog.png server.png util.png
 noinst_HEADERS = inline_pngs.h
 CLEANFILES = $(noinst_HEADERS)
 EXTRA_DIST = $(PNGS)
diff --git a/src/pixmaps/pixmaps-xp.vcxproj b/src/pixmaps/pixmaps-xp.vcxproj
index 9d47bf87..a177822b 100644
--- a/src/pixmaps/pixmaps-xp.vcxproj
+++ b/src/pixmaps/pixmaps-xp.vcxproj
@@ -92,21 +92,21 @@
     </PostBuildEvent>

   </ItemDefinitionGroup>

   <ItemGroup>

+    <None Include="user_voice.png" />

+    <None Include="ulist_halfop.png" />

+    <None Include="ulist_op.png" />

+    <None Include="ulist_owner.png" />

+    <None Include="ulist_founder.png" />

+    <None Include="ulist_netop.png" />

     <None Include="..\..\hexchat.png" />

     <None Include="book.png" />

     <None Include="channel.png" />

     <None Include="dialog.png" />

     <None Include="fileoffer.png" />

     <None Include="highlight.png" />

-    <None Include="hop.png" />

     <None Include="message.png" />

-    <None Include="op.png" />

-    <None Include="orange.png" />

-    <None Include="purple.png" />

-    <None Include="red.png" />

     <None Include="server.png" />

     <None Include="util.png" />

-    <None Include="voice.png" />

   </ItemGroup>

   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

   <ImportGroup Label="ExtensionTargets">

diff --git a/src/pixmaps/pixmaps-xp.vcxproj.filters b/src/pixmaps/pixmaps-xp.vcxproj.filters
index 5ae1c68a..661d5b49 100644
--- a/src/pixmaps/pixmaps-xp.vcxproj.filters
+++ b/src/pixmaps/pixmaps-xp.vcxproj.filters
@@ -7,34 +7,34 @@
     </Filter>

   </ItemGroup>

   <ItemGroup>

-    <None Include="book.png">

+    <None Include="ulist_voice.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="fileoffer.png">

+    <None Include="ulist_halfop.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="highlight.png">

+    <None Include="ulist_op.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="hop.png">

+    <None Include="ulist_owner.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="message.png">

+    <None Include="ulist_founder.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="op.png">

+    <None Include="ulist_netop.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="orange.png">

+    <None Include="book.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="purple.png">

+    <None Include="fileoffer.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="red.png">

+    <None Include="highlight.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="voice.png">

+    <None Include="message.png">

       <Filter>Resource Files</Filter>

     </None>

     <None Include="..\..\hexchat.png">

diff --git a/src/pixmaps/pixmaps.vcxproj b/src/pixmaps/pixmaps.vcxproj
index e3072bb2..623724d7 100644
--- a/src/pixmaps/pixmaps.vcxproj
+++ b/src/pixmaps/pixmaps.vcxproj
@@ -89,21 +89,21 @@
     </PostBuildEvent>

   </ItemDefinitionGroup>

   <ItemGroup>

+    <None Include="user_voice.png" />

+    <None Include="ulist_halfop.png" />

+    <None Include="ulist_op.png" />

+    <None Include="ulist_owner.png" />

+    <None Include="ulist_founder.png" />

+    <None Include="ulist_netop.png" />

     <None Include="..\..\hexchat.png" />

     <None Include="book.png" />

     <None Include="channel.png" />

     <None Include="dialog.png" />

     <None Include="fileoffer.png" />

     <None Include="highlight.png" />

-    <None Include="hop.png" />

     <None Include="message.png" />

-    <None Include="op.png" />

-    <None Include="orange.png" />

-    <None Include="purple.png" />

-    <None Include="red.png" />

     <None Include="server.png" />

     <None Include="util.png" />

-    <None Include="voice.png" />

   </ItemGroup>

   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

   <ImportGroup Label="ExtensionTargets">

diff --git a/src/pixmaps/pixmaps.vcxproj.filters b/src/pixmaps/pixmaps.vcxproj.filters
index 5ae1c68a..661d5b49 100644
--- a/src/pixmaps/pixmaps.vcxproj.filters
+++ b/src/pixmaps/pixmaps.vcxproj.filters
@@ -7,34 +7,34 @@
     </Filter>

   </ItemGroup>

   <ItemGroup>

-    <None Include="book.png">

+    <None Include="ulist_voice.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="fileoffer.png">

+    <None Include="ulist_halfop.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="highlight.png">

+    <None Include="ulist_op.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="hop.png">

+    <None Include="ulist_owner.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="message.png">

+    <None Include="ulist_founder.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="op.png">

+    <None Include="ulist_netop.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="orange.png">

+    <None Include="book.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="purple.png">

+    <None Include="fileoffer.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="red.png">

+    <None Include="highlight.png">

       <Filter>Resource Files</Filter>

     </None>

-    <None Include="voice.png">

+    <None Include="message.png">

       <Filter>Resource Files</Filter>

     </None>

     <None Include="..\..\hexchat.png">

diff --git a/src/pixmaps/orange.png b/src/pixmaps/ulist_founder.png
index 63d76046..63d76046 100644
--- a/src/pixmaps/orange.png
+++ b/src/pixmaps/ulist_founder.png
Binary files differdiff --git a/src/pixmaps/hop.png b/src/pixmaps/ulist_halfop.png
index 169310c2..169310c2 100644
--- a/src/pixmaps/hop.png
+++ b/src/pixmaps/ulist_halfop.png
Binary files differdiff --git a/src/pixmaps/red.png b/src/pixmaps/ulist_netop.png
index 08e314a8..08e314a8 100644
--- a/src/pixmaps/red.png
+++ b/src/pixmaps/ulist_netop.png
Binary files differdiff --git a/src/pixmaps/op.png b/src/pixmaps/ulist_op.png
index 7dc91631..7dc91631 100644
--- a/src/pixmaps/op.png
+++ b/src/pixmaps/ulist_op.png
Binary files differdiff --git a/src/pixmaps/voice.png b/src/pixmaps/ulist_owner.png
index b709f343..b709f343 100644
--- a/src/pixmaps/voice.png
+++ b/src/pixmaps/ulist_owner.png
Binary files differdiff --git a/src/pixmaps/purple.png b/src/pixmaps/ulist_voice.png
index 86474778..86474778 100644
--- a/src/pixmaps/purple.png
+++ b/src/pixmaps/ulist_voice.png
Binary files differdiff --git a/win32/hexchat-xp.props b/win32/hexchat-xp.props
index 9ed55ba2..7f4f9e50 100644
--- a/win32/hexchat-xp.props
+++ b/win32/hexchat-xp.props
@@ -34,7 +34,7 @@
     <PythonOutput>hcpython</PythonOutput>

     <Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>

     <Gtk>$(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0</Gtk>

-    <Pixmaps>bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" orangepng "$(SolutionDir)\..\src\pixmaps\orange.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" channelpng "$(SolutionDir)\..\src\pixmaps\channel.png" dialogpng "$(SolutionDir)\..\src\pixmaps\dialog.png" serverpng "$(SolutionDir)\..\src\pixmaps\server.png" utilpng "$(SolutionDir)\..\src\pixmaps\util.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>

+    <Pixmaps>png_ulist_voice "$(SolutionDir)\..\src\pixmaps\ulist_voice.png" png_ulist_halfop "$(SolutionDir)\..\src\pixmaps\ulist_halfop.png" png_ulist_op "$(SolutionDir)\..\src\pixmaps\ulist_op.png" png_ulist_owner "$(SolutionDir)\..\src\pixmaps\ulist_owner.png" png_ulist_founder "$(SolutionDir)\..\src\pixmaps\ulist_founder.png" png_ulist_netop "$(SolutionDir)\..\src\pixmaps\ulist_netop.png" bookpng "$(SolutionDir)\..\src\pixmaps\book.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" channelpng "$(SolutionDir)\..\src\pixmaps\channel.png" dialogpng "$(SolutionDir)\..\src\pixmaps\dialog.png" serverpng "$(SolutionDir)\..\src\pixmaps\server.png" utilpng "$(SolutionDir)\..\src\pixmaps\util.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>

     <DepLibs>gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;intl.lib;libxml2.lib;libeay32.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib</DepLibs>

     <HexChatBuild>$(SolutionDir)build-xp</HexChatBuild>

     <HexChatBin>$(HexChatBuild)\$(PlatformName)\bin\</HexChatBin>

diff --git a/win32/hexchat.props b/win32/hexchat.props
index edd45e53..4613116e 100644
--- a/win32/hexchat.props
+++ b/win32/hexchat.props
@@ -36,7 +36,7 @@
     <PythonOutput>hcpython</PythonOutput>

     <Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>

     <Gtk>$(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0</Gtk>

-    <Pixmaps>bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" orangepng "$(SolutionDir)\..\src\pixmaps\orange.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" channelpng "$(SolutionDir)\..\src\pixmaps\channel.png" dialogpng "$(SolutionDir)\..\src\pixmaps\dialog.png" serverpng "$(SolutionDir)\..\src\pixmaps\server.png" utilpng "$(SolutionDir)\..\src\pixmaps\util.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>

+    <Pixmaps>png_ulist_voice "$(SolutionDir)\..\src\pixmaps\ulist_voice.png" png_ulist_halfop "$(SolutionDir)\..\src\pixmaps\ulist_halfop.png" png_ulist_op "$(SolutionDir)\..\src\pixmaps\ulist_op.png" png_ulist_owner "$(SolutionDir)\..\src\pixmaps\ulist_owner.png" png_ulist_founder "$(SolutionDir)\..\src\pixmaps\ulist_founder.png" png_ulist_netop "$(SolutionDir)\..\src\pixmaps\ulist_netop.png" bookpng "$(SolutionDir)\..\src\pixmaps\book.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" channelpng "$(SolutionDir)\..\src\pixmaps\channel.png" dialogpng "$(SolutionDir)\..\src\pixmaps\dialog.png" serverpng "$(SolutionDir)\..\src\pixmaps\server.png" utilpng "$(SolutionDir)\..\src\pixmaps\util.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>

     <DepLibs>gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;libintl.lib;libxml2.lib;libeay32.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib</DepLibs>

     <HexChatBuild>$(SolutionDir)build</HexChatBuild>

     <HexChatBin>$(HexChatBuild)\$(PlatformName)\bin\</HexChatBin>