summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kolistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index be51694..5797d1b 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -285,3 +285,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
SLOT(deleteAll()),true);
-#ifdef DESKTOP_VERSION
+
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
@@ -289,3 +289,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
SLOT(hideAll()),true);
-#endif
+
mPopupMenu->insertSeparator();
@@ -668,2 +668,4 @@ void KOListView::writeToFile( bool iCal )
bool journal = iCal; // warn only for vCal
+ bool addSubTodos = false;
+ bool askSubTodos = true;
while ( item ) {
@@ -673,6 +675,31 @@ void KOListView::writeToFile( bool iCal )
journal = true;
- delSel.append(((KOListViewItem *)item)->data());
+ Incidence* inc = ((KOListViewItem *)item)->data();
+ if ( addSubTodos ) {
+ if ( delSel.findRef( inc ) == -1 )
+ delSel.append( inc );
+ } else
+ delSel.append(inc);
+ if ( inc->typeID() == todoID ) {
+ Todo * todo = (Todo*) inc;
+ if ( todo->relations().count() ) {
+ if ( askSubTodos ) {
+ int result = KMessageBox::warningYesNoCancel(this,
+ i18n("A selected todo has subtodos!\nDo you want to export\nall subtodos of all\nselected todos as well?"),
+ i18n("Todo has subtodos"),
+ i18n("Yes"),
+ i18n("No"));
+ if ( result == KMessageBox::Cancel ) {
+ return;
+ }
+ if (result == KMessageBox::Yes)
+ addSubTodos = true;
+ askSubTodos = false;
+ }
+ if ( addSubTodos ) {
+ inc->addRelationsToList( &delSel );
+ }
+ }
+ }
++icount;
}
-
item = item->nextSibling();