summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
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/views
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/views')
-rwxr-xr-xchrome/browser/views/options/customize_sync_window_view.cc41
-rwxr-xr-xchrome/browser/views/options/customize_sync_window_view.h2
2 files changed, 22 insertions, 21 deletions
diff --git a/chrome/browser/views/options/customize_sync_window_view.cc b/chrome/browser/views/options/customize_sync_window_view.cc
index 602fec1..a4e3b5c 100755
--- a/chrome/browser/views/options/customize_sync_window_view.cc
+++ b/chrome/browser/views/options/customize_sync_window_view.cc
@@ -29,8 +29,8 @@ CustomizeSyncWindowView::CustomizeSyncWindowView(Profile* profile)
description_label_(NULL),
bookmarks_check_box_(NULL),
preferences_check_box_(NULL),
- autofill_check_box_(NULL),
- themes_check_box_(NULL) {
+ themes_check_box_(NULL),
+ autofill_check_box_(NULL) {
DCHECK(profile);
Init();
}
@@ -102,6 +102,16 @@ void CustomizeSyncWindowView::Layout() {
last_view = preferences_check_box_;
}
+ if (themes_check_box_) {
+ sz = themes_check_box_->GetPreferredSize();
+ themes_check_box_->SetBounds(2 * kPanelHorizMargin,
+ last_view->y() +
+ last_view->height() +
+ kRelatedControlVerticalSpacing,
+ sz.width(), sz.height());
+ last_view = themes_check_box_;
+ }
+
if (autofill_check_box_) {
sz = autofill_check_box_->GetPreferredSize();
autofill_check_box_->SetBounds(2 * kPanelHorizMargin,
@@ -112,15 +122,6 @@ void CustomizeSyncWindowView::Layout() {
last_view = autofill_check_box_;
}
- if (themes_check_box_) {
- sz = themes_check_box_->GetPreferredSize();
- themes_check_box_->SetBounds(2 * kPanelHorizMargin,
- last_view->y() +
- last_view->height() +
- kRelatedControlVerticalSpacing,
- sz.width(), sz.height());
- last_view = themes_check_box_;
- }
}
gfx::Size CustomizeSyncWindowView::GetPreferredSize() {
@@ -147,12 +148,12 @@ bool CustomizeSyncWindowView::Accept() {
if (preferences_check_box_ && preferences_check_box_->checked()) {
desired_types.insert(syncable::PREFERENCES);
}
- if (autofill_check_box_ && autofill_check_box_->checked()) {
- desired_types.insert(syncable::AUTOFILL);
- }
if (themes_check_box_ && themes_check_box_->checked()) {
desired_types.insert(syncable::THEMES);
}
+ if (autofill_check_box_ && autofill_check_box_->checked()) {
+ desired_types.insert(syncable::AUTOFILL);
+ }
// You shouldn't be able to accept if you've selected 0 datatypes.
DCHECK(!desired_types.empty());
@@ -248,15 +249,15 @@ void CustomizeSyncWindowView::Init() {
l10n_util::GetString(IDS_SYNC_DATATYPE_PREFERENCES), prefs_checked);
}
- if (registered_types.count(syncable::AUTOFILL)) {
- bool autofill_checked = preferred_types.count(syncable::AUTOFILL) != 0;
- autofill_check_box_ = AddCheckbox(
- l10n_util::GetString(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(
l10n_util::GetString(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(
+ l10n_util::GetString(IDS_SYNC_DATATYPE_AUTOFILL), autofill_checked);
+ }
}
diff --git a/chrome/browser/views/options/customize_sync_window_view.h b/chrome/browser/views/options/customize_sync_window_view.h
index ef51c14..0179427 100755
--- a/chrome/browser/views/options/customize_sync_window_view.h
+++ b/chrome/browser/views/options/customize_sync_window_view.h
@@ -74,8 +74,8 @@ class CustomizeSyncWindowView : public views::View,
views::Label* description_label_;
views::Checkbox* bookmarks_check_box_;
views::Checkbox* preferences_check_box_;
- views::Checkbox* autofill_check_box_;
views::Checkbox* themes_check_box_;
+ views::Checkbox* autofill_check_box_;
Profile* profile_;