2007-05-15 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Tue, 15 May 2007 14:39:42 +0000 (14:39 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Tue, 15 May 2007 14:39:42 +0000 (14:39 +0000)
* 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

ChangeLog2
src/maemo/modest-platform.c

index 4a0dd05..a62a19e 100644 (file)
@@ -1,5 +1,12 @@
 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.
index 0eed3e9..921bccc 100644 (file)
@@ -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;