| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/options/content_page_gtk.h" | 5 #include "chrome/browser/gtk/options/content_page_gtk.h" |
| 6 | 6 |
| 7 #include "app/gfx/gtk_util.h" | 7 #include "app/gfx/gtk_util.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 514 |
| 515 if (page->sync_service_->HasSyncSetupCompleted()) { | 515 if (page->sync_service_->HasSyncSetupCompleted()) { |
| 516 GtkWidget* dialog = gtk_message_dialog_new( | 516 GtkWidget* dialog = gtk_message_dialog_new( |
| 517 GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(widget))), | 517 GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(widget))), |
| 518 static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL), | 518 static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL), |
| 519 GTK_MESSAGE_WARNING, | 519 GTK_MESSAGE_WARNING, |
| 520 GTK_BUTTONS_NONE, | 520 GTK_BUTTONS_NONE, |
| 521 "%s", | 521 "%s", |
| 522 l10n_util::GetStringUTF8( | 522 l10n_util::GetStringUTF8( |
| 523 IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL).c_str()); | 523 IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL).c_str()); |
| 524 gtk_util::ApplyMessageDialogQuirks(dialog); |
| 524 gtk_window_set_title(GTK_WINDOW(dialog), | 525 gtk_window_set_title(GTK_WINDOW(dialog), |
| 525 l10n_util::GetStringUTF8( | 526 l10n_util::GetStringUTF8( |
| 526 IDS_SYNC_STOP_SYNCING_BUTTON_LABEL).c_str()); | 527 IDS_SYNC_STOP_SYNCING_BUTTON_LABEL).c_str()); |
| 527 gtk_dialog_add_buttons( | 528 gtk_dialog_add_buttons( |
| 528 GTK_DIALOG(dialog), | 529 GTK_DIALOG(dialog), |
| 529 l10n_util::GetStringUTF8( | 530 l10n_util::GetStringUTF8( |
| 530 IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL).c_str(), | 531 IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL).c_str(), |
| 531 GTK_RESPONSE_ACCEPT, | 532 GTK_RESPONSE_ACCEPT, |
| 532 l10n_util::GetStringUTF8(IDS_CANCEL).c_str(), | 533 l10n_util::GetStringUTF8(IDS_CANCEL).c_str(), |
| 533 GTK_RESPONSE_REJECT, | 534 GTK_RESPONSE_REJECT, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 553 | 554 |
| 554 // static | 555 // static |
| 555 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response, | 556 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response, |
| 556 ContentPageGtk* page) { | 557 ContentPageGtk* page) { |
| 557 if (response == GTK_RESPONSE_ACCEPT) { | 558 if (response == GTK_RESPONSE_ACCEPT) { |
| 558 page->sync_service_->DisableForUser(); | 559 page->sync_service_->DisableForUser(); |
| 559 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 560 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); |
| 560 } | 561 } |
| 561 gtk_widget_destroy(widget); | 562 gtk_widget_destroy(widget); |
| 562 } | 563 } |
| OLD | NEW |