summaryrefslogtreecommitdiff
path: root/core/pim/addressbook
authoreilers <eilers>2003-04-02 14:22:18 (UTC)
committer eilers <eilers>2003-04-02 14:22:18 (UTC)
commitf0d3ff51dde49f994783827051464920529024af (patch) (unidiff)
tree7d306530f14d020a85b332482fa549e8006f3148 /core/pim/addressbook
parent617523539b2ac77a97db427ba218b5951267410d (diff)
downloadopie-f0d3ff51dde49f994783827051464920529024af.zip
opie-f0d3ff51dde49f994783827051464920529024af.tar.gz
opie-f0d3ff51dde49f994783827051464920529024af.tar.bz2
Fix bug #791 (Misbehaviour of contacteditor: The main tab is active for every new
entry) Export to VCard added. Edit:Save removed (Was just for testing purposes)
Diffstat (limited to 'core/pim/addressbook') (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
@@ -13,14 +13,9 @@ Feature requests:
13- Beaming of multiple contacts (current list/ by search or by category) 13- Beaming of multiple contacts (current list/ by search or by category)
14- Configure the letter-picker: lastname/fullname search 14- Configure the letter-picker: lastname/fullname search
15- User center of the joypad to switch back from card to listview ! 15- Optionally put scrollbars left.
16 16
17Known Bugs: 17Known Bugs:
18----------- 18-----------
19 19
20Bugs but not in addressbook:
21-----------------------------
22- VCARD: If umlaut (äöüß) in address, the parser gets confused..
23
24
25Urgent: 20Urgent:
26-------- 21--------
@@ -115,2 +110,3 @@ Fixed/Ready:
115- Cursor-UP/Down: Should additionally scroll cardview if it is too large 110- Cursor-UP/Down: Should additionally scroll cardview if it is too large
116 (behaviour should be selectable by configuration) 111 (behaviour should be selectable by configuration)
112- 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
@@ -210,4 +210,10 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
210 a->addTo( edit ); 210 a->addTo( edit );
211 211
212 a = new QAction( tr("Export vCard"), Resource::loadPixmap( "addressbook/fileexport"), QString::null,
213 0, this, 0);
214 actionPersonal = a;
215 connect( a, SIGNAL( activated() ), this, SLOT( exportvCard() ) );
216 a->addTo( edit );
217
212 edit->insertSeparator(); 218 edit->insertSeparator();
213 219
@@ -332,4 +338,28 @@ void AddressbookWindow::importvCard() {
332 338
333} 339}
340void AddressbookWindow::exportvCard()
341{
342 qWarning(" void AddressbookWindow::exportvCard()");
343 QString filename = OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this );
344 if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){
345 qWarning(" Save to file %s, (%d)", filename.latin1(), filename.length()-1 );
346 OContact curCont = m_abView->currentEntry();
347 if ( !curCont.isEmpty() ){
348 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
349 filename );
350 OContactAccess* access = new OContactAccess ( "addressbook_exp", QString::null , vcard_backend, true );
351 if ( access ){
352 access->add( curCont );
353 access->save();
354 }
355 delete access;
356 }else
357 QMessageBox::critical( 0, "Export VCard",
358 QString( tr( "You have to select a contact !") ) );
359
360 }else
361 QMessageBox::critical( 0, "Export VCard",
362 QString( tr( "You have to set a filename !") ) );
363}
334 364
335void AddressbookWindow::setDocument( const QString &filename ) 365void AddressbookWindow::setDocument( const QString &filename )
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
@@ -22,5 +22,5 @@
22 22
23// Remove this for OPIE releae 1.0 ! 23// Remove this for OPIE releae 1.0 !
24#define __DEBUG_RELEASE 24// #define __DEBUG_RELEASE
25 25
26#include <qmainwindow.h> 26#include <qmainwindow.h>
@@ -66,9 +66,10 @@ public slots:
66 void setDocument( const QString & ); 66 void setDocument( const QString & );
67#ifdef __DEBUG_RELEASE 67#ifdef __DEBUG_RELEASE
68 void slotSave(); 68 // void slotSave();
69#endif 69#endif
70 70
71private slots: 71private slots:
72 void importvCard(); 72 void importvCard();
73 void exportvCard();
73 void slotListNew(); 74 void slotListNew();
74 /* void slotListView(); */ 75 /* void slotListView(); */
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
@@ -1257,5 +1257,7 @@ void ContactEditor::setEntry( const OContact &entry ) {
1257 initializing = true; 1257 initializing = true;
1258 1258
1259 // Cleanup and activate the general Page ..
1259 cleanupFields(); 1260 cleanupFields();
1261 tabMain->setCurrentPage( 0 );
1260 1262
1261 ent = entry; 1263 ent = entry;
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
@@ -4,5 +4,5 @@
4#define MAINVERSION "0" 4#define MAINVERSION "0"
5#define SUBVERSION "9" 5#define SUBVERSION "9"
6#define PATCHVERSION "3" 6#define PATCHVERSION "4"
7 7
8#define APPNAME "OPIE_ADDRESSBOOK" 8#define APPNAME "OPIE_ADDRESSBOOK"