From: Murray Cumming Date: Wed, 25 Jul 2007 08:58:32 +0000 (+0000) Subject: 2007-07-25 Murray Cumming X-Git-Tag: git_migration_finished~2755 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=aa9d45d56b19fdee314fc0610d6a510100650f87 2007-07-25 Murray Cumming (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. pmo-trunk-r2788 --- diff --git a/ChangeLog2 b/ChangeLog2 index 054e8cd..4f8afaa 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,3 +1,17 @@ +2007-07-25 Murray Cumming + + (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 * src/maemo/modest-maemo-global-settings-dialog.c: diff --git a/src/maemo/modest-maemo-global-settings-dialog.c b/src/maemo/modest-maemo-global-settings-dialog.c index b44f141..7f3d2ca 100644 --- a/src/maemo/modest-maemo-global-settings-dialog.c +++ b/src/maemo/modest-maemo-global-settings-dialog.c @@ -252,7 +252,12 @@ modest_maemo_global_settings_dialog_finalize (GObject *obj) 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; } diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index 1e25a46..1089275 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -1190,17 +1190,13 @@ gboolean modest_platform_set_update_interval (guint minutes) /* 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: */