Bug 31216 - Implement stable version of MailNotification
Summary: Implement stable version of MailNotification
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: 0.11
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-10-29 09:32 UTC by Simon McVittie
Modified: 2010-11-03 12:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2010-10-29 09:32:19 UTC
MailNotification is now (on the second attempt) stable. We should implement that.

The next two patches were going to be "use telepathy-glib 0.13.3 for MailNotification" and "delete our codegen for MailNotification", but I haven't done that because of Bug #31215. If this is merged before Bug #31215 is fixed in a release, it would be good to leave this bug open until we can add those two commits.
Comment 1 Nicolas Dufresne 2010-11-02 11:45:06 UTC
+  else
+    {
+      DEBUG ("We no longer care about unread mail");
+    }

You already trace when interest goes to FALSE, why tracing again ?

+  if (!(conn->features & GABBLE_CONNECTION_FEATURES_GOOGLE_MAIL_NOTIFY))
+    {
+      DEBUG ("Not a Google server - no MailNotification here");
+      return;
+    }

This trace does not give information, please remove.

-  return TRUE;
+#define MY_INTERFACE GABBLE_IFACE_CONNECTION_INTERFACE_MAIL_NOTIFICATION
+  g_signal_connect (conn, "clients-interested::" MY_INTERFACE,

Please undef MY_INTERFACE at the end, or don't use it. I'm not a big fan of using defines for such trivial constructions. Maybe you should use "const gchar *self_interface = GABBLE_IFACE_CONNECTION_INTERFACE_MAIL_NOTIFICATION" or similar instead ?
Comment 2 Simon McVittie 2010-11-03 05:25:41 UTC
(In reply to comment #1)
> You already trace when interest goes to FALSE, why tracing again ?

No good reason, really; I was using the vague rule of thumb that if one code path logs, all of them should log. fb61a6c6bc97c79

> This trace does not give information, please remove.

Same commit as above.

> Please undef MY_INTERFACE at the end, or don't use it. I'm not a big fan of
> using defines for such trivial constructions. Maybe you should use "const gchar
> *self_interface = GABBLE_IFACE_CONNECTION_INTERFACE_MAIL_NOTIFICATION" or
> similar instead ?

I'm relying on cpp string concatenation and I don't really want to g_strdup_printf the constant signal names, so, no. d8794e70cee1de4 drops the use of MY_INTERFACE in favour of concatenating the full-length name, at the cost that the lines are a bit over-long.
Comment 3 Nicolas Dufresne 2010-11-03 11:14:15 UTC
All good.
Comment 4 Simon McVittie 2010-11-03 12:42:21 UTC
Fixed in git, will be in 0.11.0 soon. Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.