summaryrefslogtreecommitdiffabout
path: root/pwmanager
Side-by-side diff
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/main.cpp7
1 files changed, 6 insertions, 1 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
@@ -129,32 +129,33 @@ static void addAuthors(KAboutData *aboutData)
I18N_NOOP("Blowfish and SHA1 algorithms"),
0, "ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/");
aboutData->addCredit("Troy Engel",
I18N_NOOP("kpasman"),
"tengel@sonic.net");
aboutData->addCredit("Wickey",
I18N_NOOP("graphics-design in older versions."),
"wickey@gmx.at");
aboutData->addCredit("Ian MacGregor",
I18N_NOOP(
"original documentation author."));
}
#endif
int main(int argc, char *argv[])
{
+ if(!getenv("KDEPIMPIDIR")) putenv("KDEPIMPIDIR=/usr/lib/kdepimpi");
if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
printDebugConfigureInfo();
#ifndef PWM_EMBEDDED
KAboutData aboutData(PACKAGE_NAME, PROG_NAME,
PACKAGE_VER, description, KAboutData::License_File,
"(c) 2003, 2004 Michael Buesch and the PwManager Team", 0,
"http://passwordmanager.sourceforge.net/",
"mbuesch@freenet.de");
addAuthors(&aboutData);
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
KUniqueApplication::addCmdLineOptions();
if (!KUniqueApplication::start()) {
printInfo("already running.");
@@ -176,33 +177,37 @@ int main(int argc, char *argv[])
exitHelp = true;
}
}
if ( ! exitHelp ) {
PwMApplication a(argc, argv);
KGlobal::setAppName( "pwmanager" );
#ifndef DESKTOP_VERSION
//qDebug("width %d ",QApplication::desktop()->width() );
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/");
else
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/");
#else
QString fileName ;
- fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/";
+ const char *kpd = ::getenv("KDEPIMPIDIR");
+ if(kpd)
+ fileName = QString(kpd) + "/pwmanager/icons22/";
+ else
+ fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager")));
KPimGlobalPrefs::instance()->setGlobalConfig();
QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
a.newInstance();
//US KAddressBookMain m ;
//US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
/*US
#ifndef DESKTOP_VERSION
a.showMainWidget( &m );