diff options
author | dantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-13 17:06:26 +0000 |
---|---|---|
committer | dantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-13 17:06:26 +0000 |
commit | f6f940eff9ff7cd676de4e231257113a74b05e72 (patch) | |
tree | 094072d7a0fe09899017bb89e38762a5bff99bf6 /chrome/browser/cocoa/preferences_window_controller.mm | |
parent | c45ce15766d2902f807b63a3926dafd00ce90746 (diff) | |
download | chromium_src-f6f940eff9ff7cd676de4e231257113a74b05e72.zip chromium_src-f6f940eff9ff7cd676de4e231257113a74b05e72.tar.gz chromium_src-f6f940eff9ff7cd676de4e231257113a74b05e72.tar.bz2 |
Remove the option to stop syncing if you're in Chrome OS. Also hide the "Customize" button in case of an error.
BUG=none
TEST=build and run Chrome for Linux. Start syncing. Then build for Chrome OS. Try to stop syncing. Note that you cannot.
Review URL: http://codereview.chromium.org/1578020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/preferences_window_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/preferences_window_controller.mm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm index f2af366..f2fdc37 100644 --- a/chrome/browser/cocoa/preferences_window_controller.mm +++ b/chrome/browser/cocoa/preferences_window_controller.mm @@ -1668,9 +1668,14 @@ const int kDisabledIndex = 1; - (void)syncStateChanged { DCHECK(syncService_); + string16 statusLabel, linkLabel; + sync_ui_util::MessageType status = + sync_ui_util::GetStatusLabels(syncService_, &statusLabel, &linkLabel); + [syncButton_ setEnabled:!syncService_->WizardIsVisible()]; NSString* buttonLabel; - if (syncService_->HasSyncSetupCompleted()) { + if (syncService_->HasSyncSetupCompleted() + && status != sync_ui_util::SYNC_ERROR) { buttonLabel = l10n_util::GetNSStringWithFixup( IDS_SYNC_STOP_SYNCING_BUTTON_LABEL); [syncCustomizeButton_ setHidden:false]; @@ -1685,9 +1690,6 @@ const int kDisabledIndex = 1; } [syncButton_ setTitle:buttonLabel]; - string16 statusLabel, linkLabel; - sync_ui_util::MessageType status = - sync_ui_util::GetStatusLabels(syncService_, &statusLabel, &linkLabel); [syncStatus_ setStringValue:base::SysUTF16ToNSString(statusLabel)]; [syncLink_ setHidden:linkLabel.empty()]; [syncLink_ setTitle:base::SysUTF16ToNSString(linkLabel)]; |