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

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

Issue 661327: Fix the content page of the options dialog to use kAutoFillEnabled instead of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months 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
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | chrome/browser/options_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string>
GeorgeY 2010/03/02 01:30:26 Is explicit <string> inclusion needed? I do not se
James Hawkins 2010/03/02 01:31:31 Yes, std::string is used on line 166 w/out the pro
8
7 #include "app/gfx/gtk_util.h" 9 #include "app/gfx/gtk_util.h"
8 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
10 #include "chrome/browser/browser.h" 12 #include "chrome/browser/browser.h"
11 #include "chrome/browser/browser_list.h" 13 #include "chrome/browser/browser_list.h"
12 #include "chrome/browser/browser_window.h" 14 #include "chrome/browser/browser_window.h"
13 #include "chrome/browser/defaults.h" 15 #include "chrome/browser/defaults.h"
14 #include "chrome/browser/gtk/gtk_chrome_link_button.h" 16 #include "chrome/browser/gtk/gtk_chrome_link_button.h"
15 #include "chrome/browser/gtk/gtk_theme_provider.h" 17 #include "chrome/browser/gtk/gtk_theme_provider.h"
16 #include "chrome/browser/gtk/import_dialog_gtk.h" 18 #include "chrome/browser/gtk/import_dialog_gtk.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 l10n_util::GetStringUTF8(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME), 67 l10n_util::GetStringUTF8(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME),
66 InitBrowsingDataGroup(), false); 68 InitBrowsingDataGroup(), false);
67 options_builder.AddOptionGroup( 69 options_builder.AddOptionGroup(
68 l10n_util::GetStringUTF8(IDS_APPEARANCE_GROUP_NAME), 70 l10n_util::GetStringUTF8(IDS_APPEARANCE_GROUP_NAME),
69 InitThemesGroup(), false); 71 InitThemesGroup(), false);
70 page_ = options_builder.get_page_widget(); 72 page_ = options_builder.get_page_widget();
71 73
72 // Add preferences observers. 74 // Add preferences observers.
73 ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled, 75 ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled,
74 profile->GetPrefs(), this); 76 profile->GetPrefs(), this);
75 enable_form_autofill_.Init(prefs::kFormAutofillEnabled, 77 enable_form_autofill_.Init(prefs::kAutoFillEnabled,
76 profile->GetPrefs(), this); 78 profile->GetPrefs(), this);
77 if (browser_defaults::kCanToggleSystemTitleBar) { 79 if (browser_defaults::kCanToggleSystemTitleBar) {
78 use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame, 80 use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame,
79 profile->GetPrefs(), this); 81 profile->GetPrefs(), this);
80 } 82 }
81 83
82 // Load initial values. 84 // Load initial values.
83 NotifyPrefChanged(NULL); 85 NotifyPrefChanged(NULL);
84 86
85 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, 87 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 initializing_ = true; 119 initializing_ = true;
118 if (!pref_name || *pref_name == prefs::kPasswordManagerEnabled) { 120 if (!pref_name || *pref_name == prefs::kPasswordManagerEnabled) {
119 if (ask_to_save_passwords_.GetValue()) { 121 if (ask_to_save_passwords_.GetValue()) {
120 gtk_toggle_button_set_active( 122 gtk_toggle_button_set_active(
121 GTK_TOGGLE_BUTTON(passwords_asktosave_radio_), TRUE); 123 GTK_TOGGLE_BUTTON(passwords_asktosave_radio_), TRUE);
122 } else { 124 } else {
123 gtk_toggle_button_set_active( 125 gtk_toggle_button_set_active(
124 GTK_TOGGLE_BUTTON(passwords_neversave_radio_), TRUE); 126 GTK_TOGGLE_BUTTON(passwords_neversave_radio_), TRUE);
125 } 127 }
126 } 128 }
127 if (!pref_name || *pref_name == prefs::kFormAutofillEnabled) { 129 if (!pref_name || *pref_name == prefs::kAutoFillEnabled) {
128 if (enable_form_autofill_.GetValue()) { 130 if (enable_form_autofill_.GetValue()) {
129 gtk_toggle_button_set_active( 131 gtk_toggle_button_set_active(
130 GTK_TOGGLE_BUTTON(form_autofill_enable_radio_), TRUE); 132 GTK_TOGGLE_BUTTON(form_autofill_enable_radio_), TRUE);
131 } else { 133 } else {
132 gtk_toggle_button_set_active( 134 gtk_toggle_button_set_active(
133 GTK_TOGGLE_BUTTON(form_autofill_disable_radio_), TRUE); 135 GTK_TOGGLE_BUTTON(form_autofill_disable_radio_), TRUE);
134 } 136 }
135 } 137 }
136 if (browser_defaults::kCanToggleSystemTitleBar && 138 if (browser_defaults::kCanToggleSystemTitleBar &&
137 (!pref_name || *pref_name == prefs::kUseCustomChromeFrame)) { 139 (!pref_name || *pref_name == prefs::kUseCustomChromeFrame)) {
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 572
571 // static 573 // static
572 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response, 574 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response,
573 ContentPageGtk* page) { 575 ContentPageGtk* page) {
574 if (response == GTK_RESPONSE_ACCEPT) { 576 if (response == GTK_RESPONSE_ACCEPT) {
575 page->sync_service_->DisableForUser(); 577 page->sync_service_->DisableForUser();
576 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); 578 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
577 } 579 }
578 gtk_widget_destroy(widget); 580 gtk_widget_destroy(widget);
579 } 581 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | chrome/browser/options_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698