summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt9
-rw-r--r--korganizer/kotodoeditor.cpp1
-rw-r--r--korganizer/kotodoview.cpp78
-rw-r--r--korganizer/kotodoview.h3
4 files changed, 79 insertions, 12 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index a5e2597..cb92677 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1494,2 +1494,4 @@
1494{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, 1494{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." },
1495{ "Hide Completed","Verstecke erledigte Todos" },
1496{ "Show not Running","Zeige nicht Laufende" },
1495{ "","" }, 1497{ "","" },
@@ -1501,5 +1503,4 @@
1501{ "","" }, 1503{ "","" },
1502{ "","" }, 1504
1503{ "","" }, 1505
1504{ "","" }, 1506
1505{ "","" },
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 555c1b1..100a81b 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -300,2 +300,3 @@ void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay)
300 if ( mRelatedTodo ) { 300 if ( mRelatedTodo ) {
301 mGeneral->fillCalCombo(mRelatedTodo->calID() );
301 mGeneral->setCategories (mRelatedTodo->categoriesStr ()); 302 mGeneral->setCategories (mRelatedTodo->categoriesStr ());
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index a87e6fc..c23a8ee 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -506,6 +506,40 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
506 mBlockUpdate = false; 506 mBlockUpdate = false;
507 mQuickAdd = new KOQuickTodo(this); 507 mQuickBar = new QWidget( this );
508 topLayout->addWidget(mQuickAdd); 508 topLayout->addWidget(mQuickBar);
509 509
510 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); 510 mQuickAdd = new KOQuickTodo(mQuickBar);
511 QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar);
512 quickLayout->addWidget( mQuickAdd );
513 QPushButton * flat = new QPushButton( "F",mQuickBar );
514 int fixwid = flat->sizeHint().height();
515 if ( QApplication::desktop()->width() > 320 )
516 fixwid *= 2;
517 flat->setFixedWidth( fixwid );
518 connect ( flat, SIGNAL ( clicked()), SLOT ( setAllFlat()));
519 QPushButton * allopen = new QPushButton( "O",mQuickBar );
520 allopen->setFixedWidth( fixwid );
521 connect ( allopen, SIGNAL ( clicked()), SLOT ( setAllOpen()));
522 QPushButton * allclose = new QPushButton( "C",mQuickBar );
523 allclose->setFixedWidth( fixwid );
524 connect ( allclose, SIGNAL ( clicked()), SLOT ( setAllClose()));
525 QPushButton * s_done = new QPushButton( "D",mQuickBar );
526 s_done->setFixedWidth( fixwid );
527 connect ( s_done, SIGNAL ( clicked()), SLOT ( toggleCompleted()));
528 QPushButton * s_run = new QPushButton( "R",mQuickBar );
529 s_run->setFixedWidth( fixwid );
530 connect ( s_run, SIGNAL ( clicked()), SLOT ( toggleRunning()));
531
532 mNewSubBut = new QPushButton( "sub",mQuickBar );
533 mNewSubBut->setFixedWidth( fixwid*3/2 );
534 connect ( mNewSubBut, SIGNAL ( clicked()), SLOT ( newSubTodo()));
535 mNewSubBut->setEnabled( false );
536 quickLayout->addWidget( mNewSubBut );
537 quickLayout->addWidget( s_done );
538 quickLayout->addWidget( s_run );
539
540 quickLayout->addWidget( allopen );
541 quickLayout->addWidget( allclose );
542 quickLayout->addWidget( flat );
543
544 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickBar->hide();
511 545
@@ -1084,3 +1118,7 @@ void KOTodoView::newSubTodo()
1084{ 1118{
1119 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1085 if (mActiveItem) { 1120 if (mActiveItem) {
1121 if ( mQuickAdd->isVisible() && !mQuickAdd->text().isEmpty() && mQuickAdd->text() != i18n("Click to add a new Todo") ) {
1122 addQuickTodoPar( mActiveItem->todo());
1123 } else
1086 emit newSubTodoSignal(mActiveItem->todo()); 1124 emit newSubTodoSignal(mActiveItem->todo());
@@ -1393,4 +1431,6 @@ void KOTodoView::processSelectionChange()
1393 emit incidenceSelected( 0 ); 1431 emit incidenceSelected( 0 );
1432 mNewSubBut->setEnabled( false );
1394 } else { 1433 } else {
1395 emit incidenceSelected( item->todo() ); 1434 emit incidenceSelected( item->todo() );
1435 mNewSubBut->setEnabled( true );
1396 } 1436 }
@@ -1482,4 +1522,4 @@ void KOTodoView::toggleQuickTodo()
1482{ 1522{
1483 if ( mQuickAdd->isVisible() ) { 1523 if ( mQuickBar->isVisible() ) {
1484 mQuickAdd->hide(); 1524 mQuickBar->hide();
1485 KOPrefs::instance()->mEnableQuickTodo = false; 1525 KOPrefs::instance()->mEnableQuickTodo = false;
@@ -1487,3 +1527,3 @@ void KOTodoView::toggleQuickTodo()
1487 else { 1527 else {
1488 mQuickAdd->show(); 1528 mQuickBar->show();
1489 KOPrefs::instance()->mEnableQuickTodo = true; 1529 KOPrefs::instance()->mEnableQuickTodo = true;
@@ -1500,2 +1540,6 @@ void KOTodoView::toggleRunning()
1500 updateView(); 1540 updateView();
1541 if ( KOPrefs::instance()->mHideNonStartedTodos )
1542 topLevelWidget()->setCaption(i18n("Hide not Running"));
1543 else
1544 topLevelWidget()->setCaption(i18n("Show not Running"));
1501} 1545}
@@ -1508,2 +1552,6 @@ void KOTodoView::toggleCompleted()
1508 updateView(); 1552 updateView();
1553 if ( KOPrefs::instance()->mShowCompletedTodo )
1554 topLevelWidget()->setCaption(i18n("Show Completed"));
1555 else
1556 topLevelWidget()->setCaption(i18n("Hide Completed"));
1509} 1557}
@@ -1512,2 +1560,6 @@ void KOTodoView::addQuickTodo()
1512{ 1560{
1561 addQuickTodoPar( 0 );
1562}
1563void KOTodoView::addQuickTodoPar( Todo * parentTodo)
1564{
1513 Todo *todo = new Todo(); 1565 Todo *todo = new Todo();
@@ -1515,2 +1567,11 @@ void KOTodoView::addQuickTodo()
1515 todo->setOrganizer(KOPrefs::instance()->email()); 1567 todo->setOrganizer(KOPrefs::instance()->email());
1568 if ( parentTodo ) {
1569 todo->setRelatedTo(parentTodo);
1570
1571 todo->setCategories (parentTodo->categoriesStr ());
1572 todo->setSecrecy (parentTodo->secrecy ());
1573 if ( parentTodo->priority() < 3 )
1574 todo->setPriority( parentTodo->priority() );
1575 todo->setCalID( parentTodo->calID() );
1576 } else {
1516 CalFilter * cf = mCalendar->filter(); 1577 CalFilter * cf = mCalendar->filter();
@@ -1523,2 +1584,3 @@ void KOTodoView::addQuickTodo()
1523 } 1584 }
1585 }
1524 mCalendar->addTodo(todo); 1586 mCalendar->addTodo(todo);
@@ -1527,4 +1589,4 @@ void KOTodoView::addQuickTodo()
1527 updateView(); 1589 updateView();
1528}
1529 1590
1591}
1530void KOTodoView::keyPressEvent ( QKeyEvent * e ) 1592void KOTodoView::keyPressEvent ( QKeyEvent * e )
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 79cc756..a8e90e2 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -256,2 +256,3 @@ class KOTodoView : public KOrg::BaseView
256 private: 256 private:
257 void addQuickTodoPar( Todo * parentTodo);
257 /* 258 /*
@@ -291,2 +292,3 @@ class KOTodoView : public KOrg::BaseView
291 QString mName; 292 QString mName;
293 QWidget* mQuickBar;
292 294
@@ -302,2 +304,3 @@ class KOTodoView : public KOrg::BaseView
302 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; 304 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove;
305 QPushButton * mNewSubBut;
303}; 306};