summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmmisc.c5
-rw-r--r--kabc/addressbook.cpp3
-rw-r--r--kabc/addressbook.h2
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp4
-rw-r--r--kaddressbook/kabcore.cpp31
-rw-r--r--kaddressbook/kabcore.h3
6 files changed, 27 insertions, 21 deletions
diff --git a/gammu/emb/common/service/gsmmisc.c b/gammu/emb/common/service/gsmmisc.c
index 1c6ec8b..486d136 100644
--- a/gammu/emb/common/service/gsmmisc.c
+++ b/gammu/emb/common/service/gsmmisc.c
@@ -221,7 +221,10 @@ bool ReadVCALText(char *Buffer, char *Start, char *Value)
221 strcpy(buff,Start); 221 strcpy(buff,Start);
222 strcat(buff,":"); 222 strcat(buff,":");
223 if (!strncmp(Buffer,buff,strlen(buff))) { 223 if (!strncmp(Buffer,buff,strlen(buff))) {
224 EncodeUnicode(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1)); 224
225 // LR original :EncodeUnicode(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1));
226 // LR we have utf8 as default
227 DecodeUTF8(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1));
225 dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); 228 dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value));
226 return true; 229 return true;
227 } 230 }
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index c584c35..3641c0c 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -477,7 +477,7 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName )
477 return true; 477 return true;
478 478
479} 479}
480void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld ) 480int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld )
481{ 481{
482 482
483 if ( removeOld ) 483 if ( removeOld )
@@ -510,6 +510,7 @@ void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool rem
510 } 510 }
511 if ( removeOld ) 511 if ( removeOld )
512 removeUntagged(); 512 removeUntagged();
513 return list.count();
513} 514}
514void AddressBook::setUntagged(bool setNonSyncTagged) // = false) 515void AddressBook::setUntagged(bool setNonSyncTagged) // = false)
515{ 516{
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index 23bba02..5edca06 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -147,7 +147,7 @@ class AddressBook : public QObject
147 void preparePhoneSync( QString currentSyncDevice, bool isPreSync ); 147 void preparePhoneSync( QString currentSyncDevice, bool isPreSync );
148 void export2File( QString fileName ); 148 void export2File( QString fileName );
149 bool export2PhoneFormat( QStringList uids ,QString fileName ); 149 bool export2PhoneFormat( QStringList uids ,QString fileName );
150 void importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false ); 150 int importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false );
151 void setUntagged( bool setNonSyncTagged = false ); 151 void setUntagged( bool setNonSyncTagged = false );
152 void removeUntagged(); 152 void removeUntagged();
153 void findNewExtIds( QString fileName, QString currentSyncDevice ); 153 void findNewExtIds( QString fileName, QString currentSyncDevice );
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index 2cdf4bf..ba17c50 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -72,8 +72,8 @@ ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
72 init( fileName ); 72 init( fileName );
73} 73}
74 74
75ResourceSharpDTM::ResourceSharpDTM( const QString &fileName, bool syncable ) 75ResourceSharpDTM::ResourceSharpDTM( const QString &fileName )
76 : Resource( 0, syncable ) 76 : Resource( 0 )
77{ 77{
78 init( fileName ); 78 init( fileName );
79} 79}
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 087e9e3..3ab06c4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -204,6 +204,7 @@ public:
204 QCheckBox* mWriteToSim; 204 QCheckBox* mWriteToSim;
205}; 205};
206 206
207
207bool pasteWithNewUid = true; 208bool pasteWithNewUid = true;
208 209
209#ifdef KAB_EMBEDDED 210#ifdef KAB_EMBEDDED
@@ -222,7 +223,6 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
222 // syncManager->setBlockSave(false); 223 // syncManager->setBlockSave(false);
223 mExtensionBarSplitter = 0; 224 mExtensionBarSplitter = 0;
224 mIsPart = !parent->inherits( "KAddressBookMain" ); 225 mIsPart = !parent->inherits( "KAddressBookMain" );
225
226 mAddressBook = KABC::StdAddressBook::self(); 226 mAddressBook = KABC::StdAddressBook::self();
227 KABC::StdAddressBook::setAutomaticSave( false ); 227 KABC::StdAddressBook::setAutomaticSave( false );
228 228
@@ -307,6 +307,9 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
307 mAddressBookService = new KAddressBookService( this ); 307 mAddressBookService = new KAddressBookService( this );
308 308
309#endif //KAB_EMBEDDED 309#endif //KAB_EMBEDDED
310
311 mMessageTimer = new QTimer( this );
312 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
310 mEditorDialog = 0; 313 mEditorDialog = 0;
311 createAddresseeEditorDialog( this ); 314 createAddresseeEditorDialog( this );
312 setModified( false ); 315 setModified( false );
@@ -328,8 +331,9 @@ KABCore::~KABCore()
328void KABCore::recieve( QString fn ) 331void KABCore::recieve( QString fn )
329{ 332{
330 //qDebug("KABCore::recieve "); 333 //qDebug("KABCore::recieve ");
331 mAddressBook->importFromFile( fn, true ); 334 int count = mAddressBook->importFromFile( fn, true );
332 mViewManager->refreshView(); 335 mViewManager->refreshView();
336 message(i18n("%1 contact(s) received!").arg( count ));
333 topLevelWidget()->raise(); 337 topLevelWidget()->raise();
334} 338}
335void KABCore::restoreSettings() 339void KABCore::restoreSettings()
@@ -697,6 +701,7 @@ void KABCore::export2phone()
697 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 701 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
698 return; 702 return;
699 703
704 message(i18n("Exporting to phone..."));
700 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 705 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
701 706
702} 707}
@@ -712,9 +717,9 @@ QString KABCore::getPhoneFile()
712void KABCore::writeToPhone( ) 717void KABCore::writeToPhone( )
713{ 718{
714 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 719 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
715 qDebug("Export okay "); 720 message(i18n("Export to phone finished!"));
716 else 721 else
717 qDebug("Error export contacts "); 722 qDebug(i18n("Error exporting to phone"));
718} 723}
719void KABCore::beamVCard() 724void KABCore::beamVCard()
720{ 725{
@@ -831,7 +836,7 @@ void KABCore::beamDone( Ir *ir )
831 delete ir; 836 delete ir;
832#endif 837#endif
833 topLevelWidget()->raise(); 838 topLevelWidget()->raise();
834 message( i18n("Beaming successful!") ); 839 message( i18n("Beaming finished!") );
835} 840}
836 841
837 842
@@ -1195,7 +1200,7 @@ void KABCore::save()
1195 QString text = i18n( "There was an error while attempting to save\n the " 1200 QString text = i18n( "There was an error while attempting to save\n the "
1196 "address book. Please check that some \nother application is " 1201 "address book. Please check that some \nother application is "
1197 "not using it. " ); 1202 "not using it. " );
1198 statusMessage(i18n("Saving addressbook ... ")); 1203 message(i18n("Saving addressbook ... "));
1199#ifndef KAB_EMBEDDED 1204#ifndef KAB_EMBEDDED
1200 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); 1205 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
1201 if ( !b || !b->save() ) { 1206 if ( !b || !b->save() ) {
@@ -1208,16 +1213,12 @@ void KABCore::save()
1208 } 1213 }
1209#endif //KAB_EMBEDDED 1214#endif //KAB_EMBEDDED
1210 1215
1211 statusMessage(i18n("Addressbook saved!")); 1216 message(i18n("Addressbook saved!"));
1212 setModified( false ); 1217 setModified( false );
1213 syncManager->setBlockSave(false); 1218 syncManager->setBlockSave(false);
1214} 1219}
1215 1220
1216void KABCore::statusMessage(QString mess , int time ) 1221
1217{
1218 //topLevelWidget()->setCaption( mess );
1219 // pending setting timer to revome message
1220}
1221void KABCore::undo() 1222void KABCore::undo()
1222{ 1223{
1223 UndoStack::instance()->undo(); 1224 UndoStack::instance()->undo();
@@ -2155,7 +2156,7 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
2155 int dh = QApplication::desktop()->height(); 2156 int dh = QApplication::desktop()->height();
2156 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2157 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2157 bar.show(); 2158 bar.show();
2158 bar.setCaption (i18n("collecting birthdays - close to abort!") ); 2159 bar.setCaption (i18n("Collecting birthdays - close to abort!") );
2159 qApp->processEvents(); 2160 qApp->processEvents();
2160 2161
2161 QDate bday; 2162 QDate bday;
@@ -2809,9 +2810,8 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
2809} 2810}
2810void KABCore::message( QString m ) 2811void KABCore::message( QString m )
2811{ 2812{
2812
2813 topLevelWidget()->setCaption( m ); 2813 topLevelWidget()->setCaption( m );
2814 QTimer::singleShot( 15000, this , SLOT ( setCaptionBack())); 2814 mMessageTimer->start( 15000, true );
2815} 2815}
2816bool KABCore::syncPhone() 2816bool KABCore::syncPhone()
2817{ 2817{
@@ -2870,5 +2870,6 @@ QString KABCore::sentSyncFile()
2870 2870
2871void KABCore::setCaptionBack() 2871void KABCore::setCaptionBack()
2872{ 2872{
2873 mMessageTimer->stop();
2873 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); 2874 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
2874} 2875}
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 5871d39..c7be343 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -29,6 +29,7 @@
29#ifndef KAB_EMBEDDED 29#ifndef KAB_EMBEDDED
30#endif //KAB_EMBEDDED 30#endif //KAB_EMBEDDED
31#include <qdict.h> 31#include <qdict.h>
32#include <qtimer.h>
32 33
33#include <qwidget.h> 34#include <qwidget.h>
34#include <qpopupmenu.h> 35#include <qpopupmenu.h>
@@ -143,7 +144,6 @@ class KABCore : public QWidget, public KSyncInterface
143 void createAboutData(); 144 void createAboutData();
144#endif //KAB_EMBEDDED 145#endif //KAB_EMBEDDED
145 146
146 void statusMessage(QString, int time = 0 );
147 void showLicence(); 147 void showLicence();
148 void faq(); 148 void faq();
149 void whatsnew() ; 149 void whatsnew() ;
@@ -370,6 +370,7 @@ class KABCore : public QWidget, public KSyncInterface
370 void addressBookChanged(); 370 void addressBookChanged();
371 371
372 private: 372 private:
373 QTimer *mMessageTimer;
373 void initGUI(); 374 void initGUI();
374 void initActions(); 375 void initActions();
375 QString getPhoneFile(); 376 QString getPhoneFile();