Index: chrome/browser/gtk/options/content_page_gtk.cc |
=================================================================== |
--- chrome/browser/gtk/options/content_page_gtk.cc (revision 25629) |
+++ chrome/browser/gtk/options/content_page_gtk.cc (working copy) |
@@ -49,6 +49,8 @@ |
profile->GetPrefs(), this); |
ask_to_save_form_autofill_.Init(prefs::kFormAutofillEnabled, |
profile->GetPrefs(), this); |
+ use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame, |
+ profile->GetPrefs(), this); |
// Load initial values |
NotifyPrefChanged(NULL); |
@@ -77,6 +79,11 @@ |
GTK_TOGGLE_BUTTON(form_autofill_neversave_radio_), TRUE); |
} |
} |
+ if (!pref_name || *pref_name == prefs::kUseCustomChromeFrame) { |
+ gtk_toggle_button_set_active( |
+ GTK_TOGGLE_BUTTON(system_title_bar_checkbox_), |
+ !use_custom_chrome_frame_.GetValue()); |
+ } |
initializing_ = false; |
} |
@@ -172,8 +179,17 @@ |
} |
GtkWidget* ContentPageGtk::InitThemesGroup() { |
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); |
+ // "Use system title bar and borders" checkbox. |
+ system_title_bar_checkbox_ = gtk_check_button_new_with_label( |
+ l10n_util::GetStringUTF8(IDS_SHOW_WINDOW_DECORATIONS).c_str()); |
+ g_signal_connect(G_OBJECT(system_title_bar_checkbox_), "clicked", |
+ G_CALLBACK(OnSystemTitleBarCheckboxClicked), this); |
+ gtk_box_pack_start(GTK_BOX(vbox), system_title_bar_checkbox_, |
+ FALSE, FALSE, 0); |
+ |
// GTK theme button. |
GtkWidget* gtk_theme_button = gtk_button_new_with_label( |
l10n_util::GetStringUTF8(IDS_THEMES_GTK_BUTTON).c_str()); |
@@ -195,7 +211,9 @@ |
G_CALLBACK(OnGetThemesButtonClicked), this); |
gtk_box_pack_start(GTK_BOX(hbox), themes_gallery_button, FALSE, FALSE, 0); |
- return hbox; |
+ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
+ |
+ return vbox; |
} |
// static |
@@ -241,6 +259,13 @@ |
} |
// static |
+void ContentPageGtk::OnSystemTitleBarCheckboxClicked(GtkButton* widget, |
+ ContentPageGtk* page) { |
+ bool use_custom = !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); |
+ page->use_custom_chrome_frame_.SetValue(use_custom); |
+} |
+ |
+// static |
void ContentPageGtk::OnPasswordsExceptionsButtonClicked(GtkButton* widget, |
ContentPageGtk* page) { |
ShowPasswordsExceptionsWindow(page->profile()); |