Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 99e0bf13 authored by Dimitris Kardarakos's avatar Dimitris Kardarakos

Modify calendar management structure

Available calendars are now located into an expandible action in the
calaendar management action.
parent cd305279
Pipeline #27437 passed with stage
in 13 minutes and 42 seconds
......@@ -75,20 +75,36 @@ Kirigami.GlobalDrawer {
}
},
Kirigami.Action {
id: sectionSeparator
separator: true
},
Kirigami.Action {
id: calendarManagement
text: i18n("Calendar Management")
iconName: "view-calendar"
children: [calendarCreateAction, calendarImportAction, actionSeparator]
Kirigami.Action {
id: availableCalendars
iconName: "view-calendar"
text: i18n("Available Calendars")
expandible: true
}
Kirigami.Action {
id: calendarCreateAction
text: i18n("New calendar")
iconName: "list-add"
onTriggered: pageStack.push(calendarEditor, {mode: "add"})
}
Kirigami.Action {
id: calendarImportAction
text: i18n("Import calendar")
iconName: "document-import"
onTriggered: pageStack.push(calendarEditor, {mode: "import"})
}
},
Kirigami.Action {
......@@ -122,41 +138,15 @@ Kirigami.GlobalDrawer {
}
onObjectAdded: {
calendarManagement.children.push(object)
availableCalendars.children.push(object)
}
onObjectRemoved: {
// HACK this is not pretty because onObjectRemoved is called for each calendar, but we cannot remove a single child
calendarManagement.children = []
calendarManagement.children.push(calendarCreateAction)
calendarManagement.children.push(calendarImportAction)
calendarManagement.children.push(actionSeparator)
availableCalendars.children = []
}
}
Kirigami.Action {
id: calendarCreateAction
text: i18n("New calendar")
iconName: "list-add"
onTriggered: pageStack.push(calendarEditor, {mode: "add"})
}
Kirigami.Action {
id: calendarImportAction
text: i18n("Import calendar")
iconName: "document-import"
onTriggered: pageStack.push(calendarEditor, {mode: "import"})
}
Kirigami.Action {
id: actionSeparator
separator: true
}
Item {
visible: false
......@@ -177,7 +167,7 @@ Kirigami.GlobalDrawer {
CalendarEditor {
onCalendarAdded: {
pageStack.pop(calendarEditor);
pageStack.clear()
pageStack.push(monthView);
}
onCalendarAddCanceled: pageStack.pop(calendarEditor)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment