summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobal.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp
index 2b1bd34..bf7e238 100644
--- a/microkde/kglobal.cpp
+++ b/microkde/kglobal.cpp
@@ -13,12 +13,12 @@ QString KGlobal::mAppName = "godot";
KLocale *KGlobal::locale()
{
if ( !mLocale ) {
ASSERT(mAppName);
-
+
mLocale = new KLocale();//mAppName);
}
-
+
return mLocale;
}
//US
@@ -31,16 +31,18 @@ KConfig *KGlobal::config()
{
//mConfig is set inside setAppName. Though it has to be the first function you call.
return mConfig;
}
-
+
KGlobal::Size KGlobal::getDesktopSize()
{
#ifdef DESKTOP_VERSION
return KGlobal::Desktop;
#else
- if ( QApplication::desktop()->width() < 480 )
+ if ( QApplication::desktop()->width() <= 320 )
return KGlobal::Small;
+ else if ( QApplication::desktop()->width() > 480)
+ return KGlobal::Desktop;
else
return KGlobal::Medium;
#endif
}
@@ -68,25 +70,25 @@ KIconLoader *KGlobal::iconLoader()
{
if ( !mIconLoader ) {
mIconLoader = new KIconLoader();
}
-
+
return mIconLoader;
}
KStandardDirs *KGlobal::dirs()
{
if ( !mDirs ) {
mDirs = new KStandardDirs();
}
-
+
return mDirs;
}
void KGlobal::setAppName( const QString &appName )
{
mAppName = appName;
-
+
mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
}
//US
@@ -94,9 +96,9 @@ QString KGlobal::getAppName()
{
return mAppName;
}
QString KGlobal::formatMessage ( QString mess, int maxlen )
-{
+{
//int maxlen = 80;
int start = 0;
int end = mess.length();
QString retVal = "";