author | zautrix <zautrix> | 2005-03-30 10:41:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-30 10:41:33 (UTC) |
commit | 597cad3a63e6c22855704bf8435db70e3c2b184f (patch) (side-by-side diff) | |
tree | f7093b331be9a52a07d01a6f2f5c1f26daf42d50 | |
parent | 889d2102fcfe2fb0786b3f8f406dc32b42e38c7a (diff) | |
download | kdepimpi-597cad3a63e6c22855704bf8435db70e3c2b184f.zip kdepimpi-597cad3a63e6c22855704bf8435db70e3c2b184f.tar.gz kdepimpi-597cad3a63e6c22855704bf8435db70e3c2b184f.tar.bz2 |
fix
-rw-r--r-- | kabc/addressee.cpp | 3 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.cpp | 2 | ||||
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 10 |
3 files changed, 13 insertions, 2 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 18b4d58..39d14bb 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -1474,49 +1474,50 @@ void Addressee::setNameFromString( const QString &str ) if ( leftOffset < rightOffset ) { setGivenName( parts[ leftOffset ] ); leftOffset++; } QString additionalName; while ( leftOffset < rightOffset ) { additionalName.append( ( additionalName.isEmpty() ? "" : " ") + parts[ leftOffset ] ); leftOffset++; } setAdditionalName( additionalName ); } } QString Addressee::realName() const { if ( !formattedName().isEmpty() ) return formattedName(); QString n = assembledName(); if ( n.isEmpty() ) n = name(); - + if ( n.isEmpty() ) + n = organization(); return n; } QString Addressee::assembledName() const { QString name = prefix() + " " + givenName() + " " + additionalName() + " " + familyName() + " " + suffix(); return name.simplifyWhiteSpace(); } QString Addressee::fullEmail( const QString &email ) const { QString e; if ( email.isNull() ) { e = preferredEmail(); } else { e = email; } if ( e.isEmpty() ) return QString::null; QString text; if ( realName().isEmpty() ) text = e; diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp index 2b40909..cce68b9 100644 --- a/kaddressbook/views/kaddressbookcardview.cpp +++ b/kaddressbook/views/kaddressbookcardview.cpp @@ -38,49 +38,49 @@ #include "kabprefs.h" #include "viewmanager.h" #include "kaddressbookcardview.h" #ifndef KAB_EMBEDDED extern "C" { void *init_libkaddrbk_cardview() { return ( new CardViewFactory ); } } #endif //KAB_EMBEDDED //////////////////////////////// // AddresseeCardViewItem (internal class) class AddresseeCardViewItem : public CardViewItem { public: AddresseeCardViewItem(const KABC::Field::List &fields, bool showEmptyFields, KABC::AddressBook *doc, const KABC::Addressee &a, CardView *parent) - : CardViewItem(parent, a.formattedName()), + : CardViewItem(parent, a.realName() ), mFields( fields ), mShowEmptyFields(showEmptyFields), mDocument(doc), mAddressee(a) { if ( mFields.isEmpty() ) { mFields = KABC::Field::defaultFields(); } refresh(); } const KABC::Addressee &addressee() const { return mAddressee; } void refresh() { // Update our addressee, since it may have changed elsewhere mAddressee = mDocument->findByUid(mAddressee.uid()); if (!mAddressee.isEmpty()) { clearFields(); // Try all the selected fields until we find one with text. // This will limit the number of unlabeled icons in the view KABC::Field::List::Iterator iter; for (iter = mFields.begin(); iter != mFields.end(); ++iter) diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index cf0d1ee..810c889 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp @@ -1277,48 +1277,58 @@ void KStandardDirs::addKDEDefaults() localKdeDir += '\\'; #else if (localKdeDir.at(localKdeDir.length()-1) != '/') localKdeDir += '/'; #endif //QMessageBox::information( 0,"localKdeDir",localKdeDir, 1 ); } else { QString confFile; #ifdef DESKTOP_VERSION confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; QFileInfo fi ( confFile ); if ( !fi.exists() ) confFile = QDir::homeDirPath() + "/.microkdehome"; else qDebug("Loading path info from " + confFile ); #else confFile = QDir::homeDirPath() + "/.microkdehome"; #endif KConfig cfg ( confFile ); cfg.setGroup("Global"); localKdeDir = cfg.readEntry( "MICROKDEHOME", QDir::homeDirPath() + "/kdepim/" ); +#ifdef DESKTOP_VERSION + if ( localKdeDir.startsWith( "LOCAL:" ) ) { +#ifdef _WIN32_ + localKdeDir = qApp->applicationDirPath () + "\\"+ localKdeDir.mid( 6 ); +#else + localKdeDir = qApp->applicationDirPath () + "/"+ localKdeDir.mid( 6 ); +#endif + qDebug("Using local conf dir %s ",localKdeDir.latin1() ); + } +#endif } } else { // We treat root different to prevent root messing up the // file permissions in the users home directory. localKdeDir = readEnvPath("MICROKDEROOTHOME"); if (!localKdeDir.isEmpty()) { if (localKdeDir.at(localKdeDir.length()-1) != '/') localKdeDir += '/'; } else { //US struct passwd *pw = getpwuid(0); //US localKdeDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.microkde/"; qDebug("KStandardDirs::addKDEDefaults: 1 has to be fixed"); } } //US localKdeDir = appDir(); //US |