summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 926a136..98c9bd9 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -68,13 +68,13 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
{
mTodo = todo;
setCaption( i18n("Stop todo") );
QVBoxLayout* lay = new QVBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
- QLabel * lab = new QLabel( i18n("%1\nis running!").arg( todo->summary() ), this );
+ QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this );
lay->addWidget( lab );
lab->setAlignment( AlignHCenter );
lab = new QLabel( i18n("Additional Comment:"), this );
lay->addWidget( lab );
mComment = new QLineEdit( this );
lay->addWidget( mComment );
@@ -102,15 +102,15 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
ok = new QPushButton( i18n("Stop - do not save"), this );
connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) );
lay->addWidget( ok );
if (QApplication::desktop()->width() < 320 )
- resize( 240, 200 );
+ resize( 240, sizeHint().height() );
else
- resize( 320, 200 );
+ resize( 320, sizeHint().height() );
}
void KOStopTodoPrefs::accept()
{
QDateTime start = QDateTime( sde->date(), ste->getTime() );
@@ -124,13 +124,13 @@ void KOStopTodoPrefs::accept()
mTodo->saveRunningInfo( mComment->text(), start, stop );
QDialog::accept();
}
void KOStopTodoPrefs::doNotSave()
{
int result = KMessageBox::warningContinueCancel(this,
- i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary() );
+ i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary(),i18n("Yes, stop todo") );
if (result != KMessageBox::Continue) return;
mTodo->stopRunning();
QDialog::accept();
}
@@ -1201,12 +1201,19 @@ void KOTodoView::toggleRunningItem()
// qDebug("KOTodoView::toggleRunning() ");
if ( ! mActiveItem )
return;
Todo * t = mActiveItem->todo();
if ( t->isRunning() ) {
KOStopTodoPrefs tp ( t, this );
+ if (QApplication::desktop()->width() < 800 ){
+ int wid = tp.width();
+ int hei = tp.height();
+ int xx = (QApplication::desktop()->width()-wid)/2;
+ int yy = (QApplication::desktop()->height()-hei)/2;
+ tp.setGeometry( xx,yy,wid,hei );
+ }
tp.exec();
mActiveItem->construct();
} else {
int result = KMessageBox::warningContinueCancel(this,
i18n("<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>").arg(mActiveItem->text(0).left( 25 ) ),i18n("Start todo"),i18n("Start todo"),i18n("Cancel"), true);
if (result != KMessageBox::Continue) return;