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

Unified Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 12230026: linux: Both gtk and the aura port should set the icon theme name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for thestig Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_theme_service.cc
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index 2ffcee5c1028f4e731176d1385994916e9a06524..aeb6ec06142b90accde6f0c4b1911695dab93815 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -11,6 +11,7 @@
#include "base/debug/trace_event.h"
#include "base/environment.h"
+#include "base/nix/mime_util_xdg.h"
#include "base/nix/xdg_util.h"
#include "base/prefs/pref_service.h"
#include "base/stl_util.h"
@@ -628,6 +629,7 @@ void GtkThemeService::LoadThemePrefs() {
ThemeService::LoadThemePrefs();
}
+ SetXDGIconTheme();
RebuildMenuIconSets();
}
@@ -682,6 +684,15 @@ void GtkThemeService::OnStyleSet(GtkWidget* widget,
RebuildMenuIconSets();
}
+void GtkThemeService::SetXDGIconTheme() {
+ gchar* gtk_theme_name;
+ g_object_get(gtk_settings_get_default(),
+ "gtk-icon-theme-name",
+ &gtk_theme_name, NULL);
+ base::nix::SetIconThemeName(gtk_theme_name);
+ g_free(gtk_theme_name);
+}
+
void GtkThemeService::LoadGtkValues() {
// Before we start setting images and values, we have to clear out old, stale
// values. (If we don't do this, we'll regress startup time in the case where
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698