diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-11-03 01:42:47 +0100 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-11-03 01:42:47 +0100 |
commit | 396d74322af6af7a6d813643ecab2a3f9b3f7bba (patch) | |
tree | eba74c5951120abd2e0f85a7fc0fe213ea5d1b8f /src/fe-gtk | |
parent | 58e7e967db34e88b6a76801d8d05e3ce68a21295 (diff) |
Rainbow user list colors and more senseful variable names
Diffstat (limited to 'src/fe-gtk')
-rw-r--r-- | src/fe-gtk/pixmaps.c | 25 | ||||
-rw-r--r-- | src/fe-gtk/pixmaps.h | 13 | ||||
-rw-r--r-- | src/fe-gtk/userlistgui.c | 14 |
3 files changed, 27 insertions, 25 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 */ } |