OLD | NEW |
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> | 7 #include <string> |
8 | 8 |
9 #include "app/gtk_util.h" | 9 #include "app/gtk_util.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 197 matching lines...) Loading... |
208 bool is_classic_theme = !is_gtk_theme && provider->GetThemeID().empty(); | 208 bool is_classic_theme = !is_gtk_theme && provider->GetThemeID().empty(); |
209 gtk_widget_set_sensitive(themes_reset_button_, !is_classic_theme); | 209 gtk_widget_set_sensitive(themes_reset_button_, !is_classic_theme); |
210 } | 210 } |
211 | 211 |
212 void ContentPageGtk::OnPersonalDataLoaded() { | 212 void ContentPageGtk::OnPersonalDataLoaded() { |
213 DCHECK(personal_data_); | 213 DCHECK(personal_data_); |
214 // We might have been alerted that the PersonalDataManager has loaded, so | 214 // We might have been alerted that the PersonalDataManager has loaded, so |
215 // remove ourselves as observer. | 215 // remove ourselves as observer. |
216 personal_data_->RemoveObserver(this); | 216 personal_data_->RemoveObserver(this); |
217 | 217 |
218 ShowAutoFillDialog(NULL, personal_data_, profile(), NULL, NULL); | 218 ShowAutoFillDialog(NULL, personal_data_, profile()); |
219 } | 219 } |
220 | 220 |
221 GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { | 221 GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { |
222 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 222 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
223 | 223 |
224 // Ask to save radio button. | 224 // Ask to save radio button. |
225 passwords_asktosave_radio_ = gtk_radio_button_new_with_label(NULL, | 225 passwords_asktosave_radio_ = gtk_radio_button_new_with_label(NULL, |
226 l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_ASKTOSAVE).c_str()); | 226 l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_ASKTOSAVE).c_str()); |
227 g_signal_connect(passwords_asktosave_radio_, "toggled", | 227 g_signal_connect(passwords_asktosave_radio_, "toggled", |
228 G_CALLBACK(OnPasswordRadioToggledThunk), this); | 228 G_CALLBACK(OnPasswordRadioToggledThunk), this); |
(...skipping 389 matching lines...) Loading... |
618 sync_service_->ShowLoginDialog(); | 618 sync_service_->ShowLoginDialog(); |
619 } | 619 } |
620 | 620 |
621 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response) { | 621 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response) { |
622 if (response == GTK_RESPONSE_ACCEPT) { | 622 if (response == GTK_RESPONSE_ACCEPT) { |
623 sync_service_->DisableForUser(); | 623 sync_service_->DisableForUser(); |
624 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 624 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); |
625 } | 625 } |
626 gtk_widget_destroy(widget); | 626 gtk_widget_destroy(widget); |
627 } | 627 } |
OLD | NEW |