Mercurial > pidgin
changeset 32734:dfcad7368179
Replace the "%status%" variable in themes, though this only supports errors
right now.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 04 Mar 2012 01:34:03 +0000 |
parents | 7cd13ca747fc |
children | 01741f87cc1e |
files | pidgin/gtkconv.c pidgin/themes/Contents/Resources/Status.html |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Sun Mar 04 01:32:16 2012 +0000 +++ b/pidgin/gtkconv.c Sun Mar 04 01:34:03 2012 +0000 @@ -6250,6 +6250,14 @@ } else if (g_str_has_prefix(cur, "%messageDirection%")) { replace = purple_markup_is_rtl(message) ? "rtl" : "ltr"; + } else if (g_str_has_prefix(cur, "%status%")) { + GString *classes = g_string_new(NULL); + + if (flags & PURPLE_MESSAGE_ERROR) + g_string_append(classes, "error "); + + replace = freeval = g_string_free(classes, FALSE); + } else { cur++; continue;
--- a/pidgin/themes/Contents/Resources/Status.html Sun Mar 04 01:32:16 2012 +0000 +++ b/pidgin/themes/Contents/Resources/Status.html Sun Mar 04 01:34:03 2012 +0000 @@ -1,4 +1,4 @@ -<div class="x-status_container %messageClasses% %messageDirection%"> +<div class="x-status_container %messageClasses% %messageDirection% %status%"> <abbr class="x-time" title="%time{yyyy-MM-ddTHH:mm:ssZZ}%">%time%</abbr> <div class="x-message">%message%</div> </div>