From: Murray Cumming Date: Tue, 15 May 2007 14:39:42 +0000 (+0000) Subject: 2007-05-15 Murray Cumming X-Git-Tag: git_migration_finished~3596 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=d6219f47a85b469e518258989948c47a8cf29090 2007-05-15 Murray Cumming * 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. pmo-trunk-r1877 --- diff --git a/ChangeLog2 b/ChangeLog2 index 4a0dd05..a62a19e 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,12 @@ 2007-05-15 Murray Cumming + * 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 + * 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. diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index 0eed3e9..921bccc 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -54,9 +54,11 @@ static void 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 @@ -114,7 +116,7 @@ modest_platform_init (void) 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;