org.guifications.gf2: a2f27c3f47efff0c5fdf50ad752d521bbde96088
grim at guifications.org
grim at guifications.org
Wed Mar 26 21:55:06 CDT 2008
-----------------------------------------------------------------
Revision: a2f27c3f47efff0c5fdf50ad752d521bbde96088
Ancestor: 976ff54433d93cd1217c2326f700c1c446d83b59
Author: grim at guifications.org
Date: 2008-03-27T02:53:05
Branch: org.guifications.gf2
Modified files:
ChangeLog src/gf_event.c themes/default/theme.xml
ChangeLog:
Added a new notification for multiple new emails, this has not been tested!!
Someone who has email setup, needs to test this before release please.
-----------------------------------------------------------------
This revision's diffstat output:
ChangeLog | 1 +
src/gf_event.c | 18 ++++++++++++++++--
themes/default/theme.xml | 18 ++++++++++++++++++
3 files changed, 35 insertions(+), 2 deletions(-)
-------------- next part --------------
============================================================
--- ChangeLog 3fb8fc6936d4532f6c7b6f85883a49b757af02ab
+++ ChangeLog 9a7bf33bd733b7a5c6eadda0e4ae1e503df68119
@@ -1,8 +1,9 @@ Version 2.17 ;
Version 2.17 ;
* Made the nick-said notification not fire if your nick is in another word.
For example, if my nick is grim, it will not fire when someone says
grimmy.
* Memory leak fixes
+ * Added a new notification "new-emails" for handling multiple new emails.
Version 2.16 12/16/07:
* Really fixed the G_GNUC_NULL_TERMINATED errors on non-Windows platforms.
============================================================
--- src/gf_event.c 29afd52c19c951f7fa7acffcd4ab55db809c9d26
+++ src/gf_event.c af3cfaa025fc47c40b5d9e309b37568b2194ae9e
@@ -615,8 +615,18 @@ gf_event_emails(PurpleConnection *gc, si
const char **subject, const char **from,
const char **to, const char **url)
{
- if (count == 1 && subject && *subject)
- return gf_event_email(gc, *subject, *from, *to, *url);
+ if(count == 1) {
+ if(subject && *subject) {
+ return gf_event_email(gc, *subject, *from, *to, *url);
+ }
+ } else {
+ gchar *c = g_strdup_printf("%d", (gint)count);
+
+ gf_event_common("new-emails", gc->account, NULL, NULL, *to, NULL,
+ PURPLE_CBFLAGS_NONE, NULL, c);
+ g_free(c);
+ }
+
return real_notify_emails(gc, count, detailed, subject, from, to, url);
}
@@ -720,6 +730,10 @@ gf_events_init(PurplePlugin *plugin) {
gf_event_new("new-email", TOKENS_DEFAULT "c", _("Email"),
_("Displayed when you receive new email."),
GF_EVENT_PRIORITY_NORMAL);
+
+ gf_event_new("new-emails", TOKENS_DEFAULT "c", _("Emails"),
+ _("Displaed when you receive multiple new emails."),
+ GF_EVENT_PRIORITY_NORMAL);
gf_event_new(GF_NOTIFICATION_MASTER, TOKENS_DEFAULT "Ccnr",
_("Master"), _("Master notification for the theme editor."),
============================================================
--- themes/default/theme.xml 97aca059ef491099f92a60f5c3ae17ebc523cf12
+++ themes/default/theme.xml 37df6d711d35aa224e3f729ae3d2e03b118c116e
@@ -357,5 +357,23 @@
<text format='%c (%a).' clipping='ellipsis-middle' width='0' />
</item>
</notification>
+ <notification type='new-emails' background='background.png'>
+ <item type='icon'>
+ <position value='south-west' />
+ <h_offset value='5' />
+ <v_offset value='-5' />
+ <icon type='protocol' size='little' />
+ </item>
+ <item type='text'>
+ <position value='center' />
+ <v_offset value='-25%' />
+ <text format='%t has' clipping='ellipsis-middle' width='0' />
+ </item>
+ <item type='text'>
+ <position value='center' />
+ <v_offset value='-13%' />
+ <text format='%x new emails.' clipping='ellipsis-middle' width='0' />
+ </item>
+ </notification>
</theme>
</guifications>
More information about the Plugins-commits
mailing list