summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index acb0011..a39d983 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -133,24 +133,25 @@ static void addAuthors(KAboutData *aboutData)
133 "tengel@sonic.net"); 133 "tengel@sonic.net");
134 aboutData->addCredit("Wickey", 134 aboutData->addCredit("Wickey",
135 I18N_NOOP("graphics-design in older versions."), 135 I18N_NOOP("graphics-design in older versions."),
136 "wickey@gmx.at"); 136 "wickey@gmx.at");
137 aboutData->addCredit("Ian MacGregor", 137 aboutData->addCredit("Ian MacGregor",
138 I18N_NOOP( 138 I18N_NOOP(
139 "original documentation author.")); 139 "original documentation author."));
140} 140}
141#endif 141#endif
142 142
143int main(int argc, char *argv[]) 143int main(int argc, char *argv[])
144{ 144{
145 if(!getenv("KDEPIMPIDIR")) putenv("KDEPIMPIDIR=/usr/lib/kdepimpi");
145 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); 146 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
146 printDebugConfigureInfo(); 147 printDebugConfigureInfo();
147#ifndef PWM_EMBEDDED 148#ifndef PWM_EMBEDDED
148 KAboutData aboutData(PACKAGE_NAME, PROG_NAME, 149 KAboutData aboutData(PACKAGE_NAME, PROG_NAME,
149 PACKAGE_VER, description, KAboutData::License_File, 150 PACKAGE_VER, description, KAboutData::License_File,
150 "(c) 2003, 2004 Michael Buesch and the PwManager Team", 0, 151 "(c) 2003, 2004 Michael Buesch and the PwManager Team", 0,
151 "http://passwordmanager.sourceforge.net/", 152 "http://passwordmanager.sourceforge.net/",
152 "mbuesch@freenet.de"); 153 "mbuesch@freenet.de");
153 addAuthors(&aboutData); 154 addAuthors(&aboutData);
154 155
155 KCmdLineArgs::init(argc, argv, &aboutData); 156 KCmdLineArgs::init(argc, argv, &aboutData);
156 KCmdLineArgs::addCmdLineOptions(options); 157 KCmdLineArgs::addCmdLineOptions(options);
@@ -180,24 +181,28 @@ int main(int argc, char *argv[])
180 181
181 PwMApplication a(argc, argv); 182 PwMApplication a(argc, argv);
182 183
183 KGlobal::setAppName( "pwmanager" ); 184 KGlobal::setAppName( "pwmanager" );
184#ifndef DESKTOP_VERSION 185#ifndef DESKTOP_VERSION
185 //qDebug("width %d ",QApplication::desktop()->width() ); 186 //qDebug("width %d ",QApplication::desktop()->width() );
186 if ( QApplication::desktop()->width() > 320 ) 187 if ( QApplication::desktop()->width() > 320 )
187 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/"); 188 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/");
188 else 189 else
189 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/"); 190 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/");
190#else 191#else
191 QString fileName ; 192 QString fileName ;
193 const char *kpd = ::getenv("KDEPIMPIDIR");
194 if(kpd)
195 fileName = QString(kpd) + "/pwmanager/icons22/";
196 else
192 fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; 197 fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/";
193 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 198 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
194 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 199 QApplication::addLibraryPath ( qApp->applicationDirPath () );
195 200
196#endif 201#endif
197 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); 202 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager")));
198 KPimGlobalPrefs::instance()->setGlobalConfig(); 203 KPimGlobalPrefs::instance()->setGlobalConfig();
199 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); 204 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
200 205
201 a.newInstance(); 206 a.newInstance();
202 207
203 //US KAddressBookMain m ; 208 //US KAddressBookMain m ;