summaryrefslogtreecommitdiffstats
path: root/libkdepim/ldapsearchdialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /libkdepim/ldapsearchdialog.cpp
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/ldapsearchdialog.cpp')
-rw-r--r--libkdepim/ldapsearchdialog.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/libkdepim/ldapsearchdialog.cpp b/libkdepim/ldapsearchdialog.cpp
index 72011966a..a51ccfb9d 100644
--- a/libkdepim/ldapsearchdialog.cpp
+++ b/libkdepim/ldapsearchdialog.cpp
@@ -1,5 +1,5 @@
/* ldapsearchdialogimpl.cpp - LDAP access
- * Copyright (C) 2002 Klarälvdalens Datakonsult AB
+ * Copyright (C) 2002 Klar�vdalens Datakonsult AB
*
* Author: Steffen Hansen <hansen@kde.org>
*
@@ -21,6 +21,8 @@
#include "ldapsearchdialog.h"
#include "ldapclient.h"
+#include <libemailfunctions/email.h>
+
#include <tqcheckbox.h>
#include <tqgroupbox.h>
#include <tqheader.h>
@@ -94,12 +96,20 @@ static TQMap<TQString, TQString>& adrbookattr2ldap()
return keys;
}
-class ContactListItem : public QListViewItem
+namespace KPIM {
+
+class ContactListItem : public TQListViewItem
{
public:
ContactListItem( TQListView* parent, const KPIM::LdapAttrMap& attrs )
: TQListViewItem( parent ), mAttrs( attrs )
- { }
+ {
+ const KPIM::LdapAttrValue &mailAttrs = attrs[ "mail" ];
+ if ( mailAttrs.isEmpty() ) {
+ setSelectable( false );
+ setEnabled( false );
+ }
+ }
KPIM::LdapAttrMap mAttrs;
@@ -112,6 +122,8 @@ class ContactListItem : public QListViewItem
}
};
+}
+
LDAPSearchDialog::LDAPSearchDialog( TQWidget* parent, const char* name )
: KDialogBase( Plain, i18n( "Search for Addresses in Directory" ), Help | User1 |
User2 | User3 | Cancel, Default, parent, name, false, true )
@@ -248,7 +260,7 @@ void LDAPSearchDialog::restoreSettings()
KPIM::LdapClient* ldapClient = new KPIM::LdapClient( 0, this, "ldapclient" );
ldapClient->setServer( ldapServer );
-
+
TQStringList attrs;
for ( TQMap<TQString,TQString>::Iterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it )
@@ -435,7 +447,7 @@ TQString LDAPSearchDialog::selectedEMails() const
if ( name.isEmpty() ) {
result << email;
} else {
- result << name + " <" + email + ">";
+ result << KPIM::quoteNameIfNecessary( name ) + " <" + email + ">";
}
}
}