summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/options
diff options
context:
space:
mode:
authordantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-21 23:03:14 +0000
committerdantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-21 23:03:14 +0000
commit5aa74cb012c23ee3590016ea9bfe724cdb4b1be1 (patch)
tree30ecad95d3b2298454e49db439cfdbbcc02becd4 /chrome/browser/gtk/options
parent9e608be9416b7efe8e5d29375a09a02a84a304d1 (diff)
downloadchromium_src-5aa74cb012c23ee3590016ea9bfe724cdb4b1be1.zip
chromium_src-5aa74cb012c23ee3590016ea9bfe724cdb4b1be1.tar.gz
chromium_src-5aa74cb012c23ee3590016ea9bfe724cdb4b1be1.tar.bz2
Put Autofill after Themes on Windows and Linux too, to match Mac, in the Customize Sync dialog. (this is because we're shipping Themes first)
BUG=41833 TEST=visual inspection: bring up the Customize Sync dialog. The Themes checkbox should be before the Autofill one. Review URL: http://codereview.chromium.org/1715002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/options')
-rw-r--r--chrome/browser/gtk/options/customize_sync_window_gtk.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/chrome/browser/gtk/options/customize_sync_window_gtk.cc b/chrome/browser/gtk/options/customize_sync_window_gtk.cc
index 04a698f..65f3ff5 100644
--- a/chrome/browser/gtk/options/customize_sync_window_gtk.cc
+++ b/chrome/browser/gtk/options/customize_sync_window_gtk.cc
@@ -59,10 +59,10 @@ class CustomizeSyncWindowGtk {
Profile* profile_;
GtkWidget* description_label_;
- GtkWidget* autofill_check_box_;
GtkWidget* bookmarks_check_box_;
GtkWidget* preferences_check_box_;
GtkWidget* themes_check_box_;
+ GtkWidget* autofill_check_box_;
// Helper object to manage accessibility metadata.
scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_;
@@ -79,10 +79,10 @@ static CustomizeSyncWindowGtk* customize_sync_window = NULL;
CustomizeSyncWindowGtk::CustomizeSyncWindowGtk(Profile* profile)
: profile_(profile),
description_label_(NULL),
- autofill_check_box_(NULL),
bookmarks_check_box_(NULL),
preferences_check_box_(NULL),
- themes_check_box_(NULL) {
+ themes_check_box_(NULL),
+ autofill_check_box_(NULL) {
syncable::ModelTypeSet registered_types;
profile_->GetProfileSyncService()->GetRegisteredDataTypes(&registered_types);
syncable::ModelTypeSet preferred_types;
@@ -130,18 +130,18 @@ CustomizeSyncWindowGtk::CustomizeSyncWindowGtk(Profile* profile)
prefs_checked);
}
- if (registered_types.count(syncable::AUTOFILL)) {
- bool autofill_checked = preferred_types.count(syncable::AUTOFILL) != 0;
- autofill_check_box_ = AddCheckbox(vbox, IDS_SYNC_DATATYPE_AUTOFILL,
- autofill_checked);
- }
-
if (registered_types.count(syncable::THEMES)) {
bool themes_checked = preferred_types.count(syncable::THEMES) != 0;
themes_check_box_ = AddCheckbox(vbox, IDS_SYNC_DATATYPE_THEMES,
themes_checked);
}
+ if (registered_types.count(syncable::AUTOFILL)) {
+ bool autofill_checked = preferred_types.count(syncable::AUTOFILL) != 0;
+ autofill_check_box_ = AddCheckbox(vbox, IDS_SYNC_DATATYPE_AUTOFILL,
+ autofill_checked);
+ }
+
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_)->vbox), vbox, FALSE, FALSE, 0);
gtk_widget_realize(dialog_);
@@ -171,10 +171,10 @@ bool CustomizeSyncWindowGtk::ClickOk() {
(preferences_check_box_ &&
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
preferences_check_box_))) ||
- (autofill_check_box_ &&
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(autofill_check_box_))) ||
(themes_check_box_ &&
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(themes_check_box_)))) {
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(themes_check_box_))) ||
+ (autofill_check_box_ &&
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(autofill_check_box_)))) {
Accept();
gtk_widget_destroy(GTK_WIDGET(dialog_));
return true;
@@ -225,13 +225,6 @@ bool CustomizeSyncWindowGtk::Accept() {
preferred_types.insert(syncable::PREFERENCES);
}
}
- if (autofill_check_box_) {
- bool autofill_enabled = gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(autofill_check_box_));
- if (autofill_enabled) {
- preferred_types.insert(syncable::AUTOFILL);
- }
- }
if (themes_check_box_) {
bool themes_enabled = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(themes_check_box_));
@@ -239,6 +232,13 @@ bool CustomizeSyncWindowGtk::Accept() {
preferred_types.insert(syncable::THEMES);
}
}
+ if (autofill_check_box_) {
+ bool autofill_enabled = gtk_toggle_button_get_active(
+ GTK_TOGGLE_BUTTON(autofill_check_box_));
+ if (autofill_enabled) {
+ preferred_types.insert(syncable::AUTOFILL);
+ }
+ }
profile_->GetProfileSyncService()->ChangePreferredDataTypes(preferred_types);
return true;
@@ -269,10 +269,10 @@ void CustomizeSyncWindowGtk::OnCheckboxClicked(GtkWidget* widget) {
(preferences_check_box_ &&
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
preferences_check_box_))) ||
- (autofill_check_box_ &&
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(autofill_check_box_))) ||
(themes_check_box_ &&
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(themes_check_box_)));
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(themes_check_box_))) ||
+ (autofill_check_box_ &&
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(autofill_check_box_)));
if (any_datatypes_selected) {
gtk_dialog_set_response_sensitive(
GTK_DIALOG(customize_sync_window->dialog_), GTK_RESPONSE_OK, TRUE);