OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/gtk/options/content_page_gtk.h" | 5 #include "chrome/browser/ui/gtk/options/content_page_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 void ContentPageGtk::OnSyncStartStopButtonClicked(GtkWidget* widget) { | 560 void ContentPageGtk::OnSyncStartStopButtonClicked(GtkWidget* widget) { |
561 DCHECK(sync_service_ && !sync_service_->IsManaged()); | 561 DCHECK(sync_service_ && !sync_service_->IsManaged()); |
562 | 562 |
563 if (sync_service_->HasSyncSetupCompleted()) { | 563 if (sync_service_->HasSyncSetupCompleted()) { |
564 GtkWidget* dialog = gtk_message_dialog_new( | 564 GtkWidget* dialog = gtk_message_dialog_new( |
565 GTK_WINDOW(gtk_widget_get_toplevel(widget)), | 565 GTK_WINDOW(gtk_widget_get_toplevel(widget)), |
566 static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL), | 566 static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL), |
567 GTK_MESSAGE_WARNING, | 567 GTK_MESSAGE_WARNING, |
568 GTK_BUTTONS_NONE, | 568 GTK_BUTTONS_NONE, |
569 "%s", | 569 "%s", |
570 l10n_util::GetStringFUTF8( | 570 l10n_util::GetStringUTF8( |
571 IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL, | 571 IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL).c_str()); |
572 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)).c_str()); | |
573 gtk_util::ApplyMessageDialogQuirks(dialog); | 572 gtk_util::ApplyMessageDialogQuirks(dialog); |
574 gtk_window_set_title(GTK_WINDOW(dialog), | 573 gtk_window_set_title(GTK_WINDOW(dialog), |
575 l10n_util::GetStringUTF8( | 574 l10n_util::GetStringUTF8( |
576 IDS_SYNC_STOP_SYNCING_DIALOG_TITLE).c_str()); | 575 IDS_SYNC_STOP_SYNCING_DIALOG_TITLE).c_str()); |
577 gtk_dialog_add_buttons( | 576 gtk_dialog_add_buttons( |
578 GTK_DIALOG(dialog), | 577 GTK_DIALOG(dialog), |
579 l10n_util::GetStringUTF8(IDS_CANCEL).c_str(), | 578 l10n_util::GetStringUTF8(IDS_CANCEL).c_str(), |
580 GTK_RESPONSE_REJECT, | 579 GTK_RESPONSE_REJECT, |
581 l10n_util::GetStringUTF8( | 580 l10n_util::GetStringUTF8( |
582 IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL).c_str(), | 581 IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL).c_str(), |
(...skipping 27 matching lines...) Expand all Loading... |
610 if (response == GTK_RESPONSE_ACCEPT) { | 609 if (response == GTK_RESPONSE_ACCEPT) { |
611 sync_service_->DisableForUser(); | 610 sync_service_->DisableForUser(); |
612 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 611 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); |
613 } | 612 } |
614 gtk_widget_destroy(widget); | 613 gtk_widget_destroy(widget); |
615 } | 614 } |
616 | 615 |
617 void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) { | 616 void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) { |
618 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); | 617 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); |
619 } | 618 } |
OLD | NEW |