-rw-r--r-- | core/pim/addressbook/TODO | 6 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 17 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.h | 5 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 54 |
4 files changed, 21 insertions, 61 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO index 32d2838..7bc906d 100644 --- a/core/pim/addressbook/TODO +++ b/core/pim/addressbook/TODO | |||
@@ -3,3 +3,4 @@ Stuff todo: | |||
3 | Urgent: | 3 | Urgent: |
4 | - Syncing: abtable not reloaded after sync. | 4 | |
5 | - Font menu is invisible using german translation | ||
5 | 6 | ||
@@ -22,3 +23,3 @@ Less important: | |||
22 | 23 | ||
23 | Should be Fixed: | 24 | Should be Fixed (not absolute sure, need validation): |
24 | - "Nonenglish" translation bug has to be fixed. | 25 | - "Nonenglish" translation bug has to be fixed. |
@@ -26 +27,2 @@ Should be Fixed: | |||
26 | Fixed: \ No newline at end of file | 27 | Fixed: \ No newline at end of file |
28 | - Syncing: abtable not reloaded after sync. | ||
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 70c070f..91a7171 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -472,3 +472,3 @@ void AbTable::resizeRows() { | |||
472 | 472 | ||
473 | bool AbTable::save( const QString& /* fn */ ) | 473 | bool AbTable::save() |
474 | { | 474 | { |
@@ -477,8 +477,7 @@ bool AbTable::save( const QString& /* fn */ ) | |||
477 | qWarning("abtable:Save data"); | 477 | qWarning("abtable:Save data"); |
478 | m_contactdb.save(); | ||
479 | 478 | ||
480 | return true; | 479 | return m_contactdb.save(); |
481 | } | 480 | } |
482 | 481 | ||
483 | void AbTable::load( const QString& /* fn */ ) | 482 | void AbTable::load() |
484 | { | 483 | { |
@@ -496,4 +495,2 @@ void AbTable::load( const QString& /* fn */ ) | |||
496 | 495 | ||
497 | resort(); | ||
498 | |||
499 | setUpdatesEnabled( TRUE ); | 496 | setUpdatesEnabled( TRUE ); |
@@ -501,3 +498,3 @@ void AbTable::load( const QString& /* fn */ ) | |||
501 | setSorting( true ); | 498 | setSorting( true ); |
502 | //resort(); | 499 | resort(); |
503 | } | 500 | } |
@@ -505,2 +502,8 @@ void AbTable::load( const QString& /* fn */ ) | |||
505 | 502 | ||
503 | void AbTable::reload() | ||
504 | { | ||
505 | m_contactdb.reload(); | ||
506 | load(); | ||
507 | } | ||
508 | |||
506 | void AbTable::realignTable( int row ) | 509 | void AbTable::realignTable( int row ) |
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index 84aef1e..80c3ca0 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h | |||
@@ -79,4 +79,5 @@ public: | |||
79 | void refresh(); | 79 | void refresh(); |
80 | bool save( const QString &fn ); | 80 | bool save(); |
81 | void load( const QString &fn ); | 81 | void load(); |
82 | void reload(); | ||
82 | 83 | ||
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 2eb9ddf..93581e8 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -69,14 +69,2 @@ | |||
69 | #include "picker.h" | 69 | #include "picker.h" |
70 | static QString addressbookOldXMLFilename() | ||
71 | { | ||
72 | QString filename = QPEApplication::documentDir() + "addressbook.xml"; | ||
73 | return filename; | ||
74 | } | ||
75 | |||
76 | static QString addressbookXMLFilename() | ||
77 | { | ||
78 | QString filename = Global::applicationFileName("addressbook", | ||
79 | "addressbook.xml"); | ||
80 | return filename; | ||
81 | } | ||
82 | 70 | ||
@@ -204,17 +192,2 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
204 | // Create Views | 192 | // Create Views |
205 | |||
206 | // This is safe to call without checking to see if it exists... | ||
207 | // not to mention it also does the necessary stuff for the | ||
208 | // journaling... | ||
209 | QString str = addressbookXMLFilename(); | ||
210 | if ( str.isNull() ) { | ||
211 | QMessageBox::warning( | ||
212 | this, | ||
213 | tr("Out of Space"), | ||
214 | tr("There is not enough space to create\n" | ||
215 | "neccessary startup files.\n" | ||
216 | "\nFree up some space before\nentering data!") | ||
217 | ); | ||
218 | } | ||
219 | |||
220 | listContainer = new QWidget( this ); | 193 | listContainer = new QWidget( this ); |
@@ -232,7 +205,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
232 | 205 | ||
233 | abList->load( addressbookXMLFilename() ); | 206 | abList->load(); |
234 | if ( QFile::exists(addressbookOldXMLFilename()) ) { | ||
235 | abList->load( addressbookOldXMLFilename() ); | ||
236 | QFile::remove(addressbookOldXMLFilename()); | ||
237 | } | ||
238 | 207 | ||
@@ -711,3 +680,3 @@ void AddressbookWindow::reload() | |||
711 | abList->clear(); | 680 | abList->clear(); |
712 | abList->load( addressbookXMLFilename() ); | 681 | abList->reload(); |
713 | } | 682 | } |
@@ -717,3 +686,3 @@ void AddressbookWindow::flush() | |||
717 | syncing = TRUE; | 686 | syncing = TRUE; |
718 | abList->save( addressbookXMLFilename() ); | 687 | abList->save(); |
719 | } | 688 | } |
@@ -757,4 +726,3 @@ bool AddressbookWindow::save() | |||
757 | { | 726 | { |
758 | QString str = addressbookXMLFilename(); | 727 | if ( !abList->save() ) { |
759 | if ( str.isNull() ) { | ||
760 | if ( QMessageBox::critical( 0, tr("Out of space"), | 728 | if ( QMessageBox::critical( 0, tr("Out of space"), |
@@ -770,16 +738,2 @@ bool AddressbookWindow::save() | |||
770 | return FALSE; | 738 | return FALSE; |
771 | } else { | ||
772 | if ( !abList->save( str ) ) { | ||
773 | if ( QMessageBox::critical( 0, tr( "Out of space" ), | ||
774 | tr("Unable to save information.\n" | ||
775 | "Free up some space\n" | ||
776 | "and try again.\n" | ||
777 | "\nQuit anyway?"), | ||
778 | QMessageBox::Yes|QMessageBox::Escape, | ||
779 | QMessageBox::No|QMessageBox::Default ) | ||
780 | != QMessageBox::No ) | ||
781 | return TRUE; | ||
782 | else | ||
783 | return FALSE; | ||
784 | } | ||
785 | } | 739 | } |