summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/SyncHowto.txt2
-rw-r--r--korganizer/kotodoviewitem.cpp6
-rw-r--r--microkde/kdeui/klistview.cpp12
-rw-r--r--version2
4 files changed, 15 insertions, 7 deletions
diff --git a/bin/kdepim/SyncHowto.txt b/bin/kdepim/SyncHowto.txt
index 64f6f14..b0473a1 100644
--- a/bin/kdepim/SyncHowto.txt
+++ b/bin/kdepim/SyncHowto.txt
@@ -1,185 +1,185 @@
WARNING:
YOU MAY GET UNEXPECTED (I.E. WRONG) SYNCHRONIZATION RESULTS,
IF YOU CHANGE AN EVENT ON THE FIRST DEVICE AND SYNC IMMEDIATELY FROM
THE OTHER DEVICE WITH THIS DEVICE, IF THE CLOCKS OF THE TWO DEVICES
HAVE TOO MUCH DIFFERENCE.
In other words: Please make sure, that the clocks of the devices
you want to sync have only a difference of some seconds!
CONTENT:
0) How syncing works
1) Qick overview of settings
2) Sync settings in sync dialog
3) Syncing background
4) Sync preferences
5) How a filter works
6) Details about sync profile kinds
*************************************************************************
0) How syncing works
*************************************************************************
Note:
The recommended and easiest way to syncronize two devices where
KO/Pi, KA/Pi or PWM/Pi is installed, is the profile kind "Pi-Sync".
Details about that in 6) b).
In KDE-Pim/Pi you can synchronize ( sync ) your calendar/addressbook/
passwordfile with another calendar/addressbook/passwordfile,
by syncing your (local) calendar/addressbook/passwordfile
with a (remote) file.
This remote file may on your local filesystem
or on another (remote) device.
If you want to sync with another remote device, you have to create
a sync profile.
You have two choices for choosing the profil kind:
I) You can choose profile kind "Remote file" and specify a
command line download/upload command ( like scp, ftp, ...) to
a) download the remote file to your local machine to a temp file
b) sync with this temp file
c) upload the synced file to the remote device
II) If you want to sync with a device, where KO/Pi( or KA/Pi, PWM/Pi) is
installed, you can easily get the remote file via network
with the build in file transfer feature:
Choose profile kind "Pi-Sync" and
a) Start KO/Pi,KA/Pi or PWM/Pi on remote device and
enable "Pi-Sync" on remote device with password and port.
b) Specify password, port and IP address in your profile.
You can sync with your mobile phone as well.
Everything is explained in more details below.
NOTE:
If you do not use profile kind "Pi-Sync",
it is recommended to close
a running KO/Pi (KA/Pi, PWM/Pi) on the remote device.
(Note: KO/Pi(KA/Pi, PWM/Pi) running on Zaurus with
FastLoad enabled will never be closed!)
After syncing with a running KO/Pi on the remote device,
a "save" on the remote device will tell you that it needs to merge (sync).
After merging (just a syncing with the changed file)
you will get the new data showing in remote KO/Pi.
*************************************************************************
1) Qick overview of settings
*************************************************************************
a) Open sync settings dialog (Menu Synchronize - Configure...)
b) Give your device a unique name.
(unique in the set of all devices you want to sync with).
If you have already configured another devive and created
there a sync profile to sync with this device, give your device
the same name as this sync profile! The same name is important,
because it makes it possible to sync first A->B
(A local device, that performs the sync, B remote device)
and then B->A. Such that the B->A sync knows about the
already performed A->B sync.
That means: It is unimportant if you sync A->B or B->A,
the devices A and B will be synced properly.
c) Create a new sync profile and give it a unique name.
(unique in the set of all sync profiles on this device).
If you want to sync with a device, where KO/Pi is already installed
and which has a given unique device name, use this device name as
your profile name ( refer to b) ).
-d) Coose the profile kind of your syncing method:
+d) Choose the profile kind of your syncing method:
(i) Local file or
(ii) Pi-Sync or
(iii) Remote file or
(iiii) Mobile Phone.
Detailed explanation in 6)
e) Choose the other profile options.
Detailed explanation in 2)
f) Close sync dialog with OK.
g) Sync.
NOTE:
AFTER SYNCING THERE ARE "SYNC EVENTS" CREATED
(OR UPDATED, IF IT ALREADY EXITS) FOR EACH SYNC PROFILE.
YOU MAY NOT DELETE OR CHANGE THESE EVENTS.
*************************************************************************
2) Sync settings in sync dialog
*************************************************************************
a) Local device name:
-> 1) b)
b) Profile:
-> 1) c)
c) Multiple Sync options: Include in multiple sync:
In the Synchronize menu, there is a multiple sync menu entry.
If you choose this menu entry, all user defined profiles with this
'Include in multiple sync' option enabled will be synced
one after another. And this twice. This will take some time.
After that sync, on all devices should be the same data.
d)- j) Sync algo options:
d) Ask for preferences before sync:
Check this to be asked for "Sync preferences" settings before each sync.
If the profile kind is "Pi-Sync" you will be asked to confirm
the "Pi-Sync" specific settings (Password,IP address, port number)
as well. That makes it possible to use that profile for a
device that is connected via DHCP to the network and gets different
IP addresses when connecting to the network.
e) Sync preferences:
Choose here your sync preferences.
Details -> 4)
f) Show summary after sync:
Check this to get a small summary dialog after sync
about number of added/changed/deleted events on local/remote.
g) Apply filter when adding data to local:
What is a filter? You can read this in -> 5)
With this option you can specify a filter for events/contacts,
which should be added to the local database, because they are
in the remote database and not in the local database.
(Database = calendar file or addressbook file).
Note that the filter is NOT applied to the remote
database before syncing. It is only applied to a particular
item which should be added to the local database.
Well, but what is the difference?
The differnce is: If the remote database AND the local database contain
an already synced item, which does not match the filter, then this item is synced.
If the remote database contains an item which does not match the filter
and the local database does not contain this item, then this item is not added
to the local database, but it is still in the remote database after syncing.
g) Write back synced data:
Uncheck this to update the local calendar only.
I.e. your local calendar is synced with the remote calendar
but nothing on the remote calendar is changed.
If you uncheck "Write back synced data", the settings
under h) and i) are ignored, of course.
h) - j) Write back options:
h) Write back (on remote) existing entries only:
Check this to update the remote data only.
I.e. no data from yor local calendar/addressbook is added to the
remote device. You may use this option to
sync against some kind of "public calendar/addressbook" without
adding anything of your personal data.
But in this case, you cannot add an item to the remoet device.
i) Apply filter when adding data to remote:
What is a filter? You can read this in -> 5)
With this option you can specify a filter for events/contacts,
which should be added to the remote database, because they are
in the local database and not in the remote database.
(Database = calendar file or addressbook file).
Note that the filter is NOT applied to the local
database before syncing. It is only applied to a particular
item of the local database which should be added to the remote database.
Well, but what is the difference?
The differnce is: If the local database AND the remote database contain
an already synced item, which does not match the filter, then this item is synced.
If the local database contains an item which does not match the filter
and the remote database does not contain this item, then this item is not added
to the remote database, but it is still in the local database after syncing.
Example:
You have specified a calendar filter "only public events".
You specify this filter as the outgoing filter for syncing.
If there is an event in the local database which is not "public", but "private",
this event is not added to the remote database.
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 347d982..ead8628 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -101,249 +101,249 @@ void KOTodoViewItem::construct()
// setSortKey(3,keyd);
if (mTodo->doesFloat()) {
setText(4,"");
}
else {
setText(4,mTodo->dtDueTimeStr());
QTime t = mTodo->dtDue().time();
keyt.sprintf("%02d%02d",t.hour(),t.minute());
//setSortKey(4,keyt);
}
} else {
setText(3,"");
setText(4,"");
}
setSortKey(3,keyd);
setSortKey(4,keyt);
if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt);
else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt);
if (mTodo->hasStartDate()) {
setText(5, mTodo->dtStartDateStr());
QDate d = mTodo->dtStart().date();
skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
if (mTodo->doesFloat()) {
setText(6,"");
}
else {
setText(6,mTodo->dtStartTimeStr());
QTime t = mTodo->dtStart().time();
skeyt.sprintf("%02d%02d",t.hour(),t.minute());
}
} else {
setText(5,"");
setText(6,"");
}
setSortKey(5,skeyd);
setSortKey(6,skeyt);
setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No"));
setText(8,mTodo->categoriesStr());
#if 0
// Find sort id in description. It's the text behind the last '#' character
// found in the description. White spaces are removed from beginning and end
// of sort id.
int pos = mTodo->description().findRev('#');
if (pos < 0) {
setText(6,"");
} else {
QString str = mTodo->description().mid(pos+1);
str.stripWhiteSpace();
setText(6,str);
}
#endif
m_known = false;
m_init = false;
setMyPixmap();
}
void KOTodoViewItem::setMyPixmap()
{
int size = 5;
QPixmap pixi = QPixmap( 1, 1 );
// if ( !mTodo->isCompleted() && mTodo->hasDueDate() && mTodo->dtDue() < QDateTime::currentDateTime() ) {
// pixi = SmallIcon("redcross16");
// } else {
QPainter p;
int pixSize = 0;
QPixmap pPix = QPixmap( size, size );
if ( mTodo->description().length() > 0 ) {
pixi.resize(size, pixSize+size);
pPix.fill( Qt::darkGreen );
p.begin( &pixi );
p. drawPixmap ( 0, pixSize, pPix);
p.end();
pixSize += size;
}
if ( mTodo->isAlarmEnabled() ) {
pixi.resize(size, pixSize+size);
pPix.fill( Qt::red );
p.begin( &pixi );
p. drawPixmap ( 0, pixSize, pPix);
p.end();
pixSize += size;
}
// }
if ( pixi.width() > 1 ) {
setPixmap ( 0,pixi ) ;
+ } else {
+ setPixmap ( 0,QPixmap() ) ;
}
-
-
}
void KOTodoViewItem::stateChange(bool state)
{
// qDebug("KOTodoViewItem::stateChange ");
// do not change setting on startup
if ( m_init ) return;
kdDebug() << "State changed, modified " << state << endl;
QString keyd = "==";
QString keyt = "==";
if (state) mTodo->setCompleted(state);
else mTodo->setPercentComplete(0);
if (isOn()!=state) {
setOn(state);
}
if (mTodo->hasDueDate()) {
setText(3, mTodo->dtDueDateStr());
QDate d = mTodo->dtDue().date();
keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
setSortKey(3,keyd);
if (mTodo->doesFloat()) {
setText(4,"");
}
else {
setText(4,mTodo->dtDueTimeStr());
QTime t = mTodo->dtDue().time();
keyt.sprintf("%02d%02d",t.hour(),t.minute());
setSortKey(4,keyt);
}
}
if (mTodo->isCompleted()) setSortKey(1,QString::number(9)+keyd+keyt);
else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt);
setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete())));
if (mTodo->percentComplete()<100) {
if (mTodo->isCompleted()) setSortKey(2,QString::number(999));
else setSortKey(2,QString::number(mTodo->percentComplete()));
}
else {
if (mTodo->isCompleted()) setSortKey(2,QString::number(999));
else setSortKey(2,QString::number(99));
}
QListViewItem * myChild = firstChild();
KOTodoViewItem *item;
while( myChild ) {
item = static_cast<KOTodoViewItem*>(myChild);
item->stateChange(state);
myChild = myChild->nextSibling();
}
mTodoView->modified(true);
- mTodoView->setTodoModified( mTodo );
setMyPixmap();
+ mTodoView->setTodoModified( mTodo );
}
bool KOTodoViewItem::isAlternate()
{
#ifndef KORG_NOLVALTERNATION
KOTodoListView *lv = static_cast<KOTodoListView *>(listView());
if (lv && lv->alternateBackground().isValid())
{
KOTodoViewItem *above = 0;
above = dynamic_cast<KOTodoViewItem *>(itemAbove());
m_known = above ? above->m_known : true;
if (m_known)
{
m_odd = above ? !above->m_odd : false;
}
else
{
KOTodoViewItem *item;
bool previous = true;
if (QListViewItem::parent())
{
item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent());
if (item)
previous = item->m_odd;
item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild());
}
else
{
item = dynamic_cast<KOTodoViewItem *>(lv->firstChild());
}
while(item)
{
item->m_odd = previous = !previous;
item->m_known = true;
item = dynamic_cast<KOTodoViewItem *>(item->nextSibling());
}
}
return m_odd;
}
return false;
#else
return false;
#endif
}
void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
{
QColorGroup _cg = cg;
QColorGroup::ColorRole role;
if ( KOPrefs::instance()->mTodoViewUsesForegroundColor )
role = QColorGroup::Text;
else
role = QColorGroup::Base;
//#ifndef KORG_NOLVALTERNATION
// if (isAlternate())
// _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors;
QColor colorToSet;
if ( setColor ) {
QStringList categories = mTodo->categories();
QString cat = categories.first();
if ( !cat.isEmpty()) {
colorToSet = *(KOPrefs::instance()->categoryColor(cat) );
} else
setColor = false;
}
if (mTodo->hasDueDate()) {
if (mTodo->dtDue().date()==QDate::currentDate() &&
!mTodo->isCompleted()) {
//_cg.setColor( role , KOPrefs::instance()->mTodoDueTodayColor);
colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
setColor = true;
}
if (mTodo->dtDue().date() < QDate::currentDate() &&
!mTodo->isCompleted()) {
//_cg.setColor( role, KOPrefs::instance()->mTodoOverdueColor);
colorToSet = KOPrefs::instance()->mTodoOverdueColor;
setColor = true;
}
}
if ( setColor ) {
_cg.setColor(role,colorToSet );
if ( role == QColorGroup::Base) {
int rgb = colorToSet.red();
rgb += colorToSet.blue()/2;
rgb += colorToSet.green();
if ( rgb < 200 )
_cg.setColor(QColorGroup::Text,Qt::white );
}
}
//#endif
if ( column > 0 ){
if ( column == 2 && !KOPrefs::instance()->mTodoViewShowsPercentage ) {
p->save();
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 6859d36..154cd02 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -1816,195 +1816,203 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
if (repaintItem2)
ir = ir.unite( itemRect(repaintItem2) );
if ( !ir.isEmpty() )
{ // rectangle to be repainted
if ( ir.x() < 0 )
ir.moveBy( -ir.x(), 0 );
viewport()->repaint( ir, FALSE );
}
/*if (repaintItem1)
repaintItem1->repaint();
if (repaintItem2)
repaintItem2->repaint();*/
update();
if (emitSelectionChanged)
emit selectionChanged();
}
void KListView::setSelectionModeExt (SelectionModeExt mode)
{
d->selectionMode = mode;
switch (mode)
{
case Single:
case Multi:
case Extended:
case NoSelection:
setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode)));
break;
case FileManager:
setSelectionMode (QListView::Extended);
break;
default:
kdWarning () << "Warning: illegal selection mode " << int(mode) << " set!" << endl;
break;
}
}
KListView::SelectionModeExt KListView::selectionModeExt () const
{
return d->selectionMode;
}
int KListView::itemIndex( const QListViewItem *item ) const
{
if ( !item )
return -1;
if ( item == firstChild() )
return 0;
else {
QListViewItemIterator it(firstChild());
uint j = 0;
for (; it.current() && it.current() != item; ++it, ++j );
if( !it.current() )
return -1;
return j;
}
}
QListViewItem* KListView::itemAtIndex(int index)
{
if (index<0)
return 0;
int j(0);
for (QListViewItemIterator it=firstChild(); it.current(); it++)
{
if (j==index)
return it.current();
j++;
};
return 0;
}
void KListView::emitContextMenu (KListView*, QListViewItem* i)
{
QPoint p;
// qDebug("KListView::emitContextMenu ");
if (i)
p = viewport()->mapToGlobal(itemRect(i).center());
else
p = mapToGlobal(rect().center());
emit contextMenu (this, i, p);
}
void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col)
{
+ QListViewItem* item = i;
+ int c = col;
+ // do not trust the values for QListViewItem* i and int col;
// qDebug("KListView::emitContextMenu col");
- emit contextRequest( i, p, col );
- emit contextMenu (this, i, p);
+ if ( col == -1 ) {
+ QPoint pp = viewport()->mapFromGlobal(p);
+ item = itemAt( pp);
+ c = header()->sectionAt(pp.x() );
+ }
+ emit contextRequest( item, p, c );
+ emit contextMenu (this, item, p);
}
void KListView::setAcceptDrops (bool val)
{
QListView::setAcceptDrops (val);
viewport()->setAcceptDrops (val);
}
int KListView::dropVisualizerWidth () const
{
return d->mDropVisualizerWidth;
}
void KListView::viewportPaintEvent(QPaintEvent *e)
{
QListView::viewportPaintEvent(e);
if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer))
{
QPainter painter(viewport());
// This is where we actually draw the drop-visualizer
painter.fillRect(d->mOldDropVisualizer, Dense4Pattern);
}
if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter))
{
QPainter painter(viewport());
qDebug("KListView::viewportPaintEvent has to be verified");
// This is where we actually draw the drop-highlighter
//US style().drawPrimitive(QStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(),
//US QStyle::Style_FocusAtBorder);
//LR style().drawFocusRect(&painter, d->mOldDropHighlighter, colorGroup(), (const QColor*)0, true);
}
}
void KListView::setFullWidth()
{
setFullWidth(true);
}
void KListView::setFullWidth(bool fullWidth)
{
d->fullWidth = fullWidth;
//US header()->setStretchEnabled(fullWidth, columns()-1);
}
bool KListView::fullWidth() const
{
return d->fullWidth;
}
int KListView::addColumn(const QString& label, int width)
{
int result = QListView::addColumn(label, width);
if (d->fullWidth) {
//US header()->setStretchEnabled(false, columns()-2);
//US header()->setStretchEnabled(true, columns()-1);
}
return result;
}
int KListView::addColumn(const QIconSet& iconset, const QString& label, int width)
{
int result = QListView::addColumn(iconset, label, width);
if (d->fullWidth) {
//US header()->setStretchEnabled(false, columns()-2);
//US header()->setStretchEnabled(true, columns()-1);
}
return result;
}
void KListView::removeColumn(int index)
{
QListView::removeColumn(index);
//US if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1);
}
void KListView::viewportResizeEvent(QResizeEvent* e)
{
QListView::viewportResizeEvent(e);
}
const QColor &KListView::alternateBackground() const
{
return d->alternateBackground;
}
void KListView::setAlternateBackground(const QColor &c)
{
d->alternateBackground = c;
diff --git a/version b/version
index dedf950..02b0fb1 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "1.9.19";
+version = "1.9.20";