summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();