2007-08-13 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Mon, 13 Aug 2007 12:17:16 +0000 (12:17 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Mon, 13 Aug 2007 12:17:16 +0000 (12:17 +0000)
* src/dbus_api/modest-dbus-callbacks.c: (modest_dbus_req_filter):
Comment out the debug warning about the unexpected D-Bus methods.
They are just annoying now.
* src/maemo/modest-platform.c:
(modest_platform_set_update_interval): Correct the D-Bus path, instead
of using a file path, though it did not seem to break things before.
It might be needed now:
Use the ALARM_EVENT_ACTIVATION flag so that emails are updated even when
modest is not already running. This is the behaviour of the old client, and
Mox says it is what we should do for modest.
This closes projects.maemo.org bug NB#64327.

pmo-trunk-r2965

ChangeLog2
src/dbus_api/modest-dbus-api.h
src/dbus_api/modest-dbus-callbacks.c
src/maemo/modest-platform.c

index 934bd57..4e19246 100644 (file)
@@ -1,3 +1,17 @@
+2007-08-13  Murray Cumming  <murrayc@murrayc.com>
+
+       * src/dbus_api/modest-dbus-callbacks.c: (modest_dbus_req_filter):
+       Comment out the debug warning about the unexpected D-Bus methods. 
+       They are just annoying now.
+       * src/maemo/modest-platform.c:
+       (modest_platform_set_update_interval): Correct the D-Bus path, instead 
+       of using a file path, though it did not seem to break things before. 
+       It might be needed now:
+       Use the ALARM_EVENT_ACTIVATION flag so that emails are updated even when 
+       modest is not already running. This is the behaviour of the old client, and     
+       Mox says it is what we should do for modest.
+       This closes projects.maemo.org bug NB#64327. 
+
 2007-08-04  Johannes Schmid <johannes.schmid@openismus.com>
 
        * src/modest-text-utils.c:
index 3acab78..cacc0d0 100644 (file)
@@ -37,7 +37,7 @@
  * so they are probably a good choice. */
 #define MODEST_DBUS_NAME    "modest"
 #define MODEST_DBUS_SERVICE "com.nokia."MODEST_DBUS_NAME
-#define MODEST_DBUS_OBJECT  "/com/nokia/"MODEST_DBUS_NAME
+#define MODEST_DBUS_OBJECT  "/com/nokia/"MODEST_DBUS_NAME /* Also known as a D-Bus Path. */
 #define MODEST_DBUS_IFACE   "com.nokia."MODEST_DBUS_NAME
 
 
index db002cb..f824b90 100644 (file)
@@ -1436,9 +1436,11 @@ modest_dbus_req_filter (DBusConnection *con,
        }
        else {
                /* Note that this mentions methods that were already handled in modest_dbus_req_handler(). */
+               /* 
                g_debug ("  debug: %s: Unexpected (maybe already handled) D-Bus method:\n   Interface=%s, Member=%s\n", 
                        __FUNCTION__, dbus_message_get_interface (message),
                        dbus_message_get_member(message));
+               */
        }
        
        return (handled ? 
index cc577d1..523f901 100644 (file)
@@ -1198,17 +1198,18 @@ gboolean modest_platform_set_update_interval (guint minutes)
        /* Specify what should happen when the alarm happens:
         * It should call this D-Bus method: */
         
-       /* Note: I am surpised that alarmd can't just use the modest.service file
-        * for this. murrayc. */
-       event->dbus_path = g_strdup(PREFIX "/bin/modest");
-       
+       event->dbus_path = g_strdup(MODEST_DBUS_OBJECT);
        event->dbus_interface = g_strdup (MODEST_DBUS_IFACE);
        event->dbus_service = g_strdup (MODEST_DBUS_SERVICE);
        event->dbus_name = g_strdup (MODEST_DBUS_METHOD_SEND_RECEIVE);
 
-       /* Otherwise, a dialog will be shown if exect_name or dbus_path is NULL,
-       even though we have specified no dialog text: */
-       event->flags = ALARM_EVENT_NO_DIALOG;
+       /* Use ALARM_EVENT_NO_DIALOG: Otherwise, a dialog will be shown if 
+        * exec_name or dbus_path is NULL, even though we have specified no dialog text.
+        * Also use ALARM_EVENT_ACTIVATION so that modest is started (without UI) to get emails 
+        * This is why we want to use the Alarm API instead of just g_timeout_add().
+        * (The old maemo email-client did this, though it isn't specified in the UI spec.)
+         */
+       event->flags = ALARM_EVENT_NO_DIALOG | ALARM_EVENT_ACTIVATION;
        
        alarm_cookie = alarm_event_add (event);