--v9Ux+11Zm5mwPlX6 Content-Type: text/plain; charset=us-ascii Hello all, A patch towards konsole (KDE_1_1_BRANCH) for your perusal. This does two things: 1) Finds schema files in the various .../apps/konsole dirs if it is not specified with an absolute path 2) Finds image files for schemas in various .../wallpapers dirs if it is not specified with an absolute path Both of those changes are necessary if we hope to theme konsole. As it is, it is necessary to HARD-CODE paths. Yech! Can somebody else apply this if it looks reasonable? -- Kurt Granroth | granroth@kde.org KDE Developer/Evangelist | http://www.pobox.com/~kurt_granroth KDE -- Putting a Friendly Face on Linux --v9Ux+11Zm5mwPlX6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="konsole.diff" Index: schema.C =================================================================== RCS file: /home/kde/kdebase/konsole/src/schema.C,v retrieving revision 1.4.2.1 diff -u -r1.4.2.1 schema.C --- schema.C 1999/02/25 03:20:19 1.4.2.1 +++ schema.C 1999/08/25 00:37:19 @@ -13,6 +13,7 @@ #include #include "kapp.h" #include +#include static int schema_serial = 0; //FIXME: remove,localize @@ -56,8 +57,16 @@ continue; // if this is not an absolute filename, prepend the wallpaper dir - if (path[0] != '/') res->imagepath = kapp->kde_wallpaperdir() + '/'; + if (path[0] != '/') res->imagepath = kapp->localkdedir() + "/share/wallpapers/"; res->imagepath += path; + if (QFile::exists(res->imagepath) == false) + { + // search for a global wallpaper + res->imagepath = kapp->kde_wallpaperdir() + '/'; + res->imagepath += path; + if (QFile::exists(res->imagepath) == false) + res->imagepath = ""; + } res->alignment = attr; } if (!strncmp(line,"color",5)) @@ -110,7 +119,20 @@ ColorSchema* ColorSchema::find(const char* path) { - ColorSchema* res = path2schema.find(path); + ColorSchema* res = 0; + QString temp_path; + + // search for a local schema first + if (path[0] != '/') temp_path = kapp->localkdedir() + "/share/apps/konsole/"; + temp_path += path; + if (QFile::exists(temp_path) == true) + res = path2schema.find(temp_path.data()); + else + { + temp_path = kapp->kde_datadir() + "/konsole/"; + if (QFile::exists(temp_path) == true) + res = path2schema.find(temp_path.data()); + } return res ? res : numb2schema.find(0); } --v9Ux+11Zm5mwPlX6--