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

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: 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
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..086693d81a5f7bcf1d2238a8af76cdae9cec7ea4 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();
}
@@ -676,12 +678,22 @@ void GtkThemeService::OnStyleSet(GtkWidget* widget,
if (profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) {
ClearAllThemeData();
LoadGtkValues();
+ SetXDGIconTheme();
NotifyThemeChanged();
}
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

Powered by Google App Engine
This is Rietveld 408576698