[Xfce4-commits] <postler:master> Add a timeout that checks for new mail every 10 minutes

Christian Dywan noreply at xfce.org
Tue Nov 9 23:52:01 CET 2010


Updating branch refs/heads/master
         to d28c9f93db1c44ceab73fbf741c7ef5ce7f2b1b7 (commit)
       from f52e193da354eae00880e24dfab7d2f694051775 (commit)

commit d28c9f93db1c44ceab73fbf741c7ef5ce7f2b1b7
Author: Allen Lowe <lallenlowe at gmail.com>
Date:   Mon Nov 8 21:40:13 2010 -0700

    Add a timeout that checks for new mail every 10 minutes
    
    Fixes: https://bugs.launchpad.net/postler/+bug/671582

 postler/postler-bureau.vala |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 0463dbc..29aa660 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -23,6 +23,9 @@ public class Postler.Bureau : Gtk.Window {
     public Postler.Messages messages;
     Postler.Content content;
 
+    private int interval = 600; /* 10 minutes */
+
+
     const string ui_markup = """
         <ui>
             <menubar>
@@ -84,6 +87,11 @@ public class Postler.Bureau : Gtk.Window {
         </ui>
     """;
 
+    private bool new_message_timer () {
+        accounts.receive ();
+        return true;
+    }
+
     void action_mail_receive () {
         accounts.receive ();
     }
@@ -390,6 +398,8 @@ 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);



More information about the Xfce4-commits mailing list