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

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

Issue 160416: Add "Get Themes" button to gtk options dialog. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
===================================================================
--- chrome/browser/gtk/options/content_page_gtk.cc (revision 22090)
+++ chrome/browser/gtk/options/content_page_gtk.cc (working copy)
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/gfx/gtk_util.h"
+#include "chrome/browser/browser_list.h"
#include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h"
#include "chrome/browser/gtk/import_dialog_gtk.h"
#include "chrome/browser/gtk/options/options_layout_gtk.h"
@@ -18,6 +19,7 @@
#include "grit/app_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
///////////////////////////////////////////////////////////////////////////////
// ContentPageGtk, public:
@@ -179,13 +181,20 @@
G_CALLBACK(OnGtkThemeButtonClicked), this);
gtk_box_pack_start(GTK_BOX(hbox), gtk_theme_button, FALSE, FALSE, 0);
- // Reset themes button.
+ // Reset theme button.
GtkWidget* themes_reset_button = gtk_button_new_with_label(
l10n_util::GetStringUTF8(IDS_THEMES_RESET_BUTTON).c_str());
g_signal_connect(G_OBJECT(themes_reset_button), "clicked",
G_CALLBACK(OnResetDefaultThemeButtonClicked), this);
gtk_box_pack_start(GTK_BOX(hbox), themes_reset_button, FALSE, FALSE, 0);
+ // Get themes button.
+ GtkWidget* themes_gallery_button = gtk_button_new_with_label(
+ l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_BUTTON).c_str());
+ g_signal_connect(G_OBJECT(themes_gallery_button), "clicked",
+ G_CALLBACK(OnGetThemesButtonClicked), this);
+ gtk_box_pack_start(GTK_BOX(hbox), themes_gallery_button, FALSE, FALSE, 0);
+
return hbox;
}
@@ -222,6 +231,16 @@
}
// static
+void ContentPageGtk::OnGetThemesButtonClicked(GtkButton* widget,
+ ContentPageGtk* page) {
+ page->UserMetricsRecordAction(L"Options_ThemesGallery",
+ page->profile()->GetPrefs());
+ BrowserList::GetLastActive()->OpenURL(
+ GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
+ GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
+}
+
+// static
void ContentPageGtk::OnPasswordsExceptionsButtonClicked(GtkButton* widget,
ContentPageGtk* page) {
ShowPasswordsExceptionsWindow(page->profile());

Powered by Google App Engine
This is Rietveld 408576698