1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-25 10:42:18 -05:00

Rainbow user list colors and more senseful variable names

This commit is contained in:
Berke Viktor 2012-11-03 01:42:47 +01:00
parent 58e7e967db
commit 396d74322a
16 changed files with 85 additions and 83 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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 */
}

View File

@ -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)

View File

@ -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">

View File

@ -7,6 +7,24 @@
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="ulist_voice.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_halfop.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_op.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_owner.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_founder.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_netop.png">
<Filter>Resource Files</Filter>
</None>
<None Include="book.png">
<Filter>Resource Files</Filter>
</None>
@ -16,27 +34,9 @@
<None Include="highlight.png">
<Filter>Resource Files</Filter>
</None>
<None Include="hop.png">
<Filter>Resource Files</Filter>
</None>
<None Include="message.png">
<Filter>Resource Files</Filter>
</None>
<None Include="op.png">
<Filter>Resource Files</Filter>
</None>
<None Include="orange.png">
<Filter>Resource Files</Filter>
</None>
<None Include="purple.png">
<Filter>Resource Files</Filter>
</None>
<None Include="red.png">
<Filter>Resource Files</Filter>
</None>
<None Include="voice.png">
<Filter>Resource Files</Filter>
</None>
<None Include="..\..\hexchat.png">
<Filter>Resource Files</Filter>
</None>

View File

@ -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">

View File

@ -7,6 +7,24 @@
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="ulist_voice.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_halfop.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_op.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_owner.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_founder.png">
<Filter>Resource Files</Filter>
</None>
<None Include="ulist_netop.png">
<Filter>Resource Files</Filter>
</None>
<None Include="book.png">
<Filter>Resource Files</Filter>
</None>
@ -16,27 +34,9 @@
<None Include="highlight.png">
<Filter>Resource Files</Filter>
</None>
<None Include="hop.png">
<Filter>Resource Files</Filter>
</None>
<None Include="message.png">
<Filter>Resource Files</Filter>
</None>
<None Include="op.png">
<Filter>Resource Files</Filter>
</None>
<None Include="orange.png">
<Filter>Resource Files</Filter>
</None>
<None Include="purple.png">
<Filter>Resource Files</Filter>
</None>
<None Include="red.png">
<Filter>Resource Files</Filter>
</None>
<None Include="voice.png">
<Filter>Resource Files</Filter>
</None>
<None Include="..\..\hexchat.png">
<Filter>Resource Files</Filter>
</None>

View File

Before

Width:  |  Height:  |  Size: 788 B

After

Width:  |  Height:  |  Size: 788 B

View File

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 832 B

View File

Before

Width:  |  Height:  |  Size: 699 B

After

Width:  |  Height:  |  Size: 699 B

View File

Before

Width:  |  Height:  |  Size: 824 B

After

Width:  |  Height:  |  Size: 824 B

View File

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 831 B

View File

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 837 B

View File

@ -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>

View File

@ -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>