2007-05-15 Murray Cumming <murrayc@murrayc.com>
+ * src/maemo/modest-platform.c:
+ (on_modest_conf_update_interval_changed), (modest_platform_init):
+ Only respond to this particular key change. All these strcmp()s cannot be
+ efficient.
+
+2007-05-15 Murray Cumming <murrayc@murrayc.com>
+
* src/maemo/modest-maemo-global-settings-dialog.c:
(current_connection): Prevent a crash in scratchbox when
ny_maemo_conic_device_get_current_iap_id() returns NULL.
on_modest_conf_update_interval_changed (ModestConf* self, const gchar *key,
ModestConfEvent event, gpointer user_data)
{
- const guint update_interval_minutes =
- modest_conf_get_int (self, MODEST_CONF_UPDATE_INTERVAL, NULL);
- modest_platform_set_update_interval (update_interval_minutes);
+ if (strcmp (key, MODEST_CONF_UPDATE_INTERVAL) == 0) {
+ const guint update_interval_minutes =
+ modest_conf_get_int (self, MODEST_CONF_UPDATE_INTERVAL, NULL);
+ modest_platform_set_update_interval (update_interval_minutes);
+ }
}
gboolean
NULL);
/* Get the initial update interval from gconf: */
- on_modest_conf_update_interval_changed(conf, NULL,
+ on_modest_conf_update_interval_changed(conf, MODEST_CONF_UPDATE_INTERVAL,
MODEST_CONF_EVENT_KEY_CHANGED, NULL);
return TRUE;