+2007-07-25 Murray Cumming <murrayc@murrayc.com>
+
+ (modest_platform_set_update_interval): Set the alarm recurrence
+ fields so that auto-update does not just happen the first time.
+ This should have fixed projects.maemo.org bug NB#63938.
+
+ When this happens you can see a printf when the D-Bus method is
+ called:
+ GLIB DEBUG default - debug: modest_dbus_req_handler: method received: SendReceive
+
+ However, I do not actually seem to get new POP messages even when
+ clicking the refresh button manually. A restart gets them.
+ This might be a problem in today's tinymail only.
+
2007-07-24 Murray Cumming <murrayc@murrayc.com>
* src/maemo/modest-maemo-global-settings-dialog.c:
priv = MODEST_MAEMO_GLOBAL_SETTINGS_DIALOG_GET_PRIVATE (obj);
ppriv = MODEST_GLOBAL_SETTINGS_DIALOG_GET_PRIVATE (obj);
- if (priv->switch_handler) {
+ if (priv->switch_handler && ppriv->notebook) {
+ /* TODO: This causes a g_warning:
+ modest[13409]: GLIB WARNING ** GLib-GObject - invalid unclassed pointer in cast to `GObject'
+ modest[13409]: GLIB WARNING ** GLib-GObject - instance with invalid (NULL) class pointer
+ modest[13409]: GLIB CRITICAL ** GLib-GObject - g_signal_handler_disconnect: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
+ */
g_signal_handler_disconnect (G_OBJECT (ppriv->notebook), priv->switch_handler);
priv->switch_handler = 0;
}
/* Register alarm: */
- /* Get current time: */
- time_t time_now;
- time (&time_now);
- struct tm *st_time = localtime (&time_now);
-
- /* Add minutes to tm_min field: */
- st_time->tm_min += minutes;
-
- /* Set the time in alarm_event_t structure: */
+ /* Set the interval in alarm_event_t structure: */
alarm_event_t *event = g_new0(alarm_event_t, 1);
- event->alarm_time = mktime (st_time);
+ event->alarm_time = minutes * 60; /* seconds */
+
+ /* Set recurrence every few minutes: */
+ event->recurrence = minutes;
+ event->recurrence_count = -1; /* Means infinite */
/* Specify what should happen when the alarm happens:
* It should call this D-Bus method: */