-rw-r--r-- | bin/kdepim/WhatsNew.txt | 14 | ||||
-rw-r--r-- | kabc/addressee.cpp | 2 | ||||
-rw-r--r-- | kabc/picture.cpp | 38 | ||||
-rw-r--r-- | kabc/vcard/ContentLine.cpp | 30 | ||||
-rw-r--r-- | kabc/vcard/VCardv.cpp | 77 | ||||
-rw-r--r-- | kaddressbook/details/detailsviewcontainer.cpp | 11 | ||||
-rw-r--r-- | kaddressbook/details/detailsviewcontainer.h | 1 | ||||
-rw-r--r-- | kaddressbook/imagewidget.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 9 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 9 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 1 | ||||
-rw-r--r-- | kde2file/abdump/main.cpp | 2 | ||||
-rw-r--r-- | kde2file/caldump/main.cpp | 2 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 16 | ||||
-rw-r--r-- | version | 2 |
15 files changed, 133 insertions, 88 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 2fd63e7..ff87423 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,16 +1,30 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 1.9.17 ************ KO/Pi: Fixed that tooltips were not updated after moving an item in agenda view. +Fixed a bug in sorting start date for recurring events in list view. KA/Pi: All fields search does now actually search all the (possible) fields, not only those listed in the contact list. +Made is possible to inline a picture in a vcard on the Z. +This was only possible on the desktop, now is it possible on the Z as well. +Fixed of missing save settings after filter configuration. +Made saving of addressbook much faster. + +QWhatsThis was not working on the Z ( only black rectangle was shown). +This is Fixed. + +KDE-Sync: +Now readonly KDE resources are synced as well. +(They are not changed in KDE itself, of course). + + ********** VERSION 1.9.16 ************ KO/Pi: Fixed search dialog size on Z 6000 (480x640 display). Added setting to hide/show time in agenda items. diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 3ce733d..568dfc4 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -1680,12 +1680,13 @@ QString Addressee::asString() const return "Smith, agent Smith..."; } void Addressee::dump() const { return; +#if 0 kdDebug(5700) << "Addressee {" << endl; kdDebug(5700) << " Uid: '" << uid() << "'" << endl; kdDebug(5700) << " Name: '" << name() << "'" << endl; kdDebug(5700) << " FormattedName: '" << formattedName() << "'" << endl; @@ -1743,12 +1744,13 @@ void Addressee::dump() const " Key: " << (*it4).textData() << " CustomString: " << (*it4).customTypeString() << endl; } kdDebug(5700) << " }" << endl; kdDebug(5700) << "}" << endl; +#endif } void Addressee::insertAddress( const Address &address ) { detach(); diff --git a/kabc/picture.cpp b/kabc/picture.cpp index 6a34b98..57aa297 100644 --- a/kabc/picture.cpp +++ b/kabc/picture.cpp @@ -50,22 +50,48 @@ Picture::Picture( const QImage &data ) Picture::~Picture() { } bool Picture::operator==( const Picture &p ) const { - if ( mIntern != p.mIntern ) return false; - + //qDebug("compare PIC "); + if ( mUndefined && p.mUndefined ) { + //qDebug("compare PIC true 1 "); + return true; + } + if ( mUndefined || p.mUndefined ) { + //qDebug("compare PIC false 1"); + return false; + } + // now we should deal with two defined pics! + if ( mIntern != p.mIntern ) { + //qDebug("compare PIC false 2"); + return false; + } if ( mIntern ) { - if ( mData != p.mData ) + //qDebug("mIntern "); + if ( mData.isNull() && p.mData.isNull() ) { + //qDebug("compare PIC true 2 "); + return true; + } + if ( mData.isNull() || p.mData.isNull() ){ + //qDebug("compare PIC false 3-1"); + + return false; + } + if ( mData != p.mData ) { + //qDebug("compare PIC false 3"); return false; + } } else { - if ( mUrl != p.mUrl ) - return false; + if ( mUrl != p.mUrl ) { + //qDebug("compare PIC false 4"); + return false; + } } - + //qDebug("compare PIC true "); return true; } bool Picture::operator!=( const Picture &p ) const { return !( p == *this ); diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index c368172..2f88cde 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp @@ -270,12 +270,39 @@ ContentLine::_parse() *value_ = valuePart; } void ContentLine::_assemble() { + //strRep_.truncate(0); + QString line; + if (!group_.isEmpty()) + line = group_ + '.'; + line += name_; + ParamListIterator it(paramList_); + for (; it.current(); ++it) + line += ";" + it.current()->asString(); + + if (value_ != 0) + line += ":" + value_->asString(); + + line = line.replace( QRegExp( "\n" ), "\\n" ); + + // Fold lines longer than 72 chars + const int maxLen = 72; + uint cursor = 0; + QString cut; + while( line.length() > ( cursor + 1 ) * maxLen ) { + cut += line.mid( cursor * maxLen, maxLen ); + cut += "\r\n "; + ++cursor; + } + cut += line.mid( cursor * maxLen ); + strRep_ = cut.latin1(); + //qDebug("ContentLine::_assemble()\n%s*****", strRep_.data()); +#if 0 vDebug("Assemble (argl) - my name is \"" + name_ + "\""); strRep_.truncate(0); QCString line; if (!group_.isEmpty()) @@ -304,13 +331,14 @@ ContentLine::_assemble() while( line.length() > ( cursor + 1 ) * maxLen ) { strRep_ += line.mid( cursor * maxLen, maxLen ); strRep_ += "\r\n "; ++cursor; } strRep_ += line.mid( cursor * maxLen ); - //qDebug("ContentLine::_assemble()\n%s*****", strRep_.data()); + qDebug("ContentLine::_assemble()\n%s*****", strRep_.data()); +#endif } void ContentLine::clear() { group_.truncate(0); diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp index bc80707..49bfe43 100644 --- a/kabc/vcard/VCardv.cpp +++ b/kabc/vcard/VCardv.cpp @@ -20,12 +20,15 @@ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <qcstring.h> #include <qstrlist.h> +#include <qstringlist.h> +#include <qstring.h> +#include <qvaluelist.h> #include <VCardEntity.h> #include <VCardVCard.h> #include <VCardContentLine.h> #include <VCardRToken.h> @@ -93,120 +96,111 @@ VCard::~VCard() { } void VCard::_parse() { - vDebug("parse() called"); - QStrList l; + + QStringList l; + QStrList sl; - RTokenise(strRep_, "\r\n", l); + RTokenise(strRep_, "\r\n", sl); - if (l.count() < 3) { // Invalid VCARD ! - vDebug("Invalid vcard"); + if (sl.count() < 3) { // Invalid VCARD ! + //qDebug("invalid vcard "); return; } - + l = QStringList::fromStrList( sl ); // Get the first line - QCString beginLine = QCString(l.at(0)).stripWhiteSpace(); - - vDebug("Begin line == \"" + beginLine + "\""); + QString beginLine = l[0].stripWhiteSpace(); // Remove extra blank lines - while (QCString(l.last()).isEmpty()) + while (l.last().isEmpty()) l.remove(l.last()); // Now we know this is the last line - QCString endLine = l.last(); + QString endLine = l.last(); // Trash the first and last lines as we have seen them. - l.remove(0u); + l.remove(l.first()); l.remove(l.last()); /////////////////////////////////////////////////////////////// // FIRST LINE int split = beginLine.find(':'); if (split == -1) { // invalid, no BEGIN vDebug("No split"); return; } - QCString firstPart(beginLine.left(split)); - QCString valuePart(beginLine.mid(split + 1)); + QString firstPart(beginLine.left(split)); + QString valuePart(beginLine.mid(split + 1)); split = firstPart.find('.'); if (split != -1) { group_ = firstPart.left(split); firstPart = firstPart.right(firstPart.length() - split - 1); } - if (qstrnicmp(firstPart, "BEGIN", 5) != 0) { // No BEGIN ! - vDebug("No BEGIN"); + if (firstPart.left(5) != "BEGIN" ) { // No BEGIN ! + qDebug("no BEGIN in vcard "); return; } - if (qstrnicmp(valuePart, "VCARD", 5) != 0) { // Not a vcard ! - vDebug("No VCARD"); + if (valuePart.left(5) != "VCARD") { // Not a vcard ! + qDebug("not a VCARD "); return; } /////////////////////////////////////////////////////////////// // CONTENT LINES // vDebug("Content lines"); // Handle folded lines. - QStrList refolded; - - QStrListIterator it(l); + QStringList refolded; - QCString cur; - for (; it.current(); ++it) { + QStringList::Iterator it = l.begin(); - cur = it.current(); + QString cur; + for (; it != l.end(); ++it) { + cur = (*it); ++it; - - while ( - it.current() && - it.current()[0] == ' ' && - strlen(it.current()) != 1) - { - cur += it.current() + 1; + while ( it!= l.end() && (*it).at(0) == ' ' && (*it).length()!= 1) { + cur += (*it) ; ++it; } - --it; - refolded.append(cur); } - - QStrListIterator it2(refolded); - - for (; it2.current(); ++it2) { - vDebug("New contentline using \"" + QCString(it2.current()) + "\""); - ContentLine * cl = new ContentLine(it2.current()); - + QStringList::Iterator it2 = refolded.begin(); + for (; it2 != refolded.end(); ++it2) { + ContentLine * cl = new ContentLine(QCString((*it2).latin1())); cl->parse(); if (cl->value() == 0) { - qDebug("Content line could not be parsed. Discarded: %s", it2.current()); + qDebug("Content line could not be parsed. Discarded: %s", (*it2).latin1()); delete cl; } else contentLineList_.append(cl); } /////////////////////////////////////////////////////////////// // LAST LINE + + // LR: sorry, but the remaining code in this method makes no sense + +#if 0 split = endLine.find(':'); if (split == -1) // invalid, no END return; firstPart = endLine.left(split); @@ -221,12 +215,13 @@ VCard::_parse() if (qstricmp(firstPart, "END") != 0) // No END ! return; if (qstricmp(valuePart, "VCARD") != 0) // Not a vcard ! return; +#endif } void VCard::_assemble() { vDebug("Assembling vcard"); diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp index ceffc77..229cce0 100644 --- a/kaddressbook/details/detailsviewcontainer.cpp +++ b/kaddressbook/details/detailsviewcontainer.cpp @@ -126,28 +126,19 @@ void ViewContainer::slotStyleSelected( int index ) SIGNAL( browse( const QString& ) ) ); } mCurrentLook->restoreSettings( config ); mCurrentLook->setAddressee( addr ); } -void ViewContainer::refreshView() -{ - if ( mCurrentLook ) { - mCurrentLook->setAddressee( mCurrentAddressee ); - } -} void ViewContainer::setAddressee( const KABC::Addressee& addressee ) { if ( mCurrentLook != 0 ) { - if ( addressee == mCurrentAddressee ) - return; - else { mCurrentAddressee = addressee; mCurrentLook->setAddressee( mCurrentAddressee ); - } + } } KABC::Addressee ViewContainer::addressee() { static KABC::Addressee empty; // do not use! diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h index b561d12..667f0cb 100644 --- a/kaddressbook/details/detailsviewcontainer.h +++ b/kaddressbook/details/detailsviewcontainer.h @@ -42,13 +42,12 @@ class ViewContainer : public QWidget Return the look currently selected. If there is none, it returns zero. Do not use this pointer to store a reference to a look, the user might select another one (e.g., create a new object) at any time. */ KABBasicLook *currentLook(); - void refreshView(); /** Return the contact currently displayed. */ KABC::Addressee addressee(); public slots: diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index 49d456b..48370e3 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -128,16 +128,12 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) SIGNAL( changed() ) ); #ifndef KAB_EMBEDDED KAcceleratorManager::manage( this ); #endif //KAB_EMBEDDED -#ifndef DESKTOP_VERSION - mUsePhotoUrl->setChecked( true ); - mUseLogoUrl->setChecked( true ); -#endif } ImageWidget::~ImageWidget() { } @@ -257,18 +253,17 @@ void ImageWidget::loadLogo() } void ImageWidget::updateGUI() { KURLRequester *ptr = (KURLRequester*)sender(); -#ifdef DESKTOP_VERSION + if ( ptr == mPhotoUrl ) mUsePhotoUrl->setEnabled( true ); else if ( ptr == mLogoUrl ) mUseLogoUrl->setEnabled( true ); -#endif } QPixmap ImageWidget::loadPixmap( const KURL &url ) { QString tempFile; QPixmap pixmap; diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index f6bdda4..e14e579 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1123,27 +1123,24 @@ void KABCore::setModified() void KABCore::setModifiedWOrefresh() { // qDebug("KABCore::setModifiedWOrefresh() "); mModified = true; mActionSave->setEnabled( mModified ); -#ifdef DESKTOP_VERSION - mDetails->refreshView(); -#endif + } void KABCore::setModified( bool modified ) { mModified = modified; mActionSave->setEnabled( mModified ); if ( modified ) mJumpButtonBar->recreateButtons(); mViewManager->refreshView(); - mDetails->refreshView(); } bool KABCore::modified() const { return mModified; @@ -1163,13 +1160,13 @@ void KABCore::contactModified( const KABC::Addressee &addr ) command = new PwEditCommand( mAddressBook, origAddr, addr ); uid = addr.uid(); } UndoStack::instance()->push( command ); RedoStack::instance()->clear(); - + mDetails->setAddressee( addr ); setModified( true ); } void KABCore::newContact() { @@ -1630,13 +1627,12 @@ void KABCore::addressBookChanged() KMessageBox::information( this, text ); } QString currentuid = mEditorDialog->addressee().uid(); mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); } mViewManager->refreshView(); -// mDetails->refreshView(); } AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, const char *name ) @@ -2286,13 +2282,12 @@ void KABCore::manageCategories( ) (*it).setCategories( newCatList ); mAddressBook->insertAddressee( (*it) ); } } setModified( true ); mViewManager->refreshView(); - mDetails->refreshView(); message( i18n("Removing categories done!")); } delete cp; } void KABCore::removeVoice() { diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index c7c12ff..85ffbdb 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -92,16 +92,13 @@ class KABCore : public QWidget, public KSyncInterface #endif //KAB_EMBEDDED /** Restores the global settings. */ void restoreSettings(); - /** - Saves the global settings. - */ - void saveSettings(); + /** Returns a pointer to the StdAddressBook of the application. */ KABC::AddressBook *addressBook() const; @@ -355,13 +352,15 @@ class KABCore : public QWidget, public KSyncInterface public slots: void recieve(QString cmsg ); void getFile( bool success ); void syncFileRequest(); void setDetailsVisible( bool visible ); void setDetailsToState(); - // void slotSyncMenu( int ); + + void saveSettings(); + private slots: void updateToolBar(); void updateMainWindow(); void receive( const QCString& cmsg, const QByteArray& data ); void toggleBeamReceive( ); void disableBR(bool); diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 33bef5a..59bddd9 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -602,12 +602,13 @@ void ViewManager::configureFilters() mActionSelectFilter->setCurrentItem( pos ); setActiveFilter( pos ); int cw = 150; if (QApplication::desktop()->width() == 480 ) cw = 0; mActionSelectFilter->setComboWidth( cw ); + saveSettings(); } QStringList ViewManager::filterNames() const { QStringList names( i18n( "No Filter" ) ); diff --git a/kde2file/abdump/main.cpp b/kde2file/abdump/main.cpp index 1ee64f5..9ad78e5 100644 --- a/kde2file/abdump/main.cpp +++ b/kde2file/abdump/main.cpp @@ -101,14 +101,12 @@ int main( int argc, char *argv[] ) KABC::AddressBook::Iterator it; KABC::VCardConverter converter; QString datastream; for( it = standardAddressBook->begin(); it != standardAddressBook->end(); ++it ) { if ( (*it).isEmpty() || ! (*it).resource() ) continue; - if ( (*it).resource()->readOnly() ) - continue; KABC::Addressee a = ( *it ); QString vcard = converter.createVCard( a ); vcard += QString("\r\n"); datastream += vcard; } QFile outFile(fileName); diff --git a/kde2file/caldump/main.cpp b/kde2file/caldump/main.cpp index be1735b..08ccafb 100644 --- a/kde2file/caldump/main.cpp +++ b/kde2file/caldump/main.cpp @@ -126,13 +126,13 @@ int main( int argc, char *argv[] ) localCalendar->setTimeZoneId( calendarResource->timeZoneId()); KCal::Incidence::List allInc = calendarResource->rawIncidences(); Incidence::List::ConstIterator it; int num = 0; for( it = allInc.begin(); it != allInc.end(); ++it ) { ResourceCalendar * re = calendarResource->resource( (*it) ); - if ( re && !re->readOnly() ) { + if ( re && /*!re->readOnly() now readonly syncing possible */) { ++num; Incidence* cl = (*it)->clone(); cl->setLastModified( (*it)->lastModified() ); if ( cl->type() == "Journal" ) localCalendar->addJournal( (Journal *) cl ); else if ( cl->type() == "Todo" ) diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 3d4acb7..f8bfc8b 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -74,24 +74,28 @@ ListItemVisitor::~ListItemVisitor() bool ListItemVisitor::visit(Event *e) { bool ok = false; QString start, end; + QDate ds, de; if ( e->doesRecur() ) { - QDate d = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); + ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); if ( ok ) { int days = e->dtStart().date().daysTo(e->dtEnd().date() ); - start = KGlobal::locale()->formatDate(d,true); - end = KGlobal::locale()->formatDate(d.addDays( days),true); + start = KGlobal::locale()->formatDate(ds,true); + de = ds.addDays( days); + end = KGlobal::locale()->formatDate(de,true); } } if ( ! ok ) { start =e->dtStartDateStr(); end = e->dtEndDateStr(); + ds = e->dtStart().date(); + de = e->dtEnd().date(); } mItem->setText(0,e->summary()); mItem->setText(1,start); mItem->setText(2,e->dtStartTimeStr()); mItem->setText(3,end); mItem->setText(4,e->dtEndTimeStr()); @@ -100,20 +104,18 @@ bool ListItemVisitor::visit(Event *e) mItem->setText(7,"---"); mItem->setText(8,"---"); mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); mItem->setText(10,e->categoriesStr()); QString key; - QDate d = e->dtStart().date(); QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); - key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute()); + key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); mItem->setSortKey(1,key); - d = e->dtEnd().date(); t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); - key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute()); + key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); mItem->setSortKey(3,key); return true; } bool ListItemVisitor::visit(Todo *t) @@ -1 +1 @@ -version = "1.9.16"; +version = "1.9.17"; |