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

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.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/libgtk2ui/gtk2_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index 4ce6a205d6e3c9deb8a2ce5a1878d669318a6d95..b91aafe3e7d73e51770fc2ebe5968ac6af5c6462 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/i18n/rtl.h"
#include "base/logging.h"
+#include "base/nix/mime_util_xdg.h"
#include "base/stl_util.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h"
@@ -291,6 +292,7 @@ Gtk2UI::Gtk2UI() {
// TODO(erg): Be lazy about generating this data and connect it to the
// style-set signal handler.
LoadGtkValues();
+ SetXDGIconTheme();
}
Gtk2UI::~Gtk2UI() {
@@ -438,6 +440,15 @@ void Gtk2UI::GetScrollbarColors(GdkColor* thumb_active_color,
*track_color = *theme_trough_color;
}
+void Gtk2UI::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 Gtk2UI::LoadGtkValues() {
// TODO(erg): GtkThemeService had a comment here about having to muck with
// the raw Prefs object to remove prefs::kCurrentThemeImages or else we'd
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698