- modest_conf_set_string (conf, key, str->str, NULL);
+ if ((str->str == NULL) || (strlen(str->str) == 0)) {
+ /* TODO: Find out why this happens sometimes. */
+ g_warning ("DEBUG: %s: Attempting to write an empty value to "
+ "gconf key %s. Preventing.", __FUNCTION__, key);
+ }
+ else
+ modest_conf_set_string (conf, key, str->str, NULL);
+
+ /* store current sort column for compact view */
+ if (sort_colid >= 0) {
+ sort_value = g_strdup_printf("%d:%d:%d", sort_colid, sort_type, sort_flag_id);
+ modest_conf_set_string (conf, sort_key, sort_value, NULL);
+ g_free (sort_value);
+ }
+