#include "widgets/modest-combo-box.h"
#endif
#ifndef MODEST_TOOLKIT_GTK
-#if MODEST_HILDON_API == 0
-#include <hildon-widgets/hildon-number-editor.h>
-#else
#include <hildon/hildon-number-editor.h>
-#endif /*MODEST_HILDON_API = 0*/
#endif
/* include other impl specific header files */
(GInstanceInitFunc) modest_global_settings_dialog_init,
NULL
};
-#ifdef MODEST_TOOLKIT_HILDON2
- my_type = g_type_register_static (HILDON_TYPE_DIALOG,
- "ModestGlobalSettingsDialog",
- &my_info, 0);
-#else
my_type = g_type_register_static (GTK_TYPE_DIALOG,
"ModestGlobalSettingsDialog",
&my_info, 0);
-#endif
}
return my_type;
}
{
gint *id;
- /* Get values from UI */
#ifdef MODEST_TOOLKIT_HILDON2
id = modest_selector_picker_get_active_id (MODEST_SELECTOR_PICKER (priv->connect_via));
state->auto_update = hildon_check_button_get_active (HILDON_CHECK_BUTTON (priv->auto_update));
+ state->notifications = hildon_check_button_get_active (HILDON_CHECK_BUTTON (priv->notifications));
+ state->add_to_contacts = hildon_check_button_get_active (HILDON_CHECK_BUTTON (priv->add_to_contacts));
state->default_account = modest_selector_picker_get_active_id (MODEST_SELECTOR_PICKER (priv->default_account_selector));
#else
id = modest_combo_box_get_active_id (MODEST_COMBO_BOX (priv->connect_via));
+ state->notifications = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->notifications));
+ state->add_to_contacts = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->add_to_contacts));
state->auto_update = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->auto_update));
state->default_account = NULL;
#endif
get_current_settings (priv, ¤t_state);
/* Save configuration */
+ modest_conf_set_bool (conf, MODEST_CONF_NOTIFICATIONS, current_state.notifications, &error);
+ RETURN_FALSE_ON_ERROR(error);
+ modest_conf_set_bool (conf, MODEST_CONF_AUTO_ADD_TO_CONTACTS, current_state.add_to_contacts, &error);
+ RETURN_FALSE_ON_ERROR(error);
modest_conf_set_bool (conf, MODEST_CONF_AUTO_UPDATE, current_state.auto_update, &error);
RETURN_FALSE_ON_ERROR(error);
modest_conf_set_int (conf, MODEST_CONF_UPDATE_WHEN_CONNECTED_BY, current_state.connect_via, NULL);
if (priv->initial_state.auto_update != current_state.auto_update ||
priv->initial_state.connect_via != current_state.connect_via ||
priv->initial_state.update_interval != current_state.update_interval) {
-
+
TnyAccountStore *account_store;
TnyDevice *device;
ModestGlobalSettingsState current_state)
{
if (initial_state.auto_update != current_state.auto_update ||
+ initial_state.notifications != current_state.notifications ||
+ initial_state.add_to_contacts != current_state.add_to_contacts ||
initial_state.connect_via != current_state.connect_via ||
initial_state.update_interval != current_state.update_interval ||
initial_state.size_limit != current_state.size_limit ||