| Index: chrome/browser/gtk/options/content_page_gtk.cc
|
| diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc
|
| index 6307f15ea675f20fe4a410708c79c8ef7b5c05d9..31e006c95ce4ac7a1df2d1271d154f21c5996825 100644
|
| --- a/chrome/browser/gtk/options/content_page_gtk.cc
|
| +++ b/chrome/browser/gtk/options/content_page_gtk.cc
|
| @@ -114,8 +114,6 @@ ContentPageGtk::ContentPageGtk(Profile* profile)
|
| // Add preferences observers.
|
| ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled,
|
| profile->GetPrefs(), this);
|
| - enable_form_autofill_.Init(prefs::kAutoFillEnabled,
|
| - profile->GetPrefs(), this);
|
|
|
| if (browser_defaults::kCanToggleSystemTitleBar) {
|
| use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame,
|
| @@ -163,17 +161,6 @@ void ContentPageGtk::NotifyPrefChanged(const std::wstring* pref_name) {
|
| GTK_TOGGLE_BUTTON(passwords_neversave_radio_), TRUE);
|
| }
|
| }
|
| - if (!pref_name || *pref_name == prefs::kAutoFillEnabled) {
|
| - if (enable_form_autofill_.GetValue()) {
|
| - gtk_toggle_button_set_active(
|
| - GTK_TOGGLE_BUTTON(form_autofill_enable_radio_), TRUE);
|
| - gtk_widget_set_sensitive(autofill_button_, TRUE);
|
| - } else {
|
| - gtk_toggle_button_set_active(
|
| - GTK_TOGGLE_BUTTON(form_autofill_disable_radio_), TRUE);
|
| - gtk_widget_set_sensitive(autofill_button_, FALSE);
|
| - }
|
| - }
|
| if (browser_defaults::kCanToggleSystemTitleBar &&
|
| (!pref_name || *pref_name == prefs::kUseCustomChromeFrame)) {
|
| if (use_custom_chrome_frame_.GetValue()) {
|
| @@ -248,35 +235,16 @@ GtkWidget* ContentPageGtk::InitPasswordSavingGroup() {
|
| GtkWidget* ContentPageGtk::InitFormAutoFillGroup() {
|
| GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
|
|
|
| - // Enable radio button.
|
| - form_autofill_enable_radio_ = gtk_radio_button_new_with_label(NULL,
|
| - l10n_util::GetStringUTF8(IDS_OPTIONS_AUTOFILL_ENABLE).c_str());
|
| - g_signal_connect(G_OBJECT(form_autofill_enable_radio_), "toggled",
|
| - G_CALLBACK(OnAutoFillRadioToggledThunk), this);
|
| - gtk_box_pack_start(GTK_BOX(vbox), form_autofill_enable_radio_, FALSE,
|
| - FALSE, 0);
|
| -
|
| - // Disable radio button.
|
| - form_autofill_disable_radio_ = gtk_radio_button_new_with_label_from_widget(
|
| - GTK_RADIO_BUTTON(form_autofill_enable_radio_),
|
| - l10n_util::GetStringUTF8(IDS_OPTIONS_AUTOFILL_DISABLE).c_str());
|
| - g_signal_connect(G_OBJECT(form_autofill_disable_radio_), "toggled",
|
| - G_CALLBACK(OnAutoFillRadioToggledThunk), this);
|
| - gtk_box_pack_start(GTK_BOX(vbox), form_autofill_disable_radio_, FALSE,
|
| - FALSE, 0);
|
| -
|
| GtkWidget* button_hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing);
|
| gtk_container_add(GTK_CONTAINER(vbox), button_hbox);
|
|
|
| // AutoFill button.
|
| - autofill_button_ = gtk_button_new_with_label(
|
| + GtkWidget* autofill_button = gtk_button_new_with_label(
|
| l10n_util::GetStringUTF8(IDS_AUTOFILL_OPTIONS).c_str());
|
| - if (!profile()->GetPrefs()->GetBoolean(prefs::kAutoFillEnabled))
|
| - gtk_widget_set_sensitive(autofill_button_, FALSE);
|
|
|
| - g_signal_connect(G_OBJECT(autofill_button_), "clicked",
|
| + g_signal_connect(G_OBJECT(autofill_button), "clicked",
|
| G_CALLBACK(OnAutoFillButtonClickedThunk), this);
|
| - gtk_box_pack_start(GTK_BOX(button_hbox), autofill_button_, FALSE, FALSE, 0);
|
| + gtk_box_pack_start(GTK_BOX(button_hbox), autofill_button, FALSE, FALSE, 0);
|
|
|
| return vbox;
|
| }
|
| @@ -539,30 +507,6 @@ void ContentPageGtk::OnPasswordRadioToggled(GtkWidget* widget) {
|
| ask_to_save_passwords_.SetValue(enabled);
|
| }
|
|
|
| -void ContentPageGtk::OnAutoFillRadioToggled(GtkWidget* widget) {
|
| - if (initializing_)
|
| - return;
|
| -
|
| - // We get two signals when selecting a radio button, one for the old radio
|
| - // being toggled off and one for the new one being toggled on. Ignore the
|
| - // signal for the toggling off the old button.
|
| - if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
|
| - return;
|
| -
|
| - bool enabled = gtk_toggle_button_get_active(
|
| - GTK_TOGGLE_BUTTON(form_autofill_enable_radio_));
|
| - if (enabled) {
|
| - UserMetricsRecordAction(UserMetricsAction("Options_FormAutofill_Enable"),
|
| - profile()->GetPrefs());
|
| - gtk_widget_set_sensitive(autofill_button_, TRUE);
|
| - } else {
|
| - UserMetricsRecordAction(UserMetricsAction("Options_FormAutofill_Disable"),
|
| - profile()->GetPrefs());
|
| - gtk_widget_set_sensitive(autofill_button_, FALSE);
|
| - }
|
| - enable_form_autofill_.SetValue(enabled);
|
| -}
|
| -
|
| void ContentPageGtk::OnSyncStartStopButtonClicked(GtkWidget* widget) {
|
| DCHECK(sync_service_);
|
|
|
|
|