-rw-r--r-- | kabc/addressee.cpp | 62 | ||||
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 56 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 15 | ||||
-rw-r--r-- | kaddressbook/nameeditdialog.cpp | 7 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/genericwrapper.cpp | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 8 | ||||
-rw-r--r-- | libkdepim/addresseeview.cpp | 10 | ||||
-rw-r--r-- | libkdepim/kdateedit.cpp | 17 | ||||
-rw-r--r-- | libkdepim/kdateedit.h | 3 | ||||
-rw-r--r-- | microkde/kdeui/kaction.cpp | 44 |
10 files changed, 144 insertions, 80 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 6b282e2..4cdd5e5 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -803,31 +803,35 @@ void Addressee::setNameFromString( const QString &str ) | |||
803 | 803 | ||
804 | QStringList titles; | 804 | static bool first = true; |
805 | titles += i18n( "Dr." ); | 805 | static QStringList titles; |
806 | titles += i18n( "Miss" ); | 806 | static QStringList suffixes; |
807 | titles += i18n( "Mr." ); | 807 | static QStringList prefixes; |
808 | titles += i18n( "Mrs." ); | 808 | |
809 | titles += i18n( "Ms." ); | 809 | if ( first ) { |
810 | titles += i18n( "Prof." ); | 810 | first = false; |
811 | 811 | titles += i18n( "Dr." ); | |
812 | QStringList suffixes; | 812 | titles += i18n( "Miss" ); |
813 | suffixes += i18n( "I" ); | 813 | titles += i18n( "Mr." ); |
814 | suffixes += i18n( "II" ); | 814 | titles += i18n( "Mrs." ); |
815 | suffixes += i18n( "III" ); | 815 | titles += i18n( "Ms." ); |
816 | suffixes += i18n( "Jr." ); | 816 | titles += i18n( "Prof." ); |
817 | suffixes += i18n( "Sr." ); | 817 | |
818 | 818 | suffixes += i18n( "I" ); | |
819 | QStringList prefixes; | 819 | suffixes += i18n( "II" ); |
820 | prefixes += "van"; | 820 | suffixes += i18n( "III" ); |
821 | prefixes += "von"; | 821 | suffixes += i18n( "Jr." ); |
822 | prefixes += "de"; | 822 | suffixes += i18n( "Sr." ); |
823 | 823 | ||
824 | //US KConfig config( "kabcrc" ); | 824 | prefixes += "van"; |
825 | KConfig config( locateLocal( "config", "kabcrc") ); | 825 | prefixes += "von"; |
826 | config.setGroup( "General" ); | 826 | prefixes += "de"; |
827 | titles += config.readListEntry( "Prefixes" ); | 827 | |
828 | titles.remove( "" ); | 828 | KConfig config( locateLocal( "config", "kabcrc") ); |
829 | prefixes += config.readListEntry( "Inclusions" ); | 829 | config.setGroup( "General" ); |
830 | prefixes.remove( "" ); | 830 | titles += config.readListEntry( "Prefixes" ); |
831 | suffixes += config.readListEntry( "Suffixes" ); | 831 | titles.remove( "" ); |
832 | suffixes.remove( "" ); | 832 | prefixes += config.readListEntry( "Inclusions" ); |
833 | prefixes.remove( "" ); | ||
834 | suffixes += config.readListEntry( "Suffixes" ); | ||
835 | suffixes.remove( "" ); | ||
836 | } | ||
833 | 837 | ||
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 3cfc1f2..826c69b 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp | |||
@@ -89,3 +89,2 @@ AddresseeEditorWidget::AddresseeEditorWidget( KABCore *core, bool isExtension, | |||
89 | 89 | ||
90 | kdDebug(5720) << "AddresseeEditorWidget()" << endl; | ||
91 | mFormattedNameType = NameEditDialog::CustomName; | 90 | mFormattedNameType = NameEditDialog::CustomName; |
@@ -634,2 +633,3 @@ void AddresseeEditorWidget::setupTab2() | |||
634 | mBirthdayPicker = new KDateEdit( tab2 ); | 633 | mBirthdayPicker = new KDateEdit( tab2 ); |
634 | mBirthdayPicker->toggleDateFormat(); | ||
635 | mBirthdayPicker->setHandleInvalid( true ); | 635 | mBirthdayPicker->setHandleInvalid( true ); |
@@ -949,3 +949,2 @@ void AddresseeEditorWidget::load() | |||
949 | { | 949 | { |
950 | kdDebug(5720) << "AddresseeEditorWidget::load()" << endl; | ||
951 | 950 | ||
@@ -1030,3 +1029,5 @@ void AddresseeEditorWidget::save() | |||
1030 | { | 1029 | { |
1031 | if ( !mDirty ) return; | 1030 | if ( !dirty() ) { |
1031 | return; | ||
1032 | } | ||
1032 | 1033 | ||
@@ -1036,7 +1037,13 @@ void AddresseeEditorWidget::save() | |||
1036 | mAddressee.setNote( mNoteEdit->text() ); | 1037 | mAddressee.setNote( mNoteEdit->text() ); |
1037 | if ( mBirthdayPicker->inputIsValid() ) | 1038 | if ( mBirthdayPicker->inputIsValid() ) { |
1038 | mAddressee.setBirthday( QDateTime( mBirthdayPicker->date() ) ); | 1039 | QDate da = mBirthdayPicker->date(); |
1039 | else | 1040 | if ( da > QDate::currentDate() ) |
1041 | da.setYMD(da.year()-100, da.month(), da.day() ); | ||
1042 | mAddressee.setBirthday( QDateTime( da ) ); | ||
1043 | qDebug("bday %s ",da.toString().latin1()); | ||
1044 | } | ||
1045 | else { | ||
1040 | mAddressee.setBirthday( QDateTime() ); | 1046 | mAddressee.setBirthday( QDateTime() ); |
1041 | 1047 | mBirthdayPicker->clear(); | |
1048 | } | ||
1042 | mAddressee.setNickName( mNicknameEdit->text() ); | 1049 | mAddressee.setNickName( mNicknameEdit->text() ); |
@@ -1064,5 +1071,2 @@ void AddresseeEditorWidget::save() | |||
1064 | if ( mAnniversaryPicker->inputIsValid() ) { | 1071 | if ( mAnniversaryPicker->inputIsValid() ) { |
1065 | |||
1066 | //US mAddressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", | ||
1067 | //US mAnniversaryPicker->date().toString( Qt::ISODate ) ); | ||
1068 | QString dt = KGlobal::locale()->formatDate(mAnniversaryPicker->date(), true, KLocale::ISODate); | 1072 | QString dt = KGlobal::locale()->formatDate(mAnniversaryPicker->date(), true, KLocale::ISODate); |
@@ -1070,4 +1074,6 @@ void AddresseeEditorWidget::save() | |||
1070 | } | 1074 | } |
1071 | else | 1075 | else { |
1072 | mAddressee.removeCustom( "KADDRESSBOOK", "X-Anniversary" ); | 1076 | mAddressee.removeCustom( "KADDRESSBOOK", "X-Anniversary" ); |
1077 | mAnniversaryPicker->clear(); | ||
1078 | } | ||
1073 | 1079 | ||
@@ -1116,2 +1122,22 @@ bool AddresseeEditorWidget::dirty() | |||
1116 | { | 1122 | { |
1123 | |||
1124 | if ( ! mDirty ) { | ||
1125 | if ( mBirthdayPicker->inputIsValid() ) { | ||
1126 | QDate da = mBirthdayPicker->date(); | ||
1127 | if ( !(da == mAddressee.birthday().date())) | ||
1128 | mDirty = true; | ||
1129 | } | ||
1130 | else { | ||
1131 | mBirthdayPicker->clear(); | ||
1132 | } | ||
1133 | if ( mAnniversaryPicker->inputIsValid() ) { | ||
1134 | QDate da = mAnniversaryPicker->date(); | ||
1135 | if ( da != KGlobal::locale()->readDate( mAddressee.custom("KADDRESSBOOK", "X-Anniversary" ), | ||
1136 | "%Y-%m-%d")) | ||
1137 | mDirty = true; | ||
1138 | } | ||
1139 | else { | ||
1140 | mAnniversaryPicker->clear(); | ||
1141 | } | ||
1142 | } | ||
1117 | return mDirty; | 1143 | return mDirty; |
@@ -1125,5 +1151,5 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text ) | |||
1125 | if ( !mAddressee.formattedName().isEmpty() ) { | 1151 | if ( !mAddressee.formattedName().isEmpty() ) { |
1126 | QString fn = mAddressee.formattedName(); | 1152 | QString fn = mAddressee.formattedName(); |
1127 | mAddressee.setNameFromString( text ); | 1153 | mAddressee.setNameFromString( text ); |
1128 | mAddressee.setFormattedName( fn ); | 1154 | mAddressee.setFormattedName( fn ); |
1129 | } else { | 1155 | } else { |
@@ -1171,3 +1197,3 @@ void AddresseeEditorWidget::nameButtonClicked() | |||
1171 | 1197 | ||
1172 | if ( dialog.exec() ) { | 1198 | if ( KApplication::execDialog( &dialog) ) { |
1173 | if ( dialog.changed() ) { | 1199 | if ( dialog.changed() ) { |
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index d781f67..4230c07 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -73,2 +73,17 @@ int main( int argc, char **argv ) | |||
73 | 73 | ||
74 | { | ||
75 | KConfig kon ( locateLocal( "config", "korganizerrc" ) ); | ||
76 | kon.setGroup("Locale"); | ||
77 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); | ||
78 | QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); | ||
79 | KGlobal::locale()->setHore24Format( !kon.readBoolEntry( "PreferredTime",0 ) ); | ||
80 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | ||
81 | dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); | ||
82 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | ||
83 | kon.setGroup("Time & Date"); | ||
84 | KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), | ||
85 | kon.readNumEntry( "DaylightsavingStart", 90), | ||
86 | kon.readNumEntry( "DaylightsavingEnd",304) ); | ||
87 | KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); | ||
88 | } | ||
74 | #ifndef DESKTOP_VERSION | 89 | #ifndef DESKTOP_VERSION |
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index fb7eb22..8213c2b 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp | |||
@@ -111,3 +111,3 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, | |||
111 | connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( modified() ) ); | 111 | connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( modified() ) ); |
112 | layout->addMultiCellWidget( mParseBox, 6, 6, 0, 1 ); | 112 | layout->addMultiCellWidget( mParseBox, 6, 6, 0, 2 ); |
113 | 113 | ||
@@ -177,6 +177,3 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, | |||
177 | 177 | ||
178 | #ifdef KAB_EMBEDDED | 178 | |
179 | resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); | ||
180 | #endif //KAB_EMBEDDED | ||
181 | |||
182 | mChanged = false; | 179 | mChanged = false; |
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp index ed591fc..c3a1627 100644 --- a/kmicromail/libmailwrapper/genericwrapper.cpp +++ b/kmicromail/libmailwrapper/genericwrapper.cpp | |||
@@ -39,2 +39,4 @@ QString Genericwrapper::parseDateTime( mailimf_date_time *date ) | |||
39 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 39 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
40 | dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); | ||
41 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | ||
40 | kon.setGroup("Time & Date"); | 42 | kon.setGroup("Time & Date"); |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index d5d31e2..258bd43 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1262,5 +1262,7 @@ void CalendarView::syncExternal( int mode ) | |||
1262 | Incidence* inc = iL.first(); | 1262 | Incidence* inc = iL.first(); |
1263 | while ( inc ) { | 1263 | if ( phoneFormat ) { |
1264 | inc->removeID(mCurrentSyncDevice); | 1264 | while ( inc ) { |
1265 | inc = iL.next(); | 1265 | inc->removeID(mCurrentSyncDevice); |
1266 | inc = iL.next(); | ||
1267 | } | ||
1266 | } | 1268 | } |
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index d710541..5c69010 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp | |||
@@ -67,3 +67,3 @@ void AddresseeView::setSource(const QString& n) | |||
67 | { | 67 | { |
68 | qDebug("********AddresseeView::setSource %s", n.latin1()); | 68 | //qDebug("********AddresseeView::setSource %s", n.latin1()); |
69 | 69 | ||
@@ -126,3 +126,9 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) | |||
126 | } | 126 | } |
127 | 127 | if ( mAddressee.birthday().date().isValid() ) { | |
128 | dynamicPart += QString( | ||
129 | "<tr><td align=\"right\"><b>%1</b></td>" | ||
130 | "<td align=\"left\">%2</td></tr>" ) | ||
131 | .arg( i18n ("Birthday") ) | ||
132 | .arg( KGlobal::locale()->formatDate( mAddressee.birthday().date() ,true) ); | ||
133 | } | ||
128 | KABC::PhoneNumber::List phones = mAddressee.phoneNumbers(); | 134 | KABC::PhoneNumber::List phones = mAddressee.phoneNumbers(); |
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp index 5fb948a..c4c0081 100644 --- a/libkdepim/kdateedit.cpp +++ b/libkdepim/kdateedit.cpp | |||
@@ -126,3 +126,9 @@ KDateEdit::~KDateEdit() | |||
126 | } | 126 | } |
127 | 127 | void KDateEdit::clear() | |
128 | { | ||
129 | bool b = mDateEdit->signalsBlocked(); | ||
130 | mDateEdit->blockSignals(true); | ||
131 | mDateEdit->setText(""); | ||
132 | mDateEdit->blockSignals(b); | ||
133 | } | ||
128 | void KDateEdit::setDate(QDate newDate) | 134 | void KDateEdit::setDate(QDate newDate) |
@@ -465,4 +471,3 @@ bool KDateEdit::eventFilter(QObject *, QEvent *e) | |||
465 | { | 471 | { |
466 | dateFormShort = dateFormShort?false:true; | 472 | toggleDateFormat(); |
467 | mDateEdit->setText(KGlobal::locale()->formatDate(readDate(),dateFormShort)); | ||
468 | } | 473 | } |
@@ -475,2 +480,8 @@ bool KDateEdit::eventFilter(QObject *, QEvent *e) | |||
475 | } | 480 | } |
481 | void KDateEdit::toggleDateFormat() | ||
482 | { | ||
483 | dateFormShort = ! dateFormShort; | ||
484 | mDateEdit->setText(KGlobal::locale()->formatDate(readDate(),dateFormShort)); | ||
485 | |||
486 | } | ||
476 | 487 | ||
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h index 742d843..cf3b90a 100644 --- a/libkdepim/kdateedit.h +++ b/libkdepim/kdateedit.h | |||
@@ -80,3 +80,4 @@ class KDateEdit : public QHBox | |||
80 | virtual bool eventFilter(QObject *o, QEvent *e); | 80 | virtual bool eventFilter(QObject *o, QEvent *e); |
81 | 81 | void toggleDateFormat(); | |
82 | void clear(); | ||
82 | signals: | 83 | signals: |
diff --git a/microkde/kdeui/kaction.cpp b/microkde/kdeui/kaction.cpp index 77d36a5..d38a6d5 100644 --- a/microkde/kdeui/kaction.cpp +++ b/microkde/kdeui/kaction.cpp | |||
@@ -214,3 +214,2 @@ KAction::~KAction() | |||
214 | { | 214 | { |
215 | kdDebug(129) << "KAction::~KAction( this = \"" << name() << "\" )" << endl; // -- ellis | ||
216 | #ifndef KDE_NO_COMPAT | 215 | #ifndef KDE_NO_COMPAT |
@@ -437,3 +436,4 @@ bool KAction::updateKAccelShortcut( KAccel* kaccel ) | |||
437 | { | 436 | { |
438 | qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); | 437 | //qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); |
438 | |||
439 | // Check if action is permitted | 439 | // Check if action is permitted |
@@ -464,3 +464,4 @@ void KAction::insertKAccel( KAccel* kaccel ) | |||
464 | { | 464 | { |
465 | qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); | 465 | //qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); |
466 | |||
466 | /*US | 467 | /*US |
@@ -480,3 +481,4 @@ void KAction::removeKAccel( KAccel* kaccel ) | |||
480 | { | 481 | { |
481 | qDebug("KAction::removeKAccel~ ...1 has top be fixed"); | 482 | // qDebug("KAction::removeKAccel~ ...1 has top be fixed"); |
483 | |||
482 | /*US | 484 | /*US |
@@ -513,3 +515,4 @@ void KAction::updateShortcut( int i ) | |||
513 | //US (QMenuBar*)(w)->setAccel( d->m_cut.keyCodeQt(), id ); | 515 | //US (QMenuBar*)(w)->setAccel( d->m_cut.keyCodeQt(), id ); |
514 | qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed"); | 516 | |
517 | ; //qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed"); | ||
515 | 518 | ||
@@ -541,3 +544,5 @@ void KAction::updateShortcut( QPopupMenu* menu, int id ) | |||
541 | */ | 544 | */ |
542 | qDebug("KAction::updateShortcut( QPopupMenu* menu, int id ) ...1 has top be fixed"); | 545 | |
546 | |||
547 | //qDebug("KAction::updateShortcut( QPopupMenu* menu, int id ) ...1 has top be fixed"); | ||
543 | 548 | ||
@@ -567,3 +572,3 @@ int KAction::accel() const | |||
567 | { | 572 | { |
568 | qDebug("KAction::accel() ...1 has top be fixed"); | 573 | // qDebug("KAction::accel() ...1 has top be fixed"); |
569 | //US return d->m_cut.keyCodeQt(); | 574 | //US return d->m_cut.keyCodeQt(); |
@@ -603,3 +608,3 @@ void KAction::setToolTip( const QString& tt ) | |||
603 | { | 608 | { |
604 | qDebug("KAction::setToolTip ...1 has top be fixed"); | 609 | //qDebug("KAction::setToolTip ...1 has top be fixed"); |
605 | d->setToolTip( tt ); | 610 | d->setToolTip( tt ); |
@@ -613,3 +618,3 @@ void KAction::updateToolTip( int i ) | |||
613 | { | 618 | { |
614 | qDebug("KAction::updateToolTip ...1 has top be fixed"); | 619 | //qDebug("KAction::updateToolTip ...1 has top be fixed"); |
615 | QWidget *w = container( i ); | 620 | QWidget *w = container( i ); |
@@ -635,10 +640,3 @@ int KAction::plug( QWidget *w, int index ) | |||
635 | 640 | ||
636 | #ifndef NDEBUG | 641 | |
637 | KAccel* kaccel = kaccelCurrent(); | ||
638 | // If there is a shortcut, but no KAccel available | ||
639 | if( !d->m_cut.isNull() && kaccel == 0 ) { | ||
640 | kdWarning(129) << "KAction::plug(): has no KAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis | ||
641 | //US kdDebug(129) << kdBacktrace() << endl; | ||
642 | } | ||
643 | #endif | ||
644 | 642 | ||
@@ -777,3 +775,4 @@ void KAction::plugAccel(KAccel *kacc, bool configurable) | |||
777 | { | 775 | { |
778 | qDebug("KAction::plugAccel ...1 has top be fixed"); | 776 | // qDebug("KAction::plugAccel ...1 has top be fixed"); |
777 | |||
779 | /*US | 778 | /*US |
@@ -808,3 +807,3 @@ void KAction::unplugAccel() | |||
808 | { | 807 | { |
809 | qDebug("KAction::unplugAccel ...1 has top be fixed"); | 808 | // qDebug("KAction::unplugAccel ...1 has top be fixed"); |
810 | /*US | 809 | /*US |
@@ -821,3 +820,4 @@ void KAction::plugMainWindowAccel( QWidget *w ) | |||
821 | { | 820 | { |
822 | qDebug("KAction::plugMainWindowAccel ...1 has top be fixed"); | 821 | // qDebug("KAction::plugMainWindowAccel ...1 has top be fixed"); |
822 | |||
823 | /*US | 823 | /*US |
@@ -917,3 +917,3 @@ void KAction::updateText( int i ) | |||
917 | { | 917 | { |
918 | qDebug("KAction::updateText ...3 has top be fixed"); | 918 | //qDebug("KAction::updateText ...3 has top be fixed"); |
919 | QWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) ); | 919 | QWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) ); |
@@ -1120,3 +1120,3 @@ void KAction::slotDestroyed() | |||
1120 | { | 1120 | { |
1121 | kdDebug(129) << "KAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; | 1121 | |
1122 | const QObject* o = sender(); | 1122 | const QObject* o = sender(); |