summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-29 21:05:07 (UTC)
committer zautrix <zautrix>2004-10-29 21:05:07 (UTC)
commit3c0edb4b4c4a77b334331749dfde776911c3a3a0 (patch) (side-by-side diff)
tree89de7078a1a062c19b2f13ededd49f471c362abf
parenta7e2fe5bb10af47a239b8b014a210568cc79287a (diff)
downloadkdepimpi-3c0edb4b4c4a77b334331749dfde776911c3a3a0.zip
kdepimpi-3c0edb4b4c4a77b334331749dfde776911c3a3a0.tar.gz
kdepimpi-3c0edb4b4c4a77b334331749dfde776911c3a3a0.tar.bz2
KO WN view fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp3
-rw-r--r--kabc/phonenumber.cpp31
-rw-r--r--kabc/plugins/ldap/ldapE.pro2
-rw-r--r--korganizer/kowhatsnextview.cpp42
-rw-r--r--korganizer/kowhatsnextview.h2
5 files changed, 38 insertions, 42 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 028d3bb..eec0f1f 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -326,3 +326,4 @@ void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false)
}
- if ( isSubSet && ! found )
+ // if ( isSubSet && ! found )
+ if ( ! found ) // LR try this one...
mData->phoneNumbers.append( *phoneItAD );
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp
index 3d82553..abb3b3b 100644
--- a/kabc/phonenumber.cpp
+++ b/kabc/phonenumber.cpp
@@ -91,20 +91,15 @@ bool PhoneNumber::contains( const PhoneNumber &p )
{
- QString Number;
- QString Num;
- uint i;
- Number = mNumber.stripWhiteSpace ();
- Num = "";
- for ( i = 0; i < Number.length(); ++i) {
- if ( Number.at(i).isDigit() || Number.at(i) == '+'|| Number.at(i) == '*'|| Number.at(i) == '#' )
- Num += Number.at(i);
- }
- QString NumberR;
- QString NumR;
- NumberR = p.mNumber.stripWhiteSpace ();
- NumR = "";
- for ( i = 0; i < NumberR.length(); ++i) {
- if ( NumberR.at(i).isDigit() || NumberR.at(i) == '+'|| NumberR.at(i) == '*'|| NumberR.at(i) == '#' )
- NumR += NumberR.at(i);
- }
- return (Num == NumR);
+ PhoneNumber myself;
+ PhoneNumber other;
+ myself = *this;
+ other = p;
+ myself.simplifyNumber();
+ other.simplifyNumber();
+ if ( myself.number() != other.number ())
+ return false;
+ myself.simplifyType();
+ other.simplifyType();
+ if ( myself.type() == other.type())
+ return true;
+ return false;
}
diff --git a/kabc/plugins/ldap/ldapE.pro b/kabc/plugins/ldap/ldapE.pro
index df3c94c..57b6f84 100644
--- a/kabc/plugins/ldap/ldapE.pro
+++ b/kabc/plugins/ldap/ldapE.pro
@@ -9,3 +9,3 @@ MOC_DIR = moc/$(PLATFORM)
DESTDIR = $(QPEDIR)/lib
-LIBS += -lmicrokde -lkamicrokabc
+LIBS += -lmicrokde -lmicrokabc
LIBS += -L$(QPEDIR)/lib
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index aa33588..2f7409d 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -72,6 +72,2 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
QStyleSheetItem * style ;
- style = stsh->item ("a" );
- if ( style ) {
- style->setMargin(QStyleSheetItem::MarginAll,0);
- }
style = stsh->item ("h2" );
@@ -84,6 +80,2 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
}
- style = stsh->item ("table" );
- if ( style ) {
- style->setMargin(QStyleSheetItem::MarginAll,0);
- }
mEventViewer = 0;
@@ -163,3 +155,3 @@ void KOWhatsNextView::updateView()
//<big><big><strong>" + date + "</strong></big></big>\n";
- mText = "<qt><table width=\"100%\">\n";
+ mText = "<table width=\"100%\">\n";
//mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
@@ -218,5 +210,8 @@ void KOWhatsNextView::updateView()
appendDay ( iii, mEventDate );
- itemAdded = true;
}
+ // for first day (iii == 0)
+ // we may have syncevents, or events in the past, which maybe should nor be diaplayed
+ // for that reason we cannot append <table> in appendDay () for iii == 0
+ // we must append it in the first successful call of appendEvent()
Event *ev = events.first();
@@ -225,3 +220,4 @@ void KOWhatsNextView::updateView()
if ( true /*!ev->recurrence()->doesRecur() || ev->recursOn( mEventDate)*/) {
- appendEvent(ev, false , iii!= 0 );
+ if ( appendEvent(ev, false , iii!= 0,!itemAdded ) )
+ itemAdded = true;
}
@@ -244,3 +240,3 @@ void KOWhatsNextView::updateView()
}
- if ( !itemAdded && iii == 0 ) {
+ if ( !itemAdded && iii == 0 ) {
// appendDay ( iii, mEventDate );
@@ -251,3 +247,3 @@ void KOWhatsNextView::updateView()
}
- if ( itemAdded )
+ if ( itemAdded )
mText += "</table>\n";
@@ -345,3 +341,3 @@ void KOWhatsNextView::updateView()
- mText += "</td></tr>\n</table></qt>\n";
+ mText += "</td></tr>\n</table>\n";
@@ -359,3 +355,3 @@ void KOWhatsNextView::updateView()
// mView->setBackgroundPixmap ( bPix );
- // qDebug("%s ",mText.latin1());
+ qDebug("%s ",mText.latin1());
}
@@ -368,3 +364,3 @@ void KOWhatsNextView::appendDay( int i, QDate eventDate )
if ( i == 0 ) {
- mText += "<table>\n";
+ //mText += "<table>\n";
return;//date = "<em><font color=\"#008000\"><em>" + day+"</font></em>";
@@ -382,3 +378,3 @@ void KOWhatsNextView::appendDay( int i, QDate eventDate )
if ( i == 0 ) {
- mText += "<table>\n";
+ //mText += "<table>\n";
return;// date = "<font color=\"#008000\"><em>" +i18n("Today: ") +"</em>" + day+"</font>";
@@ -432,6 +428,6 @@ void KOWhatsNextView::changeEventDisplay(Event *, int action)
-void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed )
+bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool appendTable )
{
if ( !KOPrefs::instance()->mShowSyncEvents && ev->uid().left(15) == QString("last-syncEvent-") )
- return;
+ return false;
QDateTime cdt = QDateTime::currentDateTime();
@@ -439,2 +435,5 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed )
QString tempText;
+ if ( appendTable && !notRed ) {
+ tempText = "<table>";
+ }
bool ok = true;
@@ -443,3 +442,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed )
if (! ok && ev->type() == "Event")
- return;
+ return false;
}
@@ -488,3 +487,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed )
if ( !KOPrefs::instance()->mWNViewShowsPast )
- return;
+ return false;
tempText += "<font color=\"#F00000\">" + dateText + "</font>";
@@ -577,2 +576,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed )
mText += tempText;
+ return true;
}
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 1118bdd..9049268 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -72,3 +72,3 @@ class KOWhatsNextView : public KOrg::BaseView
protected:
- void appendEvent(Incidence *, bool reply=false, bool notRed = true);
+ bool appendEvent(Incidence *, bool reply=false, bool notRed = true, bool appendTable = false);
bool appendTodo(Incidence *, QString ind = "", bool isSub = false );