Merge lp:~ubuntu-calendar-dev/ubuntu-calendar-app/filesRestructure into lp:ubuntu-calendar-app

Proposed by Mihir Soni
Status: Work in progress
Proposed branch: lp:~ubuntu-calendar-dev/ubuntu-calendar-app/filesRestructure
Merge into: lp:ubuntu-calendar-app
Diff against target: 780 lines (+123/-224)
28 files modified
CMakeLists.txt (+3/-2)
Scroller.qml (+0/-147)
app/CMakeLists.txt (+21/-0)
app/EventActions.qml (+4/-2)
app/calendar.qml (+13/-9)
app/components/CMakeLists.txt (+6/-0)
app/components/DayHeaderBackground.qml (+3/-2)
app/events/CMakeLists.txt (+6/-0)
app/events/NewEvent.qml (+1/-0)
app/images/CMakeLists.txt (+6/-0)
app/timelineComponents/AllDayEventComponent.qml (+6/-6)
app/timelineComponents/CMakeLists.txt (+6/-0)
app/timelineComponents/TimeLineBackground.qml (+1/-0)
app/timelineComponents/TimeLineBase.qml (+5/-3)
app/timelineComponents/TimeLineBaseComponent.qml (+4/-2)
app/timelineComponents/TimeLineHeader.qml (+3/-1)
app/timelineComponents/TimeLineHeaderComponent.qml (+4/-2)
app/views/AgendaView.qml (+4/-2)
app/views/CMakeLists.txt (+6/-0)
app/views/DayView.qml (+6/-2)
app/views/MonthComponent.qml (+4/-4)
app/views/MonthView.qml (+3/-2)
app/views/WeekView.qml (+4/-2)
app/views/YearView.qml (+2/-1)
calendar-app.in (+0/-3)
calendarTests.qml (+0/-30)
tests/autopilot/calendar_app/tests/__init__.py (+1/-1)
tests/unittests/tst_date.qml (+1/-1)
To merge this branch: bzr merge lp:~ubuntu-calendar-dev/ubuntu-calendar-app/filesRestructure
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Nekhelesh Ramananthan Needs Fixing
Review via email: mp+234365@code.launchpad.net

Commit message

Restructure of files.

Description of the change

Restructure of files.

1.Please suggest if any changes are required.
2.I have done bifurcation based on my understanding and files that are being used in project.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

On an brief look and testing, I feel that we can organize it even more by moving the following into a folder called "app",

- components
- events
- images
- timelineComponents
- views
- js
- calendar.qml
- calendar-app@30.png
- calendar-app@30.png

The following files are not required and can be removed,

- calendarTests.qml
- Scroller.qml
- calendar-app.in

This obviously will require further fixes in the cmake files. But we can get zbenjamin's help on that.

review: Needs Fixing
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
453. By Mihir Soni

Moved Recurrence.js to event directory

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
454. By Mihir Soni

added proper reference to autopilot & added new reference to new files

455. By Mihir Soni

merge with trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
456. By Mihir Soni

reverted pot changes in cmake

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

456. By Mihir Soni

reverted pot changes in cmake

455. By Mihir Soni

merge with trunk

454. By Mihir Soni

added proper reference to autopilot & added new reference to new files

453. By Mihir Soni

Moved Recurrence.js to event directory

452. By Mihir Soni

merged mzanetti cmake patch

451. By Mihir Soni

resolved merge issue

450. By Mihir Soni

Merge from trunk

449. By Nekhelesh Ramananthan

reverted manifest file change

448. By Nekhelesh Ramananthan

Some small cmake fixes

447. By Mihir Soni

Moved everything under app directory

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-09-25 21:34:16 +0000
3+++ CMakeLists.txt 2014-10-20 19:18:23 +0000
4@@ -14,7 +14,7 @@
5 set(APPLICATION_FILE "${PROJECT_NAME}_${APP_NAME}.application")
6 set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
7 set(MAIN_QML calendar.qml)
8-set(ICON_FILE calendar-app@30.png)
9+set(ICON_FILE "calendar-app@30.png")
10 set(AUTOPILOT_DIR calendar_app)
11 set(APP_HARDCODE calendar-app)
12 set(UBUNTU_MANIFEST_PATH "click/manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
13@@ -60,7 +60,7 @@
14 file(GLOB RESOURCE_FILES
15 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
16 *.png *.svg)
17-install(FILES ${SRC_FILES} ${RESOURCE_FILES} ${ICON_FILE} DESTINATION ${DATA_DIR})
18+install(FILES ${SRC_FILES} ${RESOURCE_FILES} "app/${ICON_FILE}" DESTINATION ${DATA_DIR})
19
20 configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in)
21
22@@ -81,3 +81,4 @@
23 add_subdirectory(click)
24 add_subdirectory(po)
25 add_subdirectory(tests)
26+add_subdirectory(app)
27
28=== removed file 'Scroller.qml'
29--- Scroller.qml 2014-09-20 10:45:35 +0000
30+++ Scroller.qml 1970-01-01 00:00:00 +0000
31@@ -1,147 +0,0 @@
32-/*
33- * Copyright (C) 2013-2014 Canonical Ltd
34- *
35- * This file is part of Ubuntu Calendar App
36- *
37- * Ubuntu Calendar App is free software: you can redistribute it and/or modify
38- * it under the terms of the GNU General Public License version 3 as
39- * published by the Free Software Foundation.
40- *
41- * Ubuntu Calendar App is distributed in the hope that it will be useful,
42- * but WITHOUT ANY WARRANTY; without even the implied warranty of
43- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44- * GNU General Public License for more details.
45- *
46- * You should have received a copy of the GNU General Public License
47- * along with this program. If not, see <http://www.gnu.org/licenses/>.
48- */
49-
50-import QtQuick 2.3
51-import Ubuntu.Components 1.1
52-import Ubuntu.Components.ListItems 1.0 as ListItems
53-
54-Item {
55- id: root
56- property int min: 0
57- property int max: 10
58- property variant value: model.get(listView.currentIndex) !== undefined ? model.get(listView.currentIndex).modelData : ""
59- property alias model: listView.model
60- property alias labelText: label.text
61- property alias currentIndex: listView.currentIndex
62-
63- ListModel {
64- id: defaultModel
65- }
66-
67- Component.onCompleted: {
68- var oldIndex = currentIndex
69- for (var i = 0; i < (max+1)-min; ++i) {
70- defaultModel.append({modelData: root.min + i})
71- }
72- listView.highlightMoveDuration = 0
73- currentIndex = oldIndex
74- listView.highlightMoveDuration = 300
75- }
76-
77- onMinChanged: {
78- if (defaultModel.get(0) === undefined) {
79- return;
80- }
81-
82- var oldMin = defaultModel.get(0).modelData
83-
84- while (oldMin > min) {
85- defaultModel.insert(0, {modelData: --oldMin })
86- }
87- while (oldMin < min) {
88- defaultModel.remove(0)
89- ++oldMin
90- }
91- }
92-
93- onMaxChanged: {
94- if (defaultModel.get(defaultModel.count - 1) === undefined) {
95- return;
96- }
97-
98- var oldMax = defaultModel.get(defaultModel.count - 1).modelData
99-
100- while (max < oldMax) {
101- defaultModel.remove(defaultModel.count - 1);
102- --oldMax;
103- }
104- while (max > oldMax) {
105- defaultModel.insert(defaultModel.count, {modelData: ++oldMax})
106- }
107- }
108-
109- Item {
110- id: labelRect
111- anchors {
112- left: parent.left
113- top: parent.top
114- right: parent.right
115- }
116- height: units.gu(5)
117-
118- Label {
119- id: label
120- anchors.centerIn: parent
121- }
122- ListItems.Divider {
123- anchors {
124- left: parent.left
125- bottom: parent.bottom
126- right: parent.right
127- }
128- }
129- }
130-
131- PathView {
132- id: listView
133- model: defaultModel
134- anchors.fill: parent
135- anchors.topMargin: labelRect.height
136- pathItemCount: listView.height / highlightItem.height + 1
137- preferredHighlightBegin: 0.5
138- preferredHighlightEnd: 0.5
139- clip: true
140-
141- delegate: ListItems.Standard {
142- width: parent.width
143- highlightWhenPressed: false
144- Label {
145- anchors.centerIn: parent
146- text: modelData
147- }
148- onClicked: listView.currentIndex = index
149- }
150- property int contentHeight: pathItemCount * highlightItem.height
151- path: Path {
152- startX: listView.width / 2; startY: -(listView.contentHeight - listView.height) / 2
153- PathLine { x: listView.width / 2; y: listView.height + (listView.contentHeight - listView.height) / 2 }
154- }
155- highlight: Rectangle {
156- width: parent.width
157- height: units.gu(6)
158- property color baseColor: "#dd4814"
159- gradient: Gradient {
160- GradientStop {
161- position: 0.00;
162- color: Qt.lighter(baseColor, 1.3);
163- }
164- GradientStop {
165- position: 1.0;
166- color: baseColor;
167- }
168- }
169- }
170- ListItems.Divider {
171- anchors {
172- left: parent.left
173- bottom: parent.bottom
174- right: parent.right
175- }
176- }
177- }
178-}
179
180=== added directory 'app'
181=== added file 'app/CMakeLists.txt'
182--- app/CMakeLists.txt 1970-01-01 00:00:00 +0000
183+++ app/CMakeLists.txt 2014-10-20 19:18:23 +0000
184@@ -0,0 +1,21 @@
185+if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
186+ file(GLOB QML_JS_FILES *.qml *.js *.png)
187+ add_custom_target(ubuntu-calendar-apps_QMlFiles ALL SOURCES ${QML_JS_FILES})
188+endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
189+
190+if(CLICK_MODE)
191+ set(ICON ${ICON})
192+ install(FILES ${ICON} DESTINATION ${CMAKE_INSTALL_PREFIX})
193+endif(CLICK_MODE)
194+
195+# substitute variables in the desktop file
196+
197+install(FILES ${CMAKE_BINARY_DIR}/${DESKTOP_FILE}
198+ DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
199+install(FILES ${MAIN_QML} DESTINATION ${MAIN_QML})
200+
201+add_subdirectory(events)
202+add_subdirectory(components)
203+add_subdirectory(timelineComponents)
204+add_subdirectory(views)
205+add_subdirectory(images)
206
207=== renamed file 'EventActions.qml' => 'app/EventActions.qml'
208--- EventActions.qml 2014-09-19 08:52:19 +0000
209+++ app/EventActions.qml 2014-10-20 19:18:23 +0000
210@@ -18,6 +18,8 @@
211
212 import QtQuick 2.3
213 import Ubuntu.Components 1.1
214+import "components"
215+import "views"
216
217 Item {
218 id: actionPool
219@@ -32,7 +34,7 @@
220 iconName: "new-event"
221 text: i18n.tr("New Event")
222 onTriggered: {
223- pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"date":tabs.currentDay,"model":eventModel});
224+ pageStack.push(Qt.resolvedUrl("events/NewEvent.qml"),{"date":tabs.currentDay,"model":eventModel});
225 }
226 }
227
228@@ -41,7 +43,7 @@
229 iconName: "new-event"
230 text: i18n.tr("Calendars")
231 onTriggered: {
232- pageStack.push(Qt.resolvedUrl("CalendarChoicePopup.qml"),{"model":eventModel});
233+ pageStack.push(Qt.resolvedUrl("views/CalendarChoicePopup.qml"),{"model":eventModel});
234 pageStack.currentPage.collectionUpdated.connect(eventModel.delayedApplyFilter);
235 }
236 }
237
238=== renamed file 'calendar-app@30.png' => 'app/calendar-app@30.png'
239=== renamed file 'calendar.qml' => 'app/calendar.qml'
240--- calendar.qml 2014-09-19 08:11:17 +0000
241+++ app/calendar.qml 2014-10-20 19:18:23 +0000
242@@ -20,8 +20,11 @@
243 import Ubuntu.Components.Popups 1.0
244 import QtOrganizer 5.0
245 import Ubuntu.SyncMonitor 0.1
246-
247-import "dateExt.js" as DateExt
248+import "components"
249+import "views"
250+
251+import "components/dateExt.js" as DateExt
252+
253
254 MainView {
255 id: mainView
256@@ -180,7 +183,7 @@
257 eventModel.onItemsFetched.connect( function(id,fetchedItems) {
258 if( requestId === id && fetchedItems.length > 0 ) {
259 var event = fetchedItems[0];
260- pageStack.push(Qt.resolvedUrl("EventDetails.qml"),{"event":event,"model": eventModel});
261+ pageStack.push(Qt.resolvedUrl("../events/EventDetails.qml"),{"event":event,"model": eventModel});
262 }
263 });
264 requestId = eventModel.fetchItems([args.values.eventid]);
265@@ -223,7 +226,7 @@
266 endDate = new Date(endTime);
267 }
268 }
269- //pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"startDate": startDate, "endDate": endDate, //"model":eventModel});
270+ //pageStack.push(Qt.resolvedUrl("events/NewEvent.qml"),{"startDate": startDate, "endDate": endDate, //"model":eventModel});
271 }
272
273 // This function calculate the difference between --endtime and --starttime and choose the better view
274@@ -296,6 +299,7 @@
275
276 EventActions {
277 id: commonHeaderActions
278+
279 }
280
281 Keys.onTabPressed: {
282@@ -327,7 +331,7 @@
283 page: Loader{
284 id: yearViewLoader
285 objectName: "yearViewLoader"
286- source: tabs.selectedTab == yearTab ? Qt.resolvedUrl("YearView.qml"):""
287+ source: tabs.selectedTab == yearTab ? Qt.resolvedUrl("views/YearView.qml"):""
288 onLoaded: {
289 item.currentYear = tabs.currentDay.getFullYear();
290 }
291@@ -361,7 +365,7 @@
292 page: Loader{
293 id: monthViewLoader
294 objectName: "monthViewLoader"
295- source: tabs.selectedTab == monthTab ? Qt.resolvedUrl("MonthView.qml"):""
296+ source: tabs.selectedTab == monthTab ? Qt.resolvedUrl("views/MonthView.qml"):""
297 onLoaded: {
298 item.currentMonth = tabs.currentDay.midnight();
299 }
300@@ -389,7 +393,7 @@
301 page: Loader{
302 id: weekViewLoader
303 objectName: "weekViewLoader"
304- source: tabs.selectedTab == weekTab ? Qt.resolvedUrl("WeekView.qml"):""
305+ source: tabs.selectedTab == weekTab ? Qt.resolvedUrl("views/WeekView.qml"):""
306 onLoaded: {
307 item.isCurrentPage= Qt.binding(function() { return tabs.selectedTab == weekTab })
308 item.dayStart = tabs.currentDay;
309@@ -422,7 +426,7 @@
310 page: Loader{
311 id: dayViewLoader
312 objectName: "dayViewLoader"
313- source: tabs.selectedTab == dayTab ? Qt.resolvedUrl("DayView.qml"):""
314+ source: tabs.selectedTab == dayTab ? Qt.resolvedUrl("views/DayView.qml"):""
315 onLoaded: {
316 item.isCurrentPage= Qt.binding(function() { return tabs.selectedTab == dayTab })
317 item.currentDay = tabs.currentDay;
318@@ -450,7 +454,7 @@
319 page: Loader {
320 id: agendaViewLoader
321 objectName: "agendaViewLoader"
322- source: tabs.selectedTab == agendaTab ? Qt.resolvedUrl("AgendaView.qml"):""
323+ source: tabs.selectedTab == agendaTab ? Qt.resolvedUrl("views/AgendaView.qml"):""
324
325 onLoaded: {
326 item.currentDay = tabs.currentDay;
327
328=== added directory 'app/components'
329=== added file 'app/components/CMakeLists.txt'
330--- app/components/CMakeLists.txt 1970-01-01 00:00:00 +0000
331+++ app/components/CMakeLists.txt 2014-10-20 19:18:23 +0000
332@@ -0,0 +1,6 @@
333+file(GLOB COMPONENTS_QML_JS_FILES *.qml *.js)
334+
335+# make the files visible in the qtcreator tree
336+add_custom_target(ubuntu-calendar-app_components_QMlFiles ALL SOURCES ${COMPONENTS_QML_JS_FILES})
337+
338+install(FILES ${COMPONENTS_QML_JS_FILES} DESTINATION ${UBUNTU-CALENDAR_APP_DIR}/components)
339
340=== renamed file 'ColorPickerDialog.qml' => 'app/components/ColorPickerDialog.qml'
341=== renamed file 'DayHeaderBackground.qml' => 'app/components/DayHeaderBackground.qml'
342--- DayHeaderBackground.qml 2014-09-20 10:45:35 +0000
343+++ app/components/DayHeaderBackground.qml 2014-10-20 19:18:23 +0000
344@@ -16,13 +16,14 @@
345 * along with this program. If not, see <http://www.gnu.org/licenses/>.
346 */
347 import QtQuick 2.3
348+import "../images"
349
350 Item {
351 width: parent.width
352 height:parent.height
353 BorderImage {
354 id: separator
355- source: "PageHeaderBaseDividerLight.png"
356+ source: "../images/PageHeaderBaseDividerLight.png"
357 width: parent.width;
358 height: parent.height
359 }
360@@ -33,6 +34,6 @@
361 left: parent.left
362 right: parent.right
363 }
364- source: "PageHeaderBaseDividerBottom.png"
365+ source: "../images/PageHeaderBaseDividerBottom.png"
366 }
367 }
368
369=== renamed file 'EventBubble.qml' => 'app/components/EventBubble.qml'
370=== renamed file 'EventListModel.qml' => 'app/components/EventListModel.qml'
371=== renamed file 'HeaderDateComponent.qml' => 'app/components/HeaderDateComponent.qml'
372=== renamed file 'PathViewBase.qml' => 'app/components/PathViewBase.qml'
373=== renamed file 'ViewType.js' => 'app/components/ViewType.js'
374=== renamed file 'colorUtils.js' => 'app/components/colorUtils.js'
375=== renamed file 'dateExt.js' => 'app/components/dateExt.js'
376=== added directory 'app/events'
377=== added file 'app/events/CMakeLists.txt'
378--- app/events/CMakeLists.txt 1970-01-01 00:00:00 +0000
379+++ app/events/CMakeLists.txt 2014-10-20 19:18:23 +0000
380@@ -0,0 +1,6 @@
381+file(GLOB EVENTS_QML_JS_FILES *.qml *.js)
382+
383+# make the files visible in the qtcreator tree
384+add_custom_target(ubuntu-calendar-app_events_QMlFiles ALL SOURCES ${EVENTS_QML_JS_FILES})
385+
386+install(FILES ${EVENTS_QML_JS_FILES} DESTINATION ${UBUNTU-CALENDAR_APP_DIR}/events)
387
388=== renamed file 'ContactChoicePopup.qml' => 'app/events/ContactChoicePopup.qml'
389=== renamed file 'Defines.js' => 'app/events/Defines.js'
390=== renamed file 'DeleteConfirmationDialog.qml' => 'app/events/DeleteConfirmationDialog.qml'
391=== renamed file 'EditEventConfirmationDialog.qml' => 'app/events/EditEventConfirmationDialog.qml'
392=== renamed file 'EventDetails.qml' => 'app/events/EventDetails.qml'
393=== renamed file 'EventReminder.qml' => 'app/events/EventReminder.qml'
394=== renamed file 'EventRepetition.qml' => 'app/events/EventRepetition.qml'
395=== renamed file 'EventUtils.qml' => 'app/events/EventUtils.qml'
396=== renamed file 'KeyboardRectangle.qml' => 'app/events/KeyboardRectangle.qml'
397=== renamed file 'LimitLabelDefines.qml' => 'app/events/LimitLabelDefines.qml'
398=== renamed file 'NewEvent.qml' => 'app/events/NewEvent.qml'
399--- NewEvent.qml 2014-10-20 15:24:00 +0000
400+++ app/events/NewEvent.qml 2014-10-20 19:18:23 +0000
401@@ -24,6 +24,7 @@
402 import Ubuntu.Components.Themes.Ambiance 1.0
403 import Ubuntu.Components.Pickers 1.0
404 import QtOrganizer 5.0
405+import "../components"
406 import "Defines.js" as Defines
407
408 Page {
409
410=== renamed file 'NewEventEntryField.qml' => 'app/events/NewEventEntryField.qml'
411=== renamed file 'Recurrence.js' => 'app/events/Recurrence.js'
412=== renamed file 'RecurrenceLabelDefines.qml' => 'app/events/RecurrenceLabelDefines.qml'
413=== renamed file 'RemindersModel.qml' => 'app/events/RemindersModel.qml'
414=== renamed file 'ScrollAnimation.qml' => 'app/events/ScrollAnimation.qml'
415=== added directory 'app/images'
416=== added file 'app/images/CMakeLists.txt'
417--- app/images/CMakeLists.txt 1970-01-01 00:00:00 +0000
418+++ app/images/CMakeLists.txt 2014-10-20 19:18:23 +0000
419@@ -0,0 +1,6 @@
420+file(GLOB IMAGES_FILES *.png *.jpg *.svg)
421+
422+# make the files visible in the qtcreator tree
423+add_custom_target(ubuntu-calendar-app_images_QMlFiles ALL SOURCES ${IMAGES_FILES})
424+
425+install(FILES ${IMAGES_FILES} DESTINATION ${UBUNTU-CALENDAR_APP_DIR}/images)
426
427=== renamed file 'PageHeaderBaseDividerBottom@18.png' => 'app/images/PageHeaderBaseDividerBottom@18.png'
428=== renamed file 'PageHeaderBaseDividerLight@18.png' => 'app/images/PageHeaderBaseDividerLight@18.png'
429=== added directory 'app/timelineComponents'
430=== renamed file 'AllDayEventComponent.qml' => 'app/timelineComponents/AllDayEventComponent.qml'
431--- AllDayEventComponent.qml 2014-10-20 15:20:21 +0000
432+++ app/timelineComponents/AllDayEventComponent.qml 2014-10-20 19:18:23 +0000
433@@ -19,8 +19,8 @@
434 import Ubuntu.Components 1.1
435 import Ubuntu.Components.Popups 1.0
436
437-import "dateExt.js" as DateExt
438-import "ViewType.js" as ViewType
439+import "../components/dateExt.js" as DateExt
440+import "../components/ViewType.js" as ViewType
441
442 Item {
443 id: root
444@@ -85,7 +85,7 @@
445 if( allDayButton.events.length > 1 ) {
446 PopupUtils.open(popoverComponent, root,{"events": allDayButton.events})
447 } else {
448- pageStack.push(Qt.resolvedUrl("EventDetails.qml"),{"event":allDayButton.events[0],"model": root.model});
449+ pageStack.push(Qt.resolvedUrl("../events/EventDetails.qml"),{"event":allDayLabel.events[0],"model": root.model});
450 }
451 }
452 }
453@@ -111,8 +111,8 @@
454 text = i18n.tr("%1 ev.").arg(events.length)
455 } else {
456 if( events.length > 1) {
457- // TRANSLATORS: the argument refers to the number of all day events
458- text = i18n.tr("%1 all day event", "%1 all day events", events.length).arg(events.length)
459+ // TRANSLATORS: the argument refers to the number of all day events
460+ text = i18n.tr("%1 all day event", "%1 all day events", events.length).arg(events.length)
461 } else {
462 text = events[0].displayLabel;
463 }
464@@ -155,7 +155,7 @@
465 anchors.fill: parent
466 onClicked: {
467 popover.hide();
468- pageStack.push(Qt.resolvedUrl("EventDetails.qml"),{"event":modelData,"model": root.model});
469+ pageStack.push(Qt.resolvedUrl("../events/EventDetails.qml"),{"event":modelData,"model": root.model});
470 }
471 }
472 }
473
474=== added file 'app/timelineComponents/CMakeLists.txt'
475--- app/timelineComponents/CMakeLists.txt 1970-01-01 00:00:00 +0000
476+++ app/timelineComponents/CMakeLists.txt 2014-10-20 19:18:23 +0000
477@@ -0,0 +1,6 @@
478+file(GLOB TIMELINE_COMPONENTS_QML_JS_FILES *.qml *.js)
479+
480+# make the files visible in the qtcreator tree
481+add_custom_target(ubuntu-calendar-app_timeline_components_QMlFiles ALL SOURCES ${TIMELINE_COMPONENTS_QML_JS_FILES})
482+
483+install(FILES ${TIMELINE_COMPONENTS_QML_JS_FILES} DESTINATION ${UBUNTU-CALENDAR_APP_DIR}/timelineComponents)
484
485=== renamed file 'EventLayoutHelper.js' => 'app/timelineComponents/EventLayoutHelper.js'
486=== renamed file 'TimeLineBackground.qml' => 'app/timelineComponents/TimeLineBackground.qml'
487--- TimeLineBackground.qml 2014-10-04 02:19:01 +0000
488+++ app/timelineComponents/TimeLineBackground.qml 2014-10-20 19:18:23 +0000
489@@ -18,6 +18,7 @@
490
491 import QtQuick 2.3
492 import Ubuntu.Components 1.1
493+import "../components"
494
495 Column {
496 width: parent.width
497
498=== renamed file 'TimeLineBase.qml' => 'app/timelineComponents/TimeLineBase.qml'
499--- TimeLineBase.qml 2014-10-03 03:24:29 +0000
500+++ app/timelineComponents/TimeLineBase.qml 2014-10-20 19:18:23 +0000
501@@ -17,7 +17,9 @@
502 */
503 import QtQuick 2.3
504 import Ubuntu.Components 1.1
505-import "dateExt.js" as DateExt
506+import "../components"
507+import "../components/dateExt.js" as DateExt
508+
509
510 Item {
511 id: bubbleOverLay
512@@ -34,7 +36,7 @@
513 var selectedDate = new Date(day);
514 var hour = parseInt(mouseY / hourHeight);
515 selectedDate.setHours(hour)
516- pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});
517+ pageStack.push(Qt.resolvedUrl("..events/NewEvent.qml"), {"date":selectedDate, "model":eventModel});
518 }
519 }
520
521@@ -54,7 +56,7 @@
522 }
523
524 function showEventDetails(event) {
525- pageStack.push(Qt.resolvedUrl("EventDetails.qml"), {"event":event,"model":model});
526+ pageStack.push(Qt.resolvedUrl("../events/EventDetails.qml"), {"event":event,"model":model});
527 }
528
529 WorkerScript {
530
531=== renamed file 'TimeLineBaseComponent.qml' => 'app/timelineComponents/TimeLineBaseComponent.qml'
532--- TimeLineBaseComponent.qml 2014-10-04 02:19:01 +0000
533+++ app/timelineComponents/TimeLineBaseComponent.qml 2014-10-20 19:18:23 +0000
534@@ -21,8 +21,10 @@
535 import Ubuntu.Components 1.1
536 import Ubuntu.Components.Popups 1.0
537 import QtOrganizer 5.0
538-import "dateExt.js" as DateExt
539-import "ViewType.js" as ViewType
540+import "../components"
541+import "../components/dateExt.js" as DateExt
542+import "../components/ViewType.js" as ViewType
543+
544
545 Item {
546 id: root
547
548=== renamed file 'TimeLineHeader.qml' => 'app/timelineComponents/TimeLineHeader.qml'
549--- TimeLineHeader.qml 2014-10-03 04:15:55 +0000
550+++ app/timelineComponents/TimeLineHeader.qml 2014-10-20 19:18:23 +0000
551@@ -18,7 +18,9 @@
552
553 import QtQuick 2.3
554 import Ubuntu.Components 1.1
555-import "ViewType.js" as ViewType
556+import "../components"
557+import "../components/dateExt.js" as DateExt
558+import "../components/ViewType.js" as ViewType
559
560 PathViewBase {
561 id: header
562
563=== renamed file 'TimeLineHeaderComponent.qml' => 'app/timelineComponents/TimeLineHeaderComponent.qml'
564--- TimeLineHeaderComponent.qml 2014-10-03 04:15:55 +0000
565+++ app/timelineComponents/TimeLineHeaderComponent.qml 2014-10-20 19:18:23 +0000
566@@ -18,8 +18,10 @@
567
568 import QtQuick 2.3
569 import Ubuntu.Components 1.1
570-import "dateExt.js" as DateExt
571-import "ViewType.js" as ViewType
572+import "../components"
573+import "../components/dateExt.js" as DateExt
574+import "../components/ViewType.js" as ViewType
575+
576
577 Row{
578 id: header
579
580=== renamed file 'TimeSeparator.qml' => 'app/timelineComponents/TimeSeparator.qml'
581=== added directory 'app/views'
582=== renamed file 'AgendaView.qml' => 'app/views/AgendaView.qml'
583--- AgendaView.qml 2014-09-20 14:08:18 +0000
584+++ app/views/AgendaView.qml 2014-10-20 19:18:23 +0000
585@@ -19,7 +19,9 @@
586 import QtQuick 2.3
587 import QtOrganizer 5.0
588 import Ubuntu.Components 1.1
589-import "dateExt.js" as DateExt
590+import "../components"
591+import "../components/dateExt.js" as DateExt
592+
593
594 Page{
595 id: root
596@@ -278,7 +280,7 @@
597 id: mouseArea
598 anchors.fill: parent
599 onClicked: {
600- pageStack.push(Qt.resolvedUrl("EventDetails.qml"), {"event":event,"model":eventListModel});
601+ pageStack.push(Qt.resolvedUrl("../events/EventDetails.qml"), {"event":event,"model":eventListModel});
602 }
603 }
604 }
605
606=== added file 'app/views/CMakeLists.txt'
607--- app/views/CMakeLists.txt 1970-01-01 00:00:00 +0000
608+++ app/views/CMakeLists.txt 2014-10-20 19:18:23 +0000
609@@ -0,0 +1,6 @@
610+file(GLOB VIEWS_QML_JS_FILES *.qml *.js)
611+
612+# make the files visible in the qtcreator tree
613+add_custom_target(ubuntu-calendar-app_views_QMlFiles ALL SOURCES ${VIEWS_QML_JS_FILES})
614+
615+install(FILES ${VIEWS_QML_JS_FILES} DESTINATION ${UBUNTU-CALENDAR_APP_DIR}/views)
616
617=== renamed file 'CalendarChoicePopup.qml' => 'app/views/CalendarChoicePopup.qml'
618=== renamed file 'DayView.qml' => 'app/views/DayView.qml'
619--- DayView.qml 2014-10-20 13:55:14 +0000
620+++ app/views/DayView.qml 2014-10-20 19:18:23 +0000
621@@ -18,8 +18,12 @@
622
623 import QtQuick 2.3
624 import Ubuntu.Components 1.1
625-import "dateExt.js" as DateExt
626-import "ViewType.js" as ViewType
627+import "../timelineComponents"
628+import "../components"
629+import "../events"
630+import "../components/dateExt.js" as DateExt
631+import "../components/ViewType.js" as ViewType
632+
633
634 Page{
635 id: dayViewPage
636
637=== renamed file 'MonthComponent.qml' => 'app/views/MonthComponent.qml'
638--- MonthComponent.qml 2014-10-02 13:44:25 +0000
639+++ app/views/MonthComponent.qml 2014-10-20 19:18:23 +0000
640@@ -17,9 +17,9 @@
641 */
642 import QtQuick 2.3
643 import Ubuntu.Components 1.1
644-import "dateExt.js" as DateExt
645-import "colorUtils.js" as Color
646-
647+import "../components/dateExt.js" as DateExt
648+import "../components/colorUtils.js" as Color
649+import "../components"
650 Item{
651 id: root
652 objectName: "MonthComponent"
653@@ -254,7 +254,7 @@
654 selectedDate.setMonth(intern.monthStartMonth + 1)
655 selectedDate.setDate(date)
656 selectedDate.setMinutes(60, 0, 0)
657- pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});
658+ pageStack.push(Qt.resolvedUrl("../events/NewEvent.qml"), {"date":selectedDate, "model":eventModel});
659 }
660 onClicked: {
661 var selectedDate = new Date(intern.monthStartYear,
662
663=== renamed file 'MonthView.qml' => 'app/views/MonthView.qml'
664--- MonthView.qml 2014-10-02 13:44:25 +0000
665+++ app/views/MonthView.qml 2014-10-20 19:18:23 +0000
666@@ -17,8 +17,9 @@
667 */
668 import QtQuick 2.3
669 import Ubuntu.Components 1.1
670-import "dateExt.js" as DateExt
671-import "colorUtils.js" as Color
672+import "../components"
673+import "../components/dateExt.js" as DateExt
674+import "../components/colorUtils.js" as Color
675
676 Page {
677 id: monthViewPage
678
679=== renamed file 'ViewHeader.qml' => 'app/views/ViewHeader.qml'
680=== renamed file 'WeekView.qml' => 'app/views/WeekView.qml'
681--- WeekView.qml 2014-09-21 09:39:21 +0000
682+++ app/views/WeekView.qml 2014-10-20 19:18:23 +0000
683@@ -18,8 +18,10 @@
684
685 import QtQuick 2.3
686 import Ubuntu.Components 1.1
687-import "dateExt.js" as DateExt
688-import "ViewType.js" as ViewType
689+import "../components"
690+import "../timelineComponents"
691+import "../components/dateExt.js" as DateExt
692+import "../components/ViewType.js" as ViewType
693
694 Page{
695 id: weekViewPage
696
697=== renamed file 'YearView.qml' => 'app/views/YearView.qml'
698--- YearView.qml 2014-10-02 13:44:25 +0000
699+++ app/views/YearView.qml 2014-10-20 19:18:23 +0000
700@@ -18,8 +18,9 @@
701
702 import QtQuick 2.3
703 import Ubuntu.Components 1.1
704+import "../components"
705
706-import "dateExt.js" as DateExt
707+import "../components/dateExt.js" as DateExt
708 Page {
709 id: yearViewPage
710 objectName: "yearViewPage"
711
712=== removed file 'calendar-app.in'
713--- calendar-app.in 2014-04-16 17:10:31 +0000
714+++ calendar-app.in 1970-01-01 00:00:00 +0000
715@@ -1,3 +0,0 @@
716-#!/bin/sh
717-export QT_SELECT=qt5
718-exec qmlscene @CMAKE_INSTALL_PREFIX@/@DATA_DIR@/@MAIN_QML@
719
720=== removed file 'calendarTests.qml'
721--- calendarTests.qml 2014-09-20 10:45:35 +0000
722+++ calendarTests.qml 1970-01-01 00:00:00 +0000
723@@ -1,30 +0,0 @@
724-/*
725- * Copyright (C) 2013-2014 Canonical Ltd
726- *
727- * This file is part of Ubuntu Calendar App
728- *
729- * Ubuntu Calendar App is free software: you can redistribute it and/or modify
730- * it under the terms of the GNU General Public License version 3 as
731- * published by the Free Software Foundation.
732- *
733- * Ubuntu Calendar App is distributed in the hope that it will be useful,
734- * but WITHOUT ANY WARRANTY; without even the implied warranty of
735- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
736- * GNU General Public License for more details.
737- *
738- * You should have received a copy of the GNU General Public License
739- * along with this program. If not, see <http://www.gnu.org/licenses/>.
740- */
741-import QtQuick 2.3
742-import Ubuntu.Components 1.1
743-
744-MainView {
745- width: units.gu(20)
746- height: units.gu(20)
747- Button {
748- anchors.fill: parent
749- anchors.margins: units.gu(5)
750- text: "Close"
751- onClicked: Qt.quit()
752- }
753-}
754
755=== added directory 'js'
756=== modified file 'tests/autopilot/calendar_app/tests/__init__.py'
757--- tests/autopilot/calendar_app/tests/__init__.py 2014-09-30 00:38:14 +0000
758+++ tests/autopilot/calendar_app/tests/__init__.py 2014-10-20 19:18:23 +0000
759@@ -44,7 +44,7 @@
760 """
761
762 local_location = os.path.dirname(os.path.dirname(os.getcwd()))
763- local_location_qml = os.path.join(local_location, 'calendar.qml')
764+ local_location_qml = os.path.join(local_location+'/app', 'calendar.qml')
765 installed_location_qml = "/usr/share/calendar-app/calendar.qml"
766
767 def get_launcher_and_type(self):
768
769=== modified file 'tests/unittests/tst_date.qml'
770--- tests/unittests/tst_date.qml 2014-08-18 16:48:54 +0000
771+++ tests/unittests/tst_date.qml 2014-10-20 19:18:23 +0000
772@@ -17,7 +17,7 @@
773 */
774 import QtQuick 2.0
775 import QtTest 1.0
776-import "../../dateExt.js" as DATE
777+import "../../components/dateExt.js" as DATE
778
779 TestCase{
780 name: "Date tests"

Subscribers

People subscribed via source and target branches

to status/vote changes: