/pidgin/main: d83d55648ce5: initial support for %senderColor%, n...
Nathan Walp
nwalp at pidgin.im
Mon Sep 10 16:37:23 EDT 2012
Changeset: d83d55648ce509b4677139c911fd221ac8991de7
Author: Nathan Walp <nwalp at pidgin.im>
Date: 2012-09-10 15:03 -0400
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/d83d55648ce5
Description:
initial support for %senderColor%, now to add the file parsing
diffstat:
pidgin/gtkconv.c | 4 ++++
pidgin/themes/Contents/Resources/main.css | 5 ++---
pidgin/themes/Makefile.am | 3 +++
3 files changed, 9 insertions(+), 3 deletions(-)
diffs (49 lines):
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -6313,6 +6313,10 @@ replace_message_tokens(
} else if (g_str_has_prefix(cur, "%sender%")) {
replace = alias;
+ } else if (g_str_has_prefix(cur, "%senderColor%")) {
+ const GdkColor *color = get_nick_color(PIDGIN_CONVERSATION(conv), name);
+ replace = freeval = g_strdup_printf("#%02x%02x%02x", (color->red >> 8), (color->green >> 8), (color->blue >> 8));
+
} else if (g_str_has_prefix(cur, "%service%")) {
replace = purple_account_get_protocol_name(purple_conversation_get_account(conv));
diff --git a/pidgin/themes/Contents/Resources/main.css b/pidgin/themes/Contents/Resources/main.css
--- a/pidgin/themes/Contents/Resources/main.css
+++ b/pidgin/themes/Contents/Resources/main.css
@@ -42,10 +42,9 @@ body {
/* Colour-ify things */
-.x-container.incoming .x-time,
-.x-container.incoming .x-sender
+#Chat:not(.groupchat) .x-container.incoming .x-header
{
- color: #cc0000;
+ color: #cc0000 ! important;
}
.x-container.outgoing .x-time,
diff --git a/pidgin/themes/Makefile.am b/pidgin/themes/Makefile.am
--- a/pidgin/themes/Makefile.am
+++ b/pidgin/themes/Makefile.am
@@ -7,6 +7,8 @@ themeresourcesdir = $(themecontentsdir)/
themeresources_DATA = Contents/Resources/Content.html \
Contents/Resources/Status.html \
Contents/Resources/main.css
+themeresourcesincomingdir = $(themeresourcesdir)/Incoming
+themeresourcesincoming_DATA = Contents/Resources/Incoming/Content.html
themevariantsdir = $(themeresourcesdir)/Variants
themevariants_DATA = Contents/Resources/Variants/Default.css \
Contents/Resources/Variants/No-Timestamps.css
@@ -15,5 +17,6 @@ EXTRA_DIST = \
$(themetemplate_DATA) \
$(themecontents_DATA) \
$(themeresources_DATA) \
+ $(themeresourcesincoming_DATA) \
$(themevariants_DATA)
More information about the Commits
mailing list