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

Unified Diff: chrome/browser/gtk/options/content_page_gtk.cc

Issue 150176: GTK: First draft of using native themes, partially based on evan's CL 118358. (Closed)
Patch Set: And the codereview tool is back. Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
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 49d1c3e8e87fd0b738e3c93290f19b2271bdd2d4..11309127670968f14c3fa13683dc417d049c3f45 100644
--- a/chrome/browser/gtk/options/content_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_page_gtk.cc
@@ -171,6 +171,12 @@ GtkWidget* ContentPageGtk::InitBrowsingDataGroup() {
GtkWidget* ContentPageGtk::InitThemesGroup() {
GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing);
+ // GTK theme button.
+ GtkWidget* gtk_theme_button = gtk_button_new_with_label("GTK Theme");
+ g_signal_connect(G_OBJECT(gtk_theme_button), "clicked",
+ G_CALLBACK(OnGtkThemeButtonClicked), this);
+ gtk_box_pack_start(GTK_BOX(hbox), gtk_theme_button, FALSE, FALSE, 0);
+
// Reset themes button.
GtkWidget* themes_reset_button = gtk_button_new_with_label(
l10n_util::GetStringUTF8(IDS_THEMES_RESET_BUTTON).c_str());
@@ -198,6 +204,14 @@ void ContentPageGtk::OnClearBrowsingDataButtonClicked(GtkButton* widget,
}
// static
+void ContentPageGtk::OnGtkThemeButtonClicked(GtkButton* widget,
+ ContentPageGtk* page) {
+ page->UserMetricsRecordAction(L"Options_GtkThemeSet",
+ page->profile()->GetPrefs());
+ page->profile()->SetNativeTheme();
+}
+
+// static
void ContentPageGtk::OnResetDefaultThemeButtonClicked(GtkButton* widget,
ContentPageGtk* page) {
page->UserMetricsRecordAction(L"Options_ThemesReset",

Powered by Google App Engine
This is Rietveld 408576698