summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt9
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt8
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp67
-rw-r--r--kaddressbook/xxport/csvimportdialog.h4
-rw-r--r--microkde/kfiledialog.cpp3
-rw-r--r--microkde/kio/kfile/kurlrequester.cpp2
6 files changed, 75 insertions, 18 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index fdcfab1..41b2a81 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -2,2 +2,11 @@ Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.3 ************
4
5Changed the menu structure of the alarm applet:
6Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
7
8Fixed several problems in the KA/Pi CSV import dialog:
9Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
10
11
3********** VERSION 2.1.2 ************ 12********** VERSION 2.1.2 ************
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index ef4ab3f..899203e 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -287,5 +287,5 @@
287{ "Additional Names","Mittelname" }, 287{ "Additional Names","Mittelname" },
288{ "Honorific Prefixes","Namen Prefix" }, 288{ "Honorific Prefixes","Namensprefix" },
289{ "Honorific Suffixes","Namen Suffix" }, 289{ "Honorific Suffixes","Namenssuffix" },
290{ "Nick Name","Sptitzname" }, 290{ "Nick Name","Spitzname" },
291{ "Birthday","Geburtstag" }, 291{ "Birthday","Geburtstag" },
@@ -311,3 +311,3 @@
311{ "Pager","Pager" }, 311{ "Pager","Pager" },
312{ "Mail Client","Mail Client" }, 312{ "Mail Client","Mail Klient" },
313{ "Title","Titel" }, 313{ "Title","Titel" },
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index cc55a24..41e2612 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -124,2 +124,3 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
124 mTypeMap.insert( KABC::Addressee::urlLabel(), URL ); 124 mTypeMap.insert( KABC::Addressee::urlLabel(), URL );
125 mTypeMap.insert( KABC::Addressee::categoryLabel(), Categories );
125 126
@@ -141,2 +142,4 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
141 this, SLOT( lineSelected( const QString& ) ) ); 142 this, SLOT( lineSelected( const QString& ) ) );
143 connect( mComboCodec, SIGNAL( activated( const QString& ) ),
144 this, SLOT( codecChanged( const QString& ) ) );
142 connect( mComboQuote, SIGNAL( activated( const QString& ) ), 145 connect( mComboQuote, SIGNAL( activated( const QString& ) ),
@@ -251,5 +254,11 @@ KABC::AddresseeList CSVImportDialog::contacts() const
251 case Note: 254 case Note:
255 if ( a.note().isEmpty() )
252 a.setNote( value ); 256 a.setNote( value );
257 else {
258 a.setNote( a.note()+"\n"+value );
259 }
260 break;
261 case Categories:
262 a.insertCategory( value );
253 break; 263 break;
254
255 case HomePhone: 264 case HomePhone:
@@ -387,3 +396,3 @@ void CSVImportDialog::initGUI()
387 396
388 layout->addMultiCellLayout( hbox, 0, 0, 0, 1 ); 397 layout->addMultiCellLayout( hbox, 0, 0, 0, 2 );
389 398
@@ -396,3 +405,3 @@ void CSVImportDialog::initGUI()
396 delimiterLayout->setAlignment( Qt::AlignTop ); 405 delimiterLayout->setAlignment( Qt::AlignTop );
397 layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 1 ); 406 layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 );
398 407
@@ -426,3 +435,7 @@ void CSVImportDialog::initGUI()
426 layout->addWidget( mComboQuote, 3, 0 ); 435 layout->addWidget( mComboQuote, 3, 0 );
427 436 mComboCodec = new QComboBox( false, page );
437 mComboCodec->insertItem( i18n( "UTF8" ), 0 );
438 mComboCodec->insertItem( i18n( "LATIN1" ), 1 );
439 mComboCodec->insertItem( i18n( "LOCALE" ), 2 );
440 layout->addWidget( mComboCodec, 3, 2 );
428 label = new QLabel( i18n( "Start at line:" ), page ); 441 label = new QLabel( i18n( "Start at line:" ), page );
@@ -432,2 +445,4 @@ void CSVImportDialog::initGUI()
432 layout->addWidget( label, 2, 0 ); 445 layout->addWidget( label, 2, 0 );
446 label = new QLabel( i18n( "Codec:" ), page );
447 layout->addWidget( label, 2, 2 );
433 448
@@ -435,3 +450,3 @@ void CSVImportDialog::initGUI()
435 mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); 450 mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) );
436 layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 1 ); 451 layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 );
437 452
@@ -440,3 +455,3 @@ void CSVImportDialog::initGUI()
440 //mTable->horizontalHeader()->hide(); 455 //mTable->horizontalHeader()->hide();
441 layout->addMultiCellWidget( mTable, 5, 5, 0, 1 ); 456 layout->addMultiCellWidget( mTable, 5, 5, 0, 2 );
442/*US 457/*US
@@ -452,3 +467,3 @@ void CSVImportDialog::initGUI()
452#ifdef DESKTOP_VERSION 467#ifdef DESKTOP_VERSION
453 resize( 500, 300 ); 468 resize( 640, 480 );
454#else 469#else
@@ -485,6 +500,19 @@ void CSVImportDialog::fillTable()
485 row = column = 1; 500 row = column = 1;
486 mData = QString( mFileArray ); 501 if ( mComboCodec->currentItem () == 0 ) {
502 mData = QString::fromUtf8( mFileArray.data() );
503 } else if ( mComboCodec->currentItem () == 1 ) {
504 mData = QString::fromLatin1( mFileArray.data() );
505 } else {
506 mData = QString::fromLocal8Bit( mFileArray.data() );
507 }
487 508
488 QTextStream inputStream( mData, IO_ReadOnly ); 509 QTextStream inputStream( mData, IO_ReadOnly );
510
511 if ( mComboCodec->currentItem () == 0 ) {
512 inputStream.setEncoding( QTextStream::UnicodeUTF8 );
513 } else if ( mComboCodec->currentItem () == 1 ) {
514 inputStream.setEncoding( QTextStream::Latin1 );
515 } else {
489 inputStream.setEncoding( QTextStream::Locale ); 516 inputStream.setEncoding( QTextStream::Locale );
517 }
490 518
@@ -610,5 +638,10 @@ void CSVImportDialog::fillTable()
610 QStringList keys; 638 QStringList keys;
639 uint iii = 0, count = mTypeMap.count();
640 while ( iii < count ) {
641 keys << "dummy";
642 ++iii;
643 }
611 QMap<QString, uint>::ConstIterator it; 644 QMap<QString, uint>::ConstIterator it;
612 for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it) 645 for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it)
613 keys << it.key(); 646 keys[( it.data() )] = it.key();
614//US end 647//US end
@@ -684,2 +717,6 @@ void CSVImportDialog::textChanged ( const QString& )
684} 717}
718void CSVImportDialog::codecChanged ( const QString& )
719{
720 fillTable();
721}
685 722
@@ -756,3 +793,3 @@ void CSVImportDialog::applyTemplate()
756 { 793 {
757 qDebug("for "); 794
758//US KSimpleConfig config( *it, true ); 795//US KSimpleConfig config( *it, true );
@@ -767,3 +804,3 @@ void CSVImportDialog::applyTemplate()
767 } 804 }
768 qDebug("weiter "); 805
769 // let the user chose, what to take 806 // let the user chose, what to take
@@ -772,3 +809,3 @@ void CSVImportDialog::applyTemplate()
772 tmp = QInputDialog::getItem( i18n( "Template Selection" ), 809 tmp = QInputDialog::getItem( i18n( "Template Selection" ),
773 i18n( "Please select a template, that matches the CSV file." ), 810 i18n( "Please select a template\nthat matches the CSV file." ),
774 templates, 0, false, &ok, this ); 811 templates, 0, false, &ok, this );
@@ -862,2 +899,4 @@ uint CSVImportDialog::posToType( int pos ) const
862{ 899{
900 return pos;
901#if 0
863 uint counter = 0; 902 uint counter = 0;
@@ -869,2 +908,3 @@ uint CSVImportDialog::posToType( int pos ) const
869 return 0; 908 return 0;
909#endif
870} 910}
@@ -873,2 +913,4 @@ int CSVImportDialog::typeToPos( uint type ) const
873{ 913{
914 return type;
915#if 0
874 uint counter = 0; 916 uint counter = 0;
@@ -880,2 +922,3 @@ int CSVImportDialog::typeToPos( uint type ) const
880 return -1; 922 return -1;
923#endif
881} 924}
diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h
index 545b5f9..5f55ab2 100644
--- a/kaddressbook/xxport/csvimportdialog.h
+++ b/kaddressbook/xxport/csvimportdialog.h
@@ -70,2 +70,3 @@ class CSVImportDialog : public KDialogBase
70 void urlChanged( const QString& ); 70 void urlChanged( const QString& );
71 void codecChanged ( const QString& );
71 72
@@ -83,3 +84,3 @@ class CSVImportDialog : public KDialogBase
83 HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, CarPhone, 84 HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, CarPhone,
84 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL 85 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories
85 }; 86 };
@@ -96,2 +97,3 @@ class CSVImportDialog : public KDialogBase
96 QComboBox* mComboQuote; 97 QComboBox* mComboQuote;
98 QComboBox* mComboCodec;
97 QCheckBox* mIgnoreDuplicates; 99 QCheckBox* mIgnoreDuplicates;
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp
index 3f47425..6be1580 100644
--- a/microkde/kfiledialog.cpp
+++ b/microkde/kfiledialog.cpp
@@ -28,2 +28,5 @@ QString KFileDialog::getSaveFileName( const QString & fn,
28 dia.showMaximized(); 28 dia.showMaximized();
29 if ( cap.isEmpty() )
30 dia.setCaption( file );
31 else
29 dia.setCaption( cap ); 32 dia.setCaption( cap );
diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp
index 6d39308..991c8be 100644
--- a/microkde/kio/kfile/kurlrequester.cpp
+++ b/microkde/kio/kfile/kurlrequester.cpp
@@ -274,3 +274,3 @@ void KURLRequester::slotOpenDialog()
274 QString fn = d->edit->text(); 274 QString fn = d->edit->text();
275 fn = KFileDialog::getSaveFileName( fn, "Save backup filename", this ); 275 fn = KFileDialog::getSaveFileName( fn, "", this );
276 276