[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: PATCH: port of knode to kabc
From: Cornelius Schumacher <schumacher () kde ! org>
Date: 2002-02-12 12:31:03
[Download RAW message or body]
This patch makes knode use kabc instead of kab. Is it ok to commit?
["kabc.patch" (text/x-diff)]
? kabc.patch
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdenetwork/knode/Makefile.am,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile.am
--- Makefile.am 2001/08/28 08:19:47 1.37
+++ Makefile.am 2002/02/12 12:28:05
@@ -128,7 +128,7 @@ noinst_HEADERS = knconfigmanager.h \
knode_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-knode_LDADD = -lkdeprint $(top_builddir)/libkdenetwork/libkdenetwork.la -lkspell \
$(LIB_KAB) $(LIB_KFILE) $(LIBPTHREAD) $(LIBRESOLV) +knode_LDADD = -lkdeprint \
$(top_builddir)/libkdenetwork/libkdenetwork.la -lkspell -lkabc $(LIB_KFILE) \
$(LIBPTHREAD) $(LIBRESOLV) knode_METASOURCES = AUTO
appsdir = $(kde_appsdir)/Internet
Index: kncomposer.cpp
===================================================================
RCS file: /home/kde/kdenetwork/knode/kncomposer.cpp,v
retrieving revision 1.129
diff -u -p -r1.129 kncomposer.cpp
--- kncomposer.cpp 2002/01/28 00:50:56 1.129
+++ kncomposer.cpp 2002/02/12 12:28:05
@@ -23,7 +23,7 @@
#include <kaccel.h>
#include <kcharsets.h>
#include <kmessagebox.h>
-#include <kabapi.h>
+#include <kabc/addresseedialog.h>
#include <kaction.h>
#include <kstdaction.h>
#include <kkeydialog.h>
@@ -1211,30 +1211,13 @@ void KNComposer::slotGroupsChanged(const
void KNComposer::slotToBtnClicked()
{
- KabAPI *kab;
- AddressBook::Entry entry;
- KabKey key;
- QString path;
-
- kab=new KabAPI(this);
- if(kab->init()!=AddressBook::NoError) {
- KMessageBox::error(this, i18n("Cannot initialize the addressbook"));
- delete kab;
- return;
- }
+ KABC::Addressee a = KABC::AddresseeDialog::getAddressee( this );
+ if ( a.isEmpty() ) return;
- if(kab->exec()) {
- if(kab->getEntry(entry, key)!=AddressBook::NoError) {
- KMessageBox::error(this, i18n("Cannot read addressbook entry"));
- }
- else {
- QString to=v_iew->t_o->text();
- if(!to.isEmpty()) to+=", ";
- to+=entry.emails.first().latin1();
- v_iew->t_o->setText(to);
- }
- }
- delete kab;
+ QString to=v_iew->t_o->text();
+ if(!to.isEmpty()) to+=", ";
+ to+=a.fullEmail();
+ v_iew->t_o->setText(to);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic