diff options
Diffstat (limited to 'kcontrol/krdb/krdb.cpp')
-rw-r--r-- | kcontrol/krdb/krdb.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/kcontrol/krdb/krdb.cpp b/kcontrol/krdb/krdb.cpp index 8c30c3286..96467679d 100644 --- a/kcontrol/krdb/krdb.cpp +++ b/kcontrol/krdb/krdb.cpp @@ -33,8 +33,8 @@ #include <tdeconfig.h> #include <kdebug.h> #include <tdeglobalsettings.h> -#include <kstandarddirs.h> -#include <kprocio.h> +#include <tdestandarddirs.h> +#include <tdeprocio.h> #include <ksavefile.h> #include <tdetempfile.h> #include <tdelocale.h> @@ -94,7 +94,7 @@ static void applyGtkStyles(bool active, int version) TQByteArray params; TQDataStream stream(params, IO_WriteOnly); stream << name << value; - kapp->dcopClient()->send("tdelauncher", "tdelauncher", "setLaunchEnv(TQCString,TQCString)", params); + tdeApp->dcopClient()->send("tdelauncher", "tdelauncher", "setLaunchEnv(TQCString,TQCString)", params); } // ----------------------------------------------------------------------------- @@ -168,9 +168,9 @@ static void applyQtSettings( TDEConfig& kglobals, TQSettings& settings ) TQMap <TQString, bool> pathDb; // OK, this isn't fun at all. - // KApp adds paths ending with /, QApp those without slash, and if + // TDEApp adds paths ending with /, QApp those without slash, and if // one gives it something that is other way around, it will complain and scare - // users. So we need to know whether a path being added is from KApp, and in this case + // users. So we need to know whether a path being added is from TDEApp, and in this case // end it with.. So keep a TQMap to bool, specifying whether the path is KDE-specified.. TQString qversion = tqVersion(); @@ -547,8 +547,21 @@ void runRdb( uint flags ) TDEConfig cfgfonts("kcmfonts", true); cfgfonts.setGroup("General"); - if( cfgfonts.readNumEntry( "forceFontDPI", 0 ) != 0 ) - contents += "Xft.dpi: " + cfgfonts.readEntry( "forceFontDPI" ) + '\n'; + int dpicfg = cfgfonts.readNumEntry("forceFontDPI", 0); + // "forceFontDPIEnable" must be read after "forceFontDPI" to make sure it is + // correctly initialized on the first run when upgrading to the new format, + // without the user even noticying it. The first time "forceFontDPIEnable" + // will not exist and its correct value will be deduced by the existing value + // of "forceFontDPI", which contains the value prior to the update. + bool dpiEnable = cfgfonts.readBoolEntry("forceFontDPIEnable", dpicfg > 0); + if (dpicfg < 64 || dpicfg > 512) + { + dpicfg = 96; + } + if (dpiEnable) + { + contents += "Xft.dpi: " + TQString::number(dpicfg) + '\n'; + } } if (contents.length() > 0) |