Use currently active TDE icon theme

pull/1/head
Timothy Pearson 12 years ago
parent 6953f22381
commit 3184ede6a8

@ -519,6 +519,39 @@ void writeGtkThemeControlFile(int forceRecreate) {
// This function is recursive - it gets the directories of all the inherited themes as well // This function is recursive - it gets the directories of all the inherited themes as well
addIconThemeDir(iconTheme); 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()) { if (!iconThemeDirs.isEmpty()) {
GtkIconFactory* factory; GtkIconFactory* factory;
factory = gtk_icon_factory_new(); factory = gtk_icon_factory_new();

Loading…
Cancel
Save