summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-14 09:28:50 (UTC)
committer zautrix <zautrix>2004-10-14 09:28:50 (UTC)
commit3d79ab275374292196c7d032ffd2e321841c8cb0 (patch) (side-by-side diff)
tree6ceaba2a5f375cfebc88189000221fe456e6f9d2 /kaddressbook
parent57bd80b04dddd40a897dce8b6902d1046d71c631 (diff)
downloadkdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.zip
kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.tar.gz
kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.tar.bz2
umlaute phone fixes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp31
-rw-r--r--kaddressbook/kabcore.h3
2 files changed, 18 insertions, 16 deletions
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:
QCheckBox* mWriteToSim;
};
+
bool pasteWithNewUid = true;
#ifdef KAB_EMBEDDED
@@ -222,7 +223,6 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
// syncManager->setBlockSave(false);
mExtensionBarSplitter = 0;
mIsPart = !parent->inherits( "KAddressBookMain" );
-
mAddressBook = KABC::StdAddressBook::self();
KABC::StdAddressBook::setAutomaticSave( false );
@@ -307,6 +307,9 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
mAddressBookService = new KAddressBookService( this );
#endif //KAB_EMBEDDED
+
+ mMessageTimer = new QTimer( this );
+ connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
mEditorDialog = 0;
createAddresseeEditorDialog( this );
setModified( false );
@@ -328,8 +331,9 @@ KABCore::~KABCore()
void KABCore::recieve( QString fn )
{
//qDebug("KABCore::recieve ");
- mAddressBook->importFromFile( fn, true );
+ int count = mAddressBook->importFromFile( fn, true );
mViewManager->refreshView();
+ message(i18n("%1 contact(s) received!").arg( count ));
topLevelWidget()->raise();
}
void KABCore::restoreSettings()
@@ -697,6 +701,7 @@ void KABCore::export2phone()
if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
return;
+ message(i18n("Exporting to phone..."));
QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
}
@@ -712,9 +717,9 @@ QString KABCore::getPhoneFile()
void KABCore::writeToPhone( )
{
if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
- qDebug("Export okay ");
+ message(i18n("Export to phone finished!"));
else
- qDebug("Error export contacts ");
+ qDebug(i18n("Error exporting to phone"));
}
void KABCore::beamVCard()
{
@@ -831,7 +836,7 @@ void KABCore::beamDone( Ir *ir )
delete ir;
#endif
topLevelWidget()->raise();
- message( i18n("Beaming successful!") );
+ message( i18n("Beaming finished!") );
}
@@ -1195,7 +1200,7 @@ void KABCore::save()
QString text = i18n( "There was an error while attempting to save\n the "
"address book. Please check that some \nother application is "
"not using it. " );
- statusMessage(i18n("Saving addressbook ... "));
+ message(i18n("Saving addressbook ... "));
#ifndef KAB_EMBEDDED
KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
if ( !b || !b->save() ) {
@@ -1208,16 +1213,12 @@ void KABCore::save()
}
#endif //KAB_EMBEDDED
- statusMessage(i18n("Addressbook saved!"));
+ message(i18n("Addressbook saved!"));
setModified( false );
syncManager->setBlockSave(false);
}
-void KABCore::statusMessage(QString mess , int time )
-{
- //topLevelWidget()->setCaption( mess );
- // pending setting timer to revome message
-}
+
void KABCore::undo()
{
UndoStack::instance()->undo();
@@ -2155,7 +2156,7 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
int dh = QApplication::desktop()->height();
bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
bar.show();
- bar.setCaption (i18n("collecting birthdays - close to abort!") );
+ bar.setCaption (i18n("Collecting birthdays - close to abort!") );
qApp->processEvents();
QDate bday;
@@ -2809,9 +2810,8 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
}
void KABCore::message( QString m )
{
-
topLevelWidget()->setCaption( m );
- QTimer::singleShot( 15000, this , SLOT ( setCaptionBack()));
+ mMessageTimer->start( 15000, true );
}
bool KABCore::syncPhone()
{
@@ -2870,5 +2870,6 @@ QString KABCore::sentSyncFile()
void KABCore::setCaptionBack()
{
+ mMessageTimer->stop();
topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
}
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 @@
#ifndef KAB_EMBEDDED
#endif //KAB_EMBEDDED
#include <qdict.h>
+#include <qtimer.h>
#include <qwidget.h>
#include <qpopupmenu.h>
@@ -143,7 +144,6 @@ class KABCore : public QWidget, public KSyncInterface
void createAboutData();
#endif //KAB_EMBEDDED
- void statusMessage(QString, int time = 0 );
void showLicence();
void faq();
void whatsnew() ;
@@ -370,6 +370,7 @@ class KABCore : public QWidget, public KSyncInterface
void addressBookChanged();
private:
+ QTimer *mMessageTimer;
void initGUI();
void initActions();
QString getPhoneFile();