summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-11-15 22:46:10 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-11-15 22:46:10 +0000
commit3062772cf2b936d2586d1570cb701d575f11ed83 (patch)
tree98b49079a9ad873aab6b285a061694a24825e93b
parentFix bug forcing symbolic system icons in hicolor theme (diff)
downloadinkscape-3062772cf2b936d2586d1570cb701d575f11ed83.tar.gz
inkscape-3062772cf2b936d2586d1570cb701d575f11ed83.zip
Remove Adwaita-hicolor icon themes toggles making more compat
-rw-r--r--src/inkscape.cpp21
-rw-r--r--src/preferences-skeleton.h2
-rw-r--r--src/ui/interface.cpp3
3 files changed, 8 insertions, 18 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 7d19554c9..19438b437 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -507,12 +507,14 @@ Application::Application(const char* argv, bool use_gui) :
GtkSettings *settings = gtk_settings_get_default();
if (settings) {
const gchar *gtkThemeName;
- g_object_get(settings, "gtk-theme-name", &gtkThemeName, NULL);
const gchar *gtkIconThemeName;
- g_object_get(settings, "gtk-icon-theme-name", &gtkIconThemeName, NULL);
- prefs->setString("/theme/defaultIconTheme", Glib::ustring(gtkIconThemeName));
gboolean gtkApplicationPreferDarkTheme;
+ g_object_get(settings, "gtk-theme-name", &gtkThemeName, NULL);
+ g_object_get(settings, "gtk-icon-theme-name", &gtkIconThemeName, NULL);
g_object_get(settings, "gtk-application-prefer-dark-theme", &gtkApplicationPreferDarkTheme, NULL);
+ g_object_set(settings, "gtk-application-prefer-dark-theme",
+ prefs->getBool("/theme/darkTheme", gtkApplicationPreferDarkTheme), NULL);
+ prefs->setString("/theme/defaultIconTheme", Glib::ustring(gtkIconThemeName));
if (prefs->getString("/theme/gtkTheme") != "") {
g_object_set(settings, "gtk-theme-name", prefs->getString("/theme/gtkTheme").c_str(), NULL);
}
@@ -522,20 +524,11 @@ Application::Application(const char* argv, bool use_gui) :
Glib::ustring themeiconname = prefs->getString("/theme/iconTheme");
if (themeiconname != "") {
- if (themeiconname == "hicolor") {
- themeiconname = "Adwaita";
- }
g_object_set(settings, "gtk-icon-theme-name", themeiconname.c_str(), NULL);
- }
+ }
else {
- Glib::ustring defaulticontheme = prefs->getString("/theme/defaultIconTheme");
- if (defaulticontheme == "Adwaita") {
- defaulticontheme = "hicolor";
- }
- prefs->setString("/theme/iconTheme", defaulticontheme);
+ prefs->setString("/theme/iconTheme", Glib::ustring(gtkIconThemeName));
}
- g_object_set(settings, "gtk-application-prefer-dark-theme",
- prefs->getBool("/theme/darkTheme", gtkApplicationPreferDarkTheme), NULL);
}
load_menus();
diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h
index 577452fda..0d7e6df91 100644
--- a/src/preferences-skeleton.h
+++ b/src/preferences-skeleton.h
@@ -82,7 +82,7 @@ static char const preferences_skeleton[] =
" inkscape:window-height=\"480\" />\n"
" </group>\n"
" <group id=\"theme\" \n"
-" gtkTheme=\"Adwaita\" iconTheme=\"hicolor\" symbolicIcons=\"0\" darkTheme=\"0\" symbolicColor=\"0x000000ff\" >\n"
+" gtkTheme=\"\" iconTheme=\"\" symbolicIcons=\"0\" darkTheme=\"0\" symbolicColor=\"0x000000ff\" >\n"
" </group>\n"
"\n"
" <group id=\"tools\"\n"
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index f55179e0f..088419edd 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -274,9 +274,6 @@ void sp_ui_reload()
if (GtkSettings *settings = gtk_settings_get_default()) {
Glib::ustring themeiconname = prefs->getString("/theme/iconTheme");
if (themeiconname != "") {
- if (themeiconname == "hicolor") {
- themeiconname = "Adwaita";
- }
g_object_set(settings, "gtk-icon-theme-name", themeiconname.c_str(), NULL);
}
}