Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: chrome/browser/gtk/options/content_page_gtk.cc

Issue 425016: Linux: Create app modal dialogs in a different way to work around a KDE 3 win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: with missing files Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/options/advanced_page_gtk.cc ('k') | chrome/browser/gtk/options/passwords_page_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698