summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2004-09-18 19:07:00 (UTC)
committer zautrix <zautrix>2004-09-18 19:07:00 (UTC)
commit28f894fd2a0dfbd5f09f9e530f359981efe0198c (patch) (side-by-side diff)
tree426565d2716916f48b0c3e68b41e963fd10a3463 /kabc
parentec8099bf369e5b8327ca6cfd78b34366353e3abf (diff)
downloadkdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.zip
kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.tar.gz
kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.tar.bz2
more AB sync
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addresseeview.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index 487e8a5..2dda968 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -391,77 +391,74 @@ void AddresseeView::addTag(const QString & tag,const QString & text)
pos=tmpText.find("\n");
tmp=tmpText.left(pos);
tmpText=tmpText.right(tmpText.length()-pos-1);
tmpStr+=tmp+"<br>";
}
}
else tmpStr += tmpText;
tmpStr+="</" + tag + ">";
mText.append(tmpStr);
}
else
{
str += text + "</" + tag + ">";
mText.append(str);
}
}
AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bool takeloc, QWidget *parent, const char *name ) : KDialogBase(parent,name,
true ,i18n("Conflict! Please choose Adressee!"),Ok|User1|Close,Close, false)
{
findButton( Close )->setText( i18n("Cancel Sync"));
findButton( Ok )->setText( i18n("Remote"));
findButton( User1 )->setText( i18n("Local"));
QWidget* topframe = new QWidget( this );
- //QVBox* topframe = new QVBox( this );
setMainWidget( topframe );
QBoxLayout* bl;
if ( QApplication::desktop()->width() < 640 ) {
bl = new QVBoxLayout( topframe );
-
} else {
bl = new QHBoxLayout( topframe );
-
}
QVBox* subframe = new QVBox( topframe );
bl->addWidget(subframe );
QLabel* lab = new QLabel( i18n("Local Addressee"), subframe );
+ if ( takeloc )
+ lab->setBackgroundColor(Qt::green.light() );
AddresseeView * av = new AddresseeView( subframe );
av->setAddressee( loc );
subframe = new QVBox( topframe );
bl->addWidget(subframe );
lab = new QLabel( i18n("Remote Addressee"), subframe );
+ if ( !takeloc )
+ lab->setBackgroundColor(Qt::green.light() );
av = new AddresseeView( subframe );
av->setAddressee( rem );
-
- QObject::connect(findButton( Ok ),SIGNAL(clicked()),
- SLOT(slot_remote()));
- QObject::connect(this,SIGNAL(user1Clicked()),
- SLOT(slot_local()));
+ QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote()));
+ QObject::connect(this,SIGNAL(user1Clicked()),this, SLOT(slot_local()));
#ifndef DESKTOP_VERSION
showMaximized();
#else
resize ( 640, 400 );
#endif
}
int AddresseeChooser::executeD( bool local )
{
mSyncResult = 3;
if ( local )
findButton( User1 )->setFocus();
else
findButton( Ok )->setFocus();
exec();
- qDebug("returning %d ",mSyncResult );
return mSyncResult;
}
void AddresseeChooser::slot_remote()
{
mSyncResult = 2;
accept();
}
void AddresseeChooser::slot_local()
{
mSyncResult = 1;
accept();
}