[Xfce4-commits] <postler:master> Check mail in the service regardless of main window

Christian Dywan noreply at xfce.org
Sat Feb 12 03:34:03 CET 2011


Updating branch refs/heads/master
         to 3ea2fa5b7a190d76eaf61efb7ffd94730ce82309 (commit)
       from 5f1a2c3da0324d25133cfecdbc0f83ad072c09d0 (commit)

commit 3ea2fa5b7a190d76eaf61efb7ffd94730ce82309
Author: Sergio Spinatelli <spinatelli.sergio at gmail.com>
Date:   Sat Feb 12 02:05:15 2011 +0100

    Check mail in the service regardless of main window
    
    The check is only used with the messaging indicator.
    
    Fixes: https://bugs.launchpad.net/postler/+bug/717465

 postler/postler-bureau.vala  |    9 ---------
 postler/postler-service.vala |    7 +++++++
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 5870a83..67fbfab 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -27,8 +27,6 @@ public class Postler.Bureau : Gtk.Window {
     public Postler.Messages messages;
     Postler.Content content;
 
-    private int interval = 600; /* 10 minutes */
-
 
     const string ui_markup = """
         <ui>
@@ -95,11 +93,6 @@ public class Postler.Bureau : Gtk.Window {
         </ui>
     """;
 
-    private bool new_message_timer () {
-        client.receive ();
-        return true;
-    }
-
     void action_mail_receive () {
         client.receive ();
     }
@@ -503,8 +496,6 @@ public class Postler.Bureau : Gtk.Window {
         GLib.Object (icon_name: STOCK_INTERNET_MAIL,
                      title: GLib.Environment.get_application_name ());
 
-        GLib.Timeout.add_seconds (interval, new_message_timer);
-
         var screen = get_screen ();
         Gdk.Rectangle monitor;
         screen.get_monitor_geometry (0, out monitor);
diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index 71496d0..cd2217d 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -90,6 +90,7 @@ namespace Postler {
         int unread = 0;
         string folder = "";
 #if HAVE_INDICATE
+        int interval = 600; /* 10 minutes */
         Indicate.Server indicator;
         List<Indicate.Indicator> items;
 
@@ -135,7 +136,13 @@ namespace Postler {
             update_inbox_indicator (item);
         }
 
+        bool new_message_timer () {
+            receive ("");
+            return true;
+        }
+
         public PostlerService () {
+            GLib.Timeout.add_seconds (interval, new_message_timer);
             indicator = Indicate.Server.ref_default ();
             indicator.set_type ("message.email");
             indicator.set_desktop_file (



More information about the Xfce4-commits mailing list