summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-21 15:38:31 (UTC)
committer zautrix <zautrix>2005-01-21 15:38:31 (UTC)
commit4afdcfcac216b428ada79f4750cf7447e3175333 (patch) (side-by-side diff)
tree8f70936ac23137c3f6fb00fce33edbfe3d821f59
parent234b9425bebd41b556277cdd94138fafecc32b45 (diff)
downloadkdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.zip
kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.gz
kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.bz2
some fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/SyncHowto.txt2
-rw-r--r--korganizer/kotodoviewitem.cpp6
-rw-r--r--microkde/kdeui/klistview.cpp14
-rw-r--r--version2
4 files changed, 16 insertions, 8 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
@@ -41,97 +41,97 @@ 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,
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 347d982..ead8628 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -149,153 +149,153 @@ void KOTodoViewItem::construct()
// 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)
{
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
@@ -1864,99 +1864,107 @@ 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)
{
- // qDebug("KListView::emitContextMenu col");
- emit contextRequest( i, p, col );
- emit contextMenu (this, i, p);
+ QListViewItem* item = i;
+ int c = col;
+ // do not trust the values for QListViewItem* i and int col;
+ // qDebug("KListView::emitContextMenu col");
+ 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)
{
diff --git a/version b/version
index dedf950..02b0fb1 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "1.9.19";
+version = "1.9.20";