summaryrefslogtreecommitdiffstats
path: root/tdegtk
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-11-22 18:47:43 -0600
committerTimothy Pearson <[email protected]>2012-11-22 18:47:43 -0600
commit3184ede6a8549e1631bda092c86c389a54adbc79 (patch)
treebc4564927fd8fc2b364e66a17f83679bcd2bee48 /tdegtk
parent6953f223818a5a84c8d7a7e12e5f2a2558fd20c5 (diff)
downloadgtk3-tqt-engine-3184ede6a8549e1631bda092c86c389a54adbc79.tar.gz
gtk3-tqt-engine-3184ede6a8549e1631bda092c86c389a54adbc79.zip
Use currently active TDE icon theme
Diffstat (limited to 'tdegtk')
-rw-r--r--tdegtk/tdegtk-theme.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/tdegtk/tdegtk-theme.cpp b/tdegtk/tdegtk-theme.cpp
index 924f7ef..d46fe07 100644
--- a/tdegtk/tdegtk-theme.cpp
+++ b/tdegtk/tdegtk-theme.cpp
@@ -520,6 +520,39 @@ void writeGtkThemeControlFile(int forceRecreate) {
addIconThemeDir(iconTheme);
if (!iconThemeDirs.isEmpty()) {
+ // Create symbolic links from the active icon theme directories to the TDE GTK icon theme names
+ TQString fullThemePath;
+ for (TQStringList::Iterator it=iconThemeDirs.begin(); it!=iconThemeDirs.end(); ++it) {
+ TQString currentDir = (*it);
+ if (currentDir.endsWith("/")) {
+ currentDir.truncate(currentDir.length()-1);
+ }
+ if (currentDir.endsWith(iconTheme)) {
+ fullThemePath = (*it);
+ }
+ }
+ if (fullThemePath != "") {
+ // Create symbolic link...
+ TQDir curDir;
+ TQString iconThemePath = TQDir::homeDirPath();
+ curDir.setPath(iconThemePath);
+ if (!curDir.exists()) {
+ curDir.mkdir(iconThemePath);
+ }
+ iconThemePath = iconThemePath + "/.icons/";
+ curDir.setPath(iconThemePath);
+ if (!curDir.exists()) {
+ curDir.mkdir(iconThemePath);
+ }
+ iconThemePath = iconThemePath + "tdegtk-icon-theme";
+ unlink(iconThemePath.ascii());
+ symlink(fullThemePath.ascii(), iconThemePath.ascii());
+ }
+ // FIXME
+ // Handle fallback icon theme (tdegtk-fallback-icon-theme)
+ }
+
+ if (!iconThemeDirs.isEmpty()) {
GtkIconFactory* factory;
factory = gtk_icon_factory_new();