summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/TODO8
-rw-r--r--core/pim/addressbook/addressbook.cpp30
-rw-r--r--core/pim/addressbook/addressbook.h5
-rw-r--r--core/pim/addressbook/contacteditor.cpp2
-rw-r--r--core/pim/addressbook/version.h2
5 files changed, 38 insertions, 9 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index da9b9c2..a3cffa7 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -11,18 +11,13 @@ Feature requests:
- Implementing additional Views (Phonebook, ...)
- Birthday & Anniversary Reminder
- Beaming of multiple contacts (current list/ by search or by category)
- Configure the letter-picker: lastname/fullname search
-- User center of the joypad to switch back from card to listview !
+- Optionally put scrollbars left.
Known Bugs:
-----------
-Bugs but not in addressbook:
------------------------------
-- VCARD: If umlaut (äöüß) in address, the parser gets confused..
-
-
Urgent:
--------
- Category is on the wrong position after changing to personal and back to normal
( Temporarily workaround: Category is never deactivated.. :S )
@@ -113,4 +108,5 @@ Fixed/Ready:
- Default Email-Button: Sometimes not hiding the textfields completely
- Fix handling of 3 Firstnames
- Cursor-UP/Down: Should additionally scroll cardview if it is too large
(behaviour should be selectable by configuration)
+- User center of the joypad to switch back from card to listview !
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index a5bf19b..89a3312 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -208,8 +208,14 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
actionPersonal = a;
connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) );
a->addTo( edit );
+ a = new QAction( tr("Export vCard"), Resource::loadPixmap( "addressbook/fileexport"), QString::null,
+ 0, this, 0);
+ actionPersonal = a;
+ connect( a, SIGNAL( activated() ), this, SLOT( exportvCard() ) );
+ a->addTo( edit );
+
edit->insertSeparator();
a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ),
QString::null, 0, this, 0 , TRUE );
@@ -330,8 +336,32 @@ void AddressbookWindow::importvCard() {
setDocument((const QString&) str );
}
}
+void AddressbookWindow::exportvCard()
+{
+ qWarning(" void AddressbookWindow::exportvCard()");
+ QString filename = OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this );
+ if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){
+ qWarning(" Save to file %s, (%d)", filename.latin1(), filename.length()-1 );
+ OContact curCont = m_abView->currentEntry();
+ if ( !curCont.isEmpty() ){
+ OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
+ filename );
+ OContactAccess* access = new OContactAccess ( "addressbook_exp", QString::null , vcard_backend, true );
+ if ( access ){
+ access->add( curCont );
+ access->save();
+ }
+ delete access;
+ }else
+ QMessageBox::critical( 0, "Export VCard",
+ QString( tr( "You have to select a contact !") ) );
+
+ }else
+ QMessageBox::critical( 0, "Export VCard",
+ QString( tr( "You have to set a filename !") ) );
+}
void AddressbookWindow::setDocument( const QString &filename )
{
qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() );
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h
index 69fe2f8..f7a560a 100644
--- a/core/pim/addressbook/addressbook.h
+++ b/core/pim/addressbook/addressbook.h
@@ -20,9 +20,9 @@
#ifndef Addressbook_H
#define Addressbook_H
// Remove this for OPIE releae 1.0 !
-#define __DEBUG_RELEASE
+// #define __DEBUG_RELEASE
#include <qmainwindow.h>
#include <qvaluelist.h>
#include <qstringlist.h>
@@ -64,13 +64,14 @@ public slots:
void reload();
void appMessage(const QCString &, const QByteArray &);
void setDocument( const QString & );
#ifdef __DEBUG_RELEASE
- void slotSave();
+ // void slotSave();
#endif
private slots:
void importvCard();
+ void exportvCard();
void slotListNew();
/* void slotListView(); */
void slotListDelete();
void slotViewBack();
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index df97b85..f33ee0a 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -1255,9 +1255,11 @@ void ContactEditor::cleanupFields() {
void ContactEditor::setEntry( const OContact &entry ) {
initializing = true;
+ // Cleanup and activate the general Page ..
cleanupFields();
+ tabMain->setCurrentPage( 0 );
ent = entry;
emails = QStringList(ent.emailList());
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h
index d590a86..c0465b5 100644
--- a/core/pim/addressbook/version.h
+++ b/core/pim/addressbook/version.h
@@ -2,9 +2,9 @@
#define _VERSION_H_
#define MAINVERSION "0"
#define SUBVERSION "9"
-#define PATCHVERSION "3"
+#define PATCHVERSION "4"
#define APPNAME "OPIE_ADDRESSBOOK"
#endif