[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-weather-app/snap_fix_1552100 into lp:ubuntu-weather-app

2016-11-23 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-weather-app/snap_fix_1552100 into lp:ubuntu-weather-app 
with lp:~gary-wzl77/ubuntu-weather-app/fix_151 as a prerequisite.

Commit message:
create snap package by using ubuntu-app-platform plugin.

Requested reviews:
  Ubuntu Weather Developers (ubuntu-weather-dev)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-weather-app/snap_fix_1552100/+merge/311681

create snap package by using ubuntu-app-platform plugin.
-- 
Your team Ubuntu Weather Developers is requested to review the proposed merge 
of lp:~gary-wzl77/ubuntu-weather-app/snap_fix_1552100 into 
lp:ubuntu-weather-app.
=== added directory 'snap'
=== added directory 'snap/ubuntu-app-platform'
=== added file 'snapcraft.yaml'
--- snapcraft.yaml	1970-01-01 00:00:00 +
+++ snapcraft.yaml	2016-11-24 03:54:04 +
@@ -0,0 +1,33 @@
+name: ubuntu-weather-app
+version: '0.1'
+summary: ubuntu weather app.
+description: |
+A weather forecast application for Ubuntu with support for multiple online weather data sources.
+grade: devel
+confinement: devmode
+architectures: [all]
+
+apps:
+ubuntu-weather-app:
+command: desktop-launch qmlscene --desktop_file_hint=unity8 $SNAP/usr/share/ubuntu-weather-app/app/ubuntu-weather-app.qml 
+plugs: [unity7, platform, opengl, home, gsettings]
+
+plugs:
+platform:
+interface: content
+content: ubuntu-app-platform1
+target:  ubuntu-app-platform
+default-provider: ubuntu-app-platform
+
+parts:
+  ubuntu-weather-app:
+plugin: cmake
+configflags: [-DCMAKE_INSTALL_PREFIX=/usr, -DCLICK_MODE=off]
+source: .
+build-packages:
+- cmake
+- intltool
+after: [desktop-ubuntu-app-platform]
+  environment:
+source: snap/
+plugin: dump

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/add_prefix into lp:ubuntu-calendar-app

2016-01-11 Thread Gary.Wang
Looks like Jenkins issue:
DEBUG: jenkins job parameter [use_description_for_commit]: not found

-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/add_prefix/+merge/267317
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix_1515722 into lp:ubuntu-calendar-app

2016-01-11 Thread Gary.Wang
Looks like Jenkins issue:
DEBUG: jenkins job parameter [use_description_for_commit]: not found

-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1515722/+merge/278759
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix_1515722 into lp:ubuntu-calendar-app

2015-12-21 Thread Gary.Wang
leave a comment for Kunal's suggestion.

Diff comments:

> 
> === modified file 'TimeLineBase.qml'
> --- TimeLineBase.qml  2015-08-20 12:27:59 +
> +++ TimeLineBase.qml  2015-11-27 01:49:25 +
> @@ -221,28 +221,27 @@
>  if (event.endDateTime - day  == 0)
>  return;
>  
> -if (event.endDateTime.getDate() - day.getDate() == 0 &&
> -event.startDateTime.getDate() - day.getDate() == 0) {
> +if (event.endDateTime.isSameDay(day) &&
> +event.endDateTime.isSameDay(event.startDateTime)) {
>  hour = event.startDateTime.getHours();
>  yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + 
> hour * hourHeight
> -durationMin = (event.endDateTime.getHours() - 
> event.startDateTime.getHours()) * 60;
> -durationMin += (event.endDateTime.getMinutes() - 
> event.startDateTime.getMinutes());
> +durationMin = (event.endDateTime - event.startDateTime)  / 
> Date.msPerMin;
>  }
> -if (event.endDateTime.getDate() - day.getDate() == 0 &&
> -event.startDateTime - day < 0) {
> +if (!event.startDateTime.isSameDay(day) &&
> +event.endDateTime.isSameDay(day)) {
>  hour = 0;
>  yPos = 0;
>  durationMin = event.endDateTime.getHours() * 60;
>  durationMin += event.endDateTime.getMinutes();
>  }
> -if (event.startDateTime.getDate() - day.getDate() == 0 &&
> -event.endDateTime - day >= Date.msPerDay) {
> +if (event.startDateTime.isSameDay(day) &&
> +!event.endDateTime.isSameDay(day)) {
>  hour = event.startDateTime.getHours();
>  yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + 
> hour * hourHeight
>  durationMin = (24 - event.startDateTime.getHours()) * 60;
>  }
> -if (event.endDateTime - day  >= Date.msPerDay &&
> -event.startDateTime- day <= 0) {
> +if (!event.startDateTime.isSameDay(day) &&

@Kunal, Sorry for the late reply. 
Thanks for your comment.
This MR is mainly about issues lp #1515722 and lp #1523594
If these two issues are fixed with this MR. It's better we can merge it.

For UI, personally I prefer to keep current implementation(filling whole 
timeline) since we have it for a period of time. This is a minor issue.But 
anyway please have a check with UX team about it.
We can create another bug for this if UX team think "event displays in whole 
day section" is a better user experience.
But currently we're blocked by this *minor* issue.
Thanks. How about your ideas?

> +!event.endDateTime.isSameDay(day)) {
>  hour = 0;
>  yPos = 0;
>  durationMin = 24 * 60;


-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1515722/+merge/278759
Your team Ubuntu Calendar Developers is requested to review the proposed merge 
of lp:~gary-wzl77/ubuntu-calendar-app/fix_1515722 into lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/lunar_calendar_support into lp:ubuntu-calendar-app

2015-11-23 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-calendar-app/lunar_calendar_support into 
lp:ubuntu-calendar-app with lp:~gary-wzl77/ubuntu-calendar-app/show-week-number 
as a prerequisite.

Commit message:
Add lunar calendar support

Requested reviews:
  Yuan-Chen Cheng (ycheng-twn)
  Jenkins Bot (ubuntu-core-apps-jenkins-bot): continuous-integration
  Alan Pope  (popey)
Related bugs:
  Bug #1513099 in Ubuntu Calendar App: "Have a Lunar Calendar for Chinese user"
  https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1513099

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/lunar_calendar_support/+merge/278288

Add lunar calendar support
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== added directory '3rd-party'
=== added file '3rd-party/lunar.js'
--- 3rd-party/lunar.js	1970-01-01 00:00:00 +
+++ 3rd-party/lunar.js	2015-11-23 09:30:32 +
@@ -0,0 +1,515 @@
+/**
+* @1900-2100区间内的公历、农历互转
+* @charset  UTF-8
+* @Author  Ajing(jjonl...@jjonline.cn) 
+* @Time  2014-7-21
+* @Version  $ID$
+* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
+* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
+* http://blog.jjonline.cn/userInterFace/173.html
+*/
+var calendar = {
+ 
+ /**
+ * 农历1900-2100的润大小信息表
+ * @Array Of Property
+ * @return Hex 
+ */
+ lunarInfo:[0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,//1900-1909
+ 0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,//1910-1919
+ 0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,//1920-1929
+ 0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,//1930-1939
+ 0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,//1940-1949
+ 0x06ca0,0x0b550,0x15355,0x04da0,0x0a5b0,0x14573,0x052b0,0x0a9a8,0x0e950,0x06aa0,//1950-1959
+ 0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,//1960-1969
+ 0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b6a0,0x195a6,//1970-1979
+ 0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,//1980-1989
+ 0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,//1990-1999
+ 0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,//2000-2009
+ 0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,//2010-2019
+ 0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,//2020-2029
+ 0x05aa0,0x076a3,0x096d0,0x04bd7,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,//2030-2039
+ 0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0,//2040-2049
+ /**Add By jjonl...@jjonline.cn**/
+ 0x14b63,0x09370,0x049f8,0x04970,0x064b0,0x168a6,0x0ea50, 0x06b20,0x1a6c4,0x0aae0,//2050-2059
+ 0x0a2e0,0x0d2e3,0x0c960,0x0d557,0x0d4a0,0x0da50,0x05d55,0x056a0,0x0a6d0,0x055d4,//2060-2069
+ 0x052d0,0x0a9b8,0x0a950,0x0b4a0,0x0b6a6,0x0ad50,0x055a0,0x0aba4,0x0a5b0,0x052b0,//2070-2079
+ 0x0b273,0x06930,0x07337,0x06aa0,0x0ad50,0x14b55,0x04b60,0x0a570,0x054e4,0x0d160,//2080-2089
+ 0x0e968,0x0d520,0x0daa0,0x16aa6,0x056d0,0x04ae0,0x0a9d4,0x0a2d0,0x0d150,0x0f252,//2090-2099
+ 0x0d520],//2100
+ 
+ 
+ /**
+ * 公历每个月份的天数普通表
+ * @Array Of Property
+ * @return Number 
+ */
+ solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],
+ 
+ 
+ /**
+ * 天干地支之天干速查表
+ * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
+ * @return Cn string 
+ */
+ Gan:["\u7532","\u4e59","\u4e19","\u4e01","\u620a","\u5df1","\u5e9a","\u8f9b","\u58ec","\u7678"],
+ 
+ 
+ /**
+ * 天干地支之地支速查表
+ * @Array Of Property 
+ * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
+ * @return Cn string 
+ */
+ Zhi:["\u5b50","\u4e11","\u5bc5","\u536f","\u8fb0","\u5df3","\u5348","\u672a","\u7533","\u9149","\u620c","\u4ea5"],
+ 
+ 
+ /**
+ * 天干地支之地支速查表<=>生肖
+ * @Array Of Property 
+ * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
+ * @return Cn string 
+ */
+ Animals:["\u9f20","\u725b","\u864e","\u5154","\u9f99","\u86c7","\u9a6c","\u7f8a","\u7334","\u9e21","\u72d7","\u732a"],
+ 
+ 
+ /**
+ * 24节气速查表
+ * @Array Of Property 
+ * @trans["

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/add_prefix into lp:ubuntu-calendar-app

2015-11-08 Thread Gary.Wang
@Alan There is no need to make code change on unity-scope_event.
 I fix failed test case 2 that Ethan mentioned above in Revno: 719. Please 
review.
 Thanks.
-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/add_prefix/+merge/267317
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/opt_dynamic_creation into lp:ubuntu-calendar-app

2015-08-23 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-calendar-app/opt_dynamic_creation into 
lp:ubuntu-calendar-app.

Commit message:
Performance tunning for page transition.
Page Transition between different views will cause dynamic 
creation(Qt.ResolvedUrl)
for qml object back and forth.Using Qt.CreateComponent for dynamic creation for 
1st
time and reuse exsiting obj without re-creating.

Requested reviews:
  Ubuntu Calendar Developers (ubuntu-calendar-dev)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/opt_dynamic_creation/+merge/268867

Performance tunning for page transition.
Page Transition between different views will cause dynamic 
creation(Qt.ResolvedUrl)
for qml object back and forth.Using Qt.CreateComponent for dynamic creation for 
1st
time and reuse exsiting obj without re-creating.
-- 
Your team Ubuntu Calendar Developers is requested to review the proposed merge 
of lp:~gary-wzl77/ubuntu-calendar-app/opt_dynamic_creation into 
lp:ubuntu-calendar-app.
=== modified file 'AgendaView.qml'
--- AgendaView.qml	2015-02-22 10:18:16 +
+++ AgendaView.qml	2015-08-24 03:08:58 +
@@ -60,7 +60,8 @@
 commonHeaderActions.newEventAction,
 commonHeaderActions.showCalendarAction,
 commonHeaderActions.reloadAction,
-commonHeaderActions.syncCalendarAction
+commonHeaderActions.syncCalendarAction,
+commonHeaderActions.settingsAction
 ]
 
 EventListModel {

=== modified file 'AllDayEventComponent.qml'
--- AllDayEventComponent.qml	2015-06-16 09:18:21 +
+++ AllDayEventComponent.qml	2015-08-24 03:08:58 +
@@ -40,6 +40,9 @@
 for(var i = 0 ; i  items.length ; ++i) {
 var event = items[(i)];
 if( event  event.allDay ) {
+
+console.log(event.startDateTime, event.startDateTime,event.endDateTime,event.endDateTime);
+
 for(var d = event.startDateTime; d  event.endDateTime; d = d.addDays(1)) {
 var key = Qt.formatDateTime(d, dd-MMM-);
 if( !(key in map)) {

=== modified file 'ContactChoicePopup.qml'
--- ContactChoicePopup.qml	2014-09-20 10:45:35 +
+++ ContactChoicePopup.qml	2015-08-24 03:08:58 +
@@ -94,7 +94,7 @@
 objectName: contactPopoverList
 width: parent.width
 model: contactModel
-height: units.gu(30)
+height: units.gu(15)
 clip: true
 delegate: Standard{
 objectName: contactPopoverList%1.arg(index)

=== modified file 'DayView.qml'
--- DayView.qml	2015-02-18 19:27:20 +
+++ DayView.qml	2015-08-24 03:08:58 +
@@ -49,7 +49,8 @@
 commonHeaderActions.newEventAction,
 commonHeaderActions.showCalendarAction,
 commonHeaderActions.reloadAction,
-commonHeaderActions.syncCalendarAction
+commonHeaderActions.syncCalendarAction,
+commonHeaderActions.settingsAction
 ]
 
 contents: Label {

=== modified file 'EventActions.qml'
--- EventActions.qml	2015-04-13 19:40:48 +
+++ EventActions.qml	2015-08-24 03:08:58 +
@@ -26,6 +26,7 @@
 property alias newEventAction: _newEventAction
 property alias showCalendarAction: _showCalendarAction
 property alias syncCalendarAction: _syncCalendarAction
+property alias settingsAction: _settingsAction
 
 Action {
 id: _syncCalendarAction
@@ -63,4 +64,14 @@
 pageStack.currentPage.collectionUpdated.connect(eventModel.delayedApplyFilter);
 }
 }
+
+Action{
+id: _settingsAction
+objectName: settingsbutton
+iconName: settings
+text: i18n.tr(Settings)
+onTriggered: {
+pageStack.push(Qt.resolvedUrl(Settings.qml));
+}
+}
 }

=== modified file 'EventBubble.qml'
--- EventBubble.qml	2015-01-22 19:34:59 +
+++ EventBubble.qml	2015-08-24 03:08:58 +
@@ -221,8 +221,8 @@
 anchors.fill: parent
 drag.target: isLiveEditing ? infoBubble : null
 drag.axis: Drag.YAxis
-drag.minimumY: flickable.y
-drag.maximumY: flickable.contentHeight - infoBubble.height
+drag.minimumY: flickable === null? 0: flickable.y
+drag.maximumY: flickable === null? 0 :flickable.contentHeight - infoBubble.height
 onReleased: parent.Drag.drop()
 onClicked: {
 if( isLiveEditing ) {

=== modified file 'EventListModel.qml'
--- EventListModel.qml	2015-08-02 03:59:08 +
+++ EventListModel.qml	2015-08-24 03:08:58 +
@@ -44,7 +44,7 @@
 var newObject = Qt.createQmlObject(import QtQuick 2.3; Timer {interval: 1000; running: true; repeat: false;},
 eventModel, EventListMode.qml);
 newObject.onTriggered.connect( function(){
-var items = getItems(eventModel.startPeriod, eventModel.endPeriod);
+var items = itemsByTimePeriod(eventModel.startPeriod, eventModel.endPeriod

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/optimization_tab_change into lp:ubuntu-calendar-app

2015-08-23 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-calendar-app/optimization_tab_change into 
lp:ubuntu-calendar-app.

Commit message:
Tab change will cause dynamic creation(Qt.ResolvedUrl) for qml object back and 
forth.Using Qt.CreateComponent for dynamic creation for the first time and 
reuse existing obj without re-creating.

Requested reviews:
  Ubuntu Calendar Developers (ubuntu-calendar-dev)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/optimization_tab_change/+merge/268873

Tab change will cause dynamic creation(Qt.ResolvedUrl) for qml object back and 
forth.Using Qt.CreateComponent for dynamic creation for the first time and 
reuse existing obj without re-creating.
-- 
Your team Ubuntu Calendar Developers is requested to review the proposed merge 
of lp:~gary-wzl77/ubuntu-calendar-app/optimization_tab_change into 
lp:ubuntu-calendar-app.
=== modified file 'ContactChoicePopup.qml'
--- ContactChoicePopup.qml	2014-09-20 10:45:35 +
+++ ContactChoicePopup.qml	2015-08-24 05:15:53 +
@@ -94,7 +94,7 @@
 objectName: contactPopoverList
 width: parent.width
 model: contactModel
-height: units.gu(30)
+height: units.gu(15)
 clip: true
 delegate: Standard{
 objectName: contactPopoverList%1.arg(index)

=== modified file 'EventBubble.qml'
--- EventBubble.qml	2015-01-22 19:34:59 +
+++ EventBubble.qml	2015-08-24 05:15:53 +
@@ -221,8 +221,8 @@
 anchors.fill: parent
 drag.target: isLiveEditing ? infoBubble : null
 drag.axis: Drag.YAxis
-drag.minimumY: flickable.y
-drag.maximumY: flickable.contentHeight - infoBubble.height
+drag.minimumY: flickable === null? 0: flickable.y
+drag.maximumY: flickable === null? 0 :flickable.contentHeight - infoBubble.height
 onReleased: parent.Drag.drop()
 onClicked: {
 if( isLiveEditing ) {

=== modified file 'EventListModel.qml'
--- EventListModel.qml	2015-08-02 03:59:08 +
+++ EventListModel.qml	2015-08-24 05:15:53 +
@@ -44,7 +44,7 @@
 var newObject = Qt.createQmlObject(import QtQuick 2.3; Timer {interval: 1000; running: true; repeat: false;},
 eventModel, EventListMode.qml);
 newObject.onTriggered.connect( function(){
-var items = getItems(eventModel.startPeriod, eventModel.endPeriod);
+var items = itemsByTimePeriod(eventModel.startPeriod, eventModel.endPeriod);
 if( isLoading == true  items.length === 0) {
 isLoading = false;
 modelChanged();
@@ -53,7 +53,6 @@
 });
 }
 
-
 onModelChanged: {
 isLoading = false
 if(listeners === undefined){

=== modified file 'NewEvent.qml'
--- NewEvent.qml	2015-08-04 02:18:52 +
+++ NewEvent.qml	2015-08-24 05:15:53 +
@@ -255,6 +255,7 @@
 
 model.saveItem(event);
 pageStack.pop();
+
 root.eventAdded(event);
 }
 }

=== modified file 'YearView.qml'
--- YearView.qml	2015-02-18 19:27:20 +
+++ YearView.qml	2015-08-24 05:15:53 +
@@ -29,6 +29,12 @@
 
 Keys.forwardTo: [yearPathView]
 
+function refreshCurrentYear(year) {
+currentYear = year;
+var yearViewDelegate = yearPathView.currentItem.item;
+yearViewDelegate.refresh();
+}
+
 Action {
 id: calendarTodayAction
 objectName:todaybutton
@@ -85,7 +91,7 @@
 
 scrollMonth: 0;
 isCurrentItem: index == yearPathView.currentIndex
-year: (yearViewPage.currentYear + yearPathView.indexType(index))
+year: (currentYear + yearPathView.indexType(index))
 
 anchors.fill: parent
 }

=== modified file 'YearViewDelegate.qml'
--- YearViewDelegate.qml	2014-11-29 09:40:53 +
+++ YearViewDelegate.qml	2015-08-24 05:15:53 +
@@ -18,6 +18,19 @@
 model: 12 /* months in a year */
 
 onYearChanged: {
+refresh();
+}
+
+//scroll in case content height changed
+onHeightChanged: {
+yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
+}
+
+Component.onCompleted: {
+yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
+}
+
+function refresh() {
 scrollMonth = 0;
 var today = new Date();
 if(year == today.getFullYear()) {
@@ -26,15 +39,6 @@
 yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
 }
 
-//scroll in case content height changed
-onHeightChanged: {
-yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
-}
-
-Component.onCompleted: {
-yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
-}
-
 Connections{
 target: yearPathView
 onScrollUp: {

=== modified file 'calendar.qml'
--- calendar.qml	2015-06-11 12:29:28 +

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/show-week-number into lp:ubuntu-calendar-app

2015-08-07 Thread Gary.Wang
Got feedback from UX-design team that 

This solution works nicely and I think we should proceed with it.
...


-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/show-week-number/+merge/264153
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix_1440583 into lp:ubuntu-calendar-app

2015-08-02 Thread Gary.Wang
Done.
Please review the latest MP.
Thanks.
-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1440583/+merge/264487
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix_1440583 into lp:ubuntu-calendar-app

2015-07-11 Thread Gary.Wang
Gary.Wang has proposed merging lp:~gary-wzl77/ubuntu-calendar-app/fix_1440583 
into lp:ubuntu-calendar-app.

Commit message:
Remove recurrence rule for non-repeating event.

Requested reviews:
  Alan Pope  (popey)
Related bugs:
  Bug #1440583 in Ubuntu Calendar App: calendar-app is generating invalid 
RECUR values in RRULE property
  https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1440583

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1440583/+merge/264487

Remove recurrence rule for non-repeating event.
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'EventDetails.qml'
--- EventDetails.qml	2015-06-27 17:52:44 +
+++ EventDetails.qml	2015-07-12 03:29:02 +
@@ -72,6 +72,9 @@
 if(event.recurrence.recurrenceRules[0] !== undefined){
 var rule =  event.recurrence.recurrenceRules[0];
 repeatLabel.text = eventUtils.getRecurrenceString(rule)
+} else {
+//For event occurs once, event.recurrence.recurrenceRules == []
+repeatLabel.text = Defines.recurrenceLabel[0];
 }
 }
 }

=== modified file 'EventRepetition.qml'
--- EventRepetition.qml	2015-04-05 09:46:59 +
+++ EventRepetition.qml	2015-07-12 03:29:02 +
@@ -29,8 +29,7 @@
 id: repetition
 
 property var weekDays : [];
-property var rule
-property var date
+property var eventRoot;
 property var isEdit
 
 visible: false
@@ -51,6 +50,7 @@
 Component.onCompleted: {
 //Fill Date  limitcount if any
 var index = 0;
+var rule = eventRoot.rule;
 if(rule !== null  rule !== undefined){
 index =  rule.frequency ;
 if(index  0 )
@@ -87,7 +87,6 @@
 index = Recurrence.Yearly
 break;
 }
-
 }
 }
 recurrenceOption.selectedIndex = index;
@@ -98,7 +97,13 @@
 iconName: back
 onTriggered: {
 var recurrenceRule = Defines.recurrenceValue[ recurrenceOption.selectedIndex ];
+
 if (recurrenceRule !== RecurrenceRule.Invalid) {
+if (eventRoot.rule === null || eventRoot.rule === undefined ){
+eventRoot.rule = Qt.createQmlObject(import QtOrganizer 5.0; RecurrenceRule {}, eventRoot.event.recurrence,EventRepetition.qml);
+}
+
+var rule = eventRoot.rule;
 rule.frequency = recurrenceRule;
 switch(recurrenceOption.selectedIndex){
 case 1: //daily
@@ -109,11 +114,11 @@
 rule.daysOfWeek = eventUtils.getDaysOfWeek(recurrenceOption.selectedIndex, weekDays );
 break;
 case 6: //monthly
-rule.daysOfMonth = [date.getDate()];
+rule.daysOfMonth = [eventRoot.date.getDate()];
 break;
 case 7: //yearly
-rule.monthsOfYear = [date.getMonth()];
-rule.daysOfMonth = [date.getDate()];
+rule.monthsOfYear = [eventRoot.date.getMonth()];
+rule.daysOfMonth = [eventRoot.date.getDate()];
 break;
 case 0: //once
 default:
@@ -134,7 +139,7 @@
 }
 }
 else {
-rule.frequency = 0
+eventRoot.rule = null;
 }
 pop()
 }
@@ -202,7 +207,7 @@
 (checked) ? weekDays.push(index) : weekDays.splice(weekDays.indexOf(index),1);
 }
 checked:{
-(weekDays.length === 0  index === date.getDay()  isEdit === false) ? true : false;
+(weekDays.length === 0  index === eventRoot.date.getDay()  isEdit === false) ? true : false;
 }
 
 }

=== modified file 'MonthComponent.qml'
--- MonthComponent.qml	2015-06-11 14:07:51 +
+++ MonthComponent.qml	2015-07-12 03:29:02 +
@@ -30,6 +30,7 @@
 
 property var currentMonth;
 property var isYearView;
+property bool showWeekNumber:true;
 
 property string dayLabelFontSize: medium
 property string dateLabelFontSize: large
@@ -123,7 +124,10 @@
 id: column
 
 anchors {
-fill: parent
+left: weekNumLoader.right;
+right: parent.right;
+top: parent.top;
+bottom: parent.bottom;
 topMargin: units.gu(1.5)
 bottomMargin: units.gu(1)
 }
@@ -191,6 +195,60 @@
 }
 }
 
+Loader {
+id: weekNumLoader;
+anchors.left: parent.left;
+width: showWeekNumber ? parent.width / 8:0;
+height: parent.height;
+visible: showWeekNumber;
+sourceComponent: showWeekNumber

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/show-week-number into lp:ubuntu-calendar-app

2015-07-10 Thread Gary.Wang
Add screenshots of monthly view with UI-fined based on feedback from UX team.
Add setting page in latest repo as well.

https://drive.google.com/open?id=0B2H9ECPSSfqIN1AxRGVfMndDYlk
https://drive.google.com/open?id=0B2H9ECPSSfqIc0ZqT2lXOEhTX3M
-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/show-week-number/+merge/264153
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/show-week-number into lp:ubuntu-calendar-app

2015-07-08 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-calendar-app/show-week-number into lp:ubuntu-calendar-app.

Commit message:
Show week number in monthly and yearly view.

Requested reviews:
  Alan Pope  (popey)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/show-week-number/+merge/264153

Show week number in monthly and yearly view.
1.Navigate to day view when clicking weeknum in monthly view
2.Navigate to monthly view when clicking weeknum in yearly view 
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'MonthComponent.qml'
--- MonthComponent.qml	2015-06-11 14:07:51 +
+++ MonthComponent.qml	2015-07-08 14:06:30 +
@@ -30,6 +30,7 @@
 
 property var currentMonth;
 property var isYearView;
+property bool showWeekNumber:true;
 
 property string dayLabelFontSize: medium
 property string dateLabelFontSize: large
@@ -123,7 +124,10 @@
 id: column
 
 anchors {
-fill: parent
+left: weekNumLoader.right;
+right: parent.right;
+top: parent.top;
+bottom: parent.bottom;
 topMargin: units.gu(1.5)
 bottomMargin: units.gu(1)
 }
@@ -191,6 +195,60 @@
 }
 }
 
+Loader {
+id: weekNumLoader;
+anchors.left: parent.left;
+width: showWeekNumber ? parent.width / 8:0;
+height: parent.height;
+visible: showWeekNumber;
+sourceComponent: showWeekNumber ? weekNumComp : undefined;
+}
+
+Component {
+id: weekNumComp
+
+Column {
+id: weekNumColumn;
+
+anchors {
+fill: parent
+topMargin: monthGrid.y + units.gu(1.5)
+bottomMargin: units.gu(1)
+}
+
+Repeater {
+id: weekNumrepeater;
+model: 6;
+
+Label{
+id: weekNum
+objectName: weekNum + index
+width: height;
+height: weekNumColumn.height / 6;
+text: isYearView ? i18n.tr(W) + intern.monthStart.addDays(index * 7).weekNumber(Qt.locale().firstDayOfWeek) :
+   i18n.tr(Wk) + intern.monthStart.addDays(index * 7).weekNumber(Qt.locale().firstDayOfWeek)
+horizontalAlignment: Text.AlignLeft;
+verticalAlignment: Text.AlignVCenter;
+font.pixelSize: intern.dayFontSize - 3;
+font.bold: true
+color: black
+
+MouseArea {
+anchors.fill: parent
+onClicked: {
+var selectedDate = new Date(intern.monthStart.addDays(index * 7))
+if( isYearView ) {
+root.monthSelected(selectedDate);
+} else {
+root.dateSelected(selectedDate);
+}
+}
+}
+}
+}
+}
+}
+
 Component{
 id: defaultDateLabelComponent
 MonthComponentDateDelegate{

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2015-06-23 15:59:08 +
+++ po/com.ubuntu.calendar.pot	2015-07-08 14:06:30 +
@@ -8,7 +8,7 @@
 msgstr 
 Project-Id-Version: \n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-06-23 23:57+0800\n
+POT-Creation-Date: 2015-07-08 21:59+0800\n
 PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
 Last-Translator: FULL NAME EMAIL@ADDRESS\n
 Language-Team: LANGUAGE l...@li.org\n
@@ -132,11 +132,11 @@
 msgid Delete this
 msgstr 
 
-#: ../DeleteConfirmationDialog.qml:51 ../EventDetails.qml:188
+#: ../DeleteConfirmationDialog.qml:51 ../NewEvent.qml:68
 msgid Delete
 msgstr 
 
-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:304
+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:319
 msgid Edit Event
 msgstr 
 
@@ -154,7 +154,7 @@
 msgid Edit this
 msgstr 
 
-#: ../EventActions.qml:50 ../NewEvent.qml:304
+#: ../EventActions.qml:50 ../NewEvent.qml:319
 msgid New Event
 msgstr 
 
@@ -165,7 +165,7 @@
 msgid %1 b%2/b
 msgstr 
 
-#: ../EventDetails.qml:42 ../NewEvent.qml:415
+#: ../EventDetails.qml:42 ../NewEvent.qml:430
 msgid Event Details
 msgstr 
 
@@ -185,15 +185,15 @@
 msgid %1 (All Day)
 msgstr 
 
-#: ../EventDetails.qml:201
+#: ../EventDetails.qml:192
 msgid Edit
 msgstr 
 
-#: ../EventDetails.qml:352 ../NewEvent.qml:517
+#: ../EventDetails.qml:343 ../NewEvent.qml:532
 msgid Guests
 msgstr 
 
-#: ../EventDetails.qml:395 ../EventReminder.qml:35 ../NewEvent.qml:614
+#: ../EventDetails.qml:386 ../EventReminder.qml:35 ../NewEvent.qml:629
 msgid Reminder
 msgstr 
 
@@ -216,7 +216,7 @@
 #. TRANSLATORS: this refers to how often a recurrent event repeats
 #. and it is shown as the header

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix-1472081 into lp:ubuntu-calendar-app

2015-07-08 Thread Gary.Wang
Gary.Wang has proposed merging lp:~gary-wzl77/ubuntu-calendar-app/fix-1472081 
into lp:ubuntu-calendar-app.

Commit message:
1.fix display bug for multiple all day events
2.skip event bubble display in case of endDateTime == dd-MM- 12:00 AM

Requested reviews:
  Alan Pope  (popey)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix-1472081/+merge/264152

1.fix display bug for multiple all day events
2.skip event bubble display in case of endDateTime == dd-MM- 12:00 AM
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'EventDetails.qml'
--- EventDetails.qml	2015-06-27 17:52:44 +
+++ EventDetails.qml	2015-07-08 13:39:43 +
@@ -23,6 +23,7 @@
 import QtOrganizer 5.0
 
 import Defines.js as Defines
+import dateExt.js as DateExt
 
 Page {
 id: root
@@ -114,10 +115,11 @@
 var endTime = e.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
 
 if( e.allDay ) {
-if( !e.startDateTime.isSameDay( e.endDateTime) ) {
+var days = Math.floor((e.endDateTime - e.startDateTime) / Date.msPerDay);
+if( days !== 1 ) {
 dateLabel.text = i18n.tr(%1 - %2 (All Day))
 .arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
-.arg( e.endDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
+.arg( e.endDateTime.addDays(-1).toLocaleDateString(Qt.locale(), Locale.LongFormat))
 } else {
 dateLabel.text = i18n.tr(%1 (All Day)).arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
 }

=== modified file 'NewEvent.qml'
--- NewEvent.qml	2015-06-27 17:52:44 +
+++ NewEvent.qml	2015-07-08 13:39:43 +
@@ -155,6 +155,7 @@
 }
 if(e.allDay){
 allDayEventCheckbox.checked =true;
+endDate = endDate.addDays(-1);
 }
 
 if(e.location) {
@@ -202,12 +203,14 @@
 }
 
 event.allDay = allDayEventCheckbox.checked;
-
 event.startDateTime = startDate;
-if (event.allDay)
-event.endDateTime = startDate.addDays(1);
-else
+
+if (event.allDay){
+event.endDateTime = endDate.addDays(1);
+} else {
 event.endDateTime = endDate;
+}
+
 event.displayLabel = titleEdit.text;
 event.description = messageEdit.text;
 event.location = locationEdit.text

=== modified file 'TimeLineBase.qml'
--- TimeLineBase.qml	2015-06-21 08:29:02 +
+++ TimeLineBase.qml	2015-07-08 13:39:43 +
@@ -224,6 +224,10 @@
 var hour = 0;
 var durationMin = 0;
 
+// skip it in case of endDateTime == dd-MM- 12:00 AM
+if (event.endDateTime - day  == 0)
+return;
+
 if (event.endDateTime.getDate() - day.getDate() == 0 
 event.startDateTime.getDate() - day.getDate() == 0) {
 hour = event.startDateTime.getHours();
@@ -244,8 +248,8 @@
 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
 durationMin = (24 - event.startDateTime.getHours()) * 60;
 }
-if (event.endDateTime - day  Date.msPerDay 
-event.startDateTime- day  0) {
+if (event.endDateTime - day  = Date.msPerDay 
+event.startDateTime- day = 0) {
 hour = 0;
 yPos = 0;
 durationMin = 24 * 60;

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2015-06-23 15:59:08 +
+++ po/com.ubuntu.calendar.pot	2015-07-08 13:39:43 +
@@ -8,7 +8,7 @@
 msgstr 
 Project-Id-Version: \n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-06-23 23:57+0800\n
+POT-Creation-Date: 2015-07-08 21:32+0800\n
 PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
 Last-Translator: FULL NAME EMAIL@ADDRESS\n
 Language-Team: LANGUAGE l...@li.org\n
@@ -132,11 +132,11 @@
 msgid Delete this
 msgstr 
 
-#: ../DeleteConfirmationDialog.qml:51 ../EventDetails.qml:188
+#: ../DeleteConfirmationDialog.qml:51 ../NewEvent.qml:68
 msgid Delete
 msgstr 
 
-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:304
+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:322
 msgid Edit Event
 msgstr 
 
@@ -154,7 +154,7 @@
 msgid Edit this
 msgstr 
 
-#: ../EventActions.qml:50 ../NewEvent.qml:304
+#: ../EventActions.qml:50 ../NewEvent.qml:322
 msgid New Event
 msgstr 
 
@@ -165,35 +165,35 @@
 msgid %1 b%2/b
 msgstr 
 
-#: ../EventDetails.qml:42 ../NewEvent.qml:415
+#: ../EventDetails.qml:43 ../NewEvent.qml:433
 msgid Event Details
 msgstr 
 
 #. TRANSLATORS: the first parameter refers to the name of event calendar.
-#: ../EventDetails.qml:66
+#: ../EventDetails.qml:67
 #, qt-format
 msgid %1 Calendar
 msgstr 
 
-#: ../EventDetails.qml:118
+#: ../EventDetails.qml:120
 #, qt-format
 msgid %1 - %2

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~mihirsoni/ubuntu-calendar-app/1466667 into lp:ubuntu-calendar-app

2015-06-24 Thread Gary.Wang
Review: Needs Fixing

Personally,I don't think there is a need to introduce new 
property(eventDuration) in this case,since we have properties startdate and 
enddate now.

Pls take a look at this patch:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_147
-- 
https://code.launchpad.net/~mihirsoni/ubuntu-calendar-app/147/+merge/262763
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix_1466667 into lp:ubuntu-calendar-app

2015-06-23 Thread Gary.Wang
Gary.Wang has proposed merging lp:~gary-wzl77/ubuntu-calendar-app/fix_147 
into lp:ubuntu-calendar-app.

Commit message:
Retain time difference between end and start date when editing

Requested reviews:
  Alan Pope  (popey)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_147/+merge/262748

Retain time difference between end and start date when editing.
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'NewEvent.qml'
--- NewEvent.qml	2015-06-19 13:05:13 +
+++ NewEvent.qml	2015-06-23 16:05:56 +
@@ -48,7 +48,14 @@
 
 onStartDateChanged: {
 startDateTimeInput.dateTime = startDate;
-adjustEndDateToStartDate()
+
+// set time forward to one hour
+var time_forward = 360;
+
+if (isEdit  event !== null) {
+time_forward = event.endDateTime - event.startDateTime;
+}
+adjustEndDateToStartDate(time_forward);
 }
 
 onEndDateChanged: {
@@ -272,9 +279,7 @@
 return tempDate.setHours(tempDate.getHours() + 1)
 }
 
-function adjustEndDateToStartDate() {
-// set time forward to one hour
-var time_forward = 360;
+function adjustEndDateToStartDate(time_forward) {
 endDate = new Date( startDate.getTime() + time_forward );
 }
 

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2015-06-21 08:29:02 +
+++ po/com.ubuntu.calendar.pot	2015-06-23 16:05:56 +
@@ -8,7 +8,7 @@
 msgstr 
 Project-Id-Version: \n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-06-21 16:27+0800\n
+POT-Creation-Date: 2015-06-23 23:57+0800\n
 PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
 Last-Translator: FULL NAME EMAIL@ADDRESS\n
 Language-Team: LANGUAGE l...@li.org\n
@@ -136,7 +136,7 @@
 msgid Delete
 msgstr 
 
-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:299
+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:304
 msgid Edit Event
 msgstr 
 
@@ -154,7 +154,7 @@
 msgid Edit this
 msgstr 
 
-#: ../EventActions.qml:50 ../NewEvent.qml:299
+#: ../EventActions.qml:50 ../NewEvent.qml:304
 msgid New Event
 msgstr 
 
@@ -165,7 +165,7 @@
 msgid %1 b%2/b
 msgstr 
 
-#: ../EventDetails.qml:42 ../NewEvent.qml:410
+#: ../EventDetails.qml:42 ../NewEvent.qml:415
 msgid Event Details
 msgstr 
 
@@ -189,11 +189,11 @@
 msgid Edit
 msgstr 
 
-#: ../EventDetails.qml:352 ../NewEvent.qml:512
+#: ../EventDetails.qml:352 ../NewEvent.qml:517
 msgid Guests
 msgstr 
 
-#: ../EventDetails.qml:395 ../EventReminder.qml:35 ../NewEvent.qml:609
+#: ../EventDetails.qml:395 ../EventReminder.qml:35 ../NewEvent.qml:614
 msgid Reminder
 msgstr 
 
@@ -216,7 +216,7 @@
 #. TRANSLATORS: this refers to how often a recurrent event repeats
 #. and it is shown as the header of the option selector to choose
 #. its repetition
-#: ../EventRepetition.qml:237 ../NewEvent.qml:593
+#: ../EventRepetition.qml:237 ../NewEvent.qml:598
 msgid Repeats
 msgstr 
 
@@ -259,51 +259,51 @@
 msgid After Date
 msgstr 
 
-#: ../NewEvent.qml:61
+#: ../NewEvent.qml:68
 msgid Save
 msgstr 
 
-#: ../NewEvent.qml:170
+#: ../NewEvent.qml:177
 msgid End time can't be before start time
 msgstr 
 
-#: ../NewEvent.qml:309
+#: ../NewEvent.qml:314
 msgid Error
 msgstr 
 
-#: ../NewEvent.qml:311
+#: ../NewEvent.qml:316
 msgid OK
 msgstr 
 
-#: ../NewEvent.qml:364
+#: ../NewEvent.qml:369
 msgid From
 msgstr 
 
-#: ../NewEvent.qml:377
+#: ../NewEvent.qml:382
 msgid To
 msgstr 
 
-#: ../NewEvent.qml:394
+#: ../NewEvent.qml:399
 msgid All day event
 msgstr 
 
-#: ../NewEvent.qml:423
+#: ../NewEvent.qml:428
 msgid Event Name
 msgstr 
 
-#: ../NewEvent.qml:441
+#: ../NewEvent.qml:446
 msgid Description
 msgstr 
 
-#: ../NewEvent.qml:459
+#: ../NewEvent.qml:464
 msgid Location
 msgstr 
 
-#: ../NewEvent.qml:474 com.ubuntu.calendar_calendar.desktop.in.in.h:1
+#: ../NewEvent.qml:479 com.ubuntu.calendar_calendar.desktop.in.in.h:1
 msgid Calendar
 msgstr 
 
-#: ../NewEvent.qml:516
+#: ../NewEvent.qml:521
 msgid Add Guest
 msgstr 
 

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix_1460433_new into lp:ubuntu-calendar-app

2015-06-18 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-calendar-app/fix_1460433_new into lp:ubuntu-calendar-app.

Commit message:
1.Fix multi-day event displayed issue in weeklyview
2.Show end date time for multi-day event in Event details

Requested reviews:
  Alan Pope  (popey)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1460433_new/+merge/262357

1.Fix multi-day event displayed issue in weeklyview
2.Show end date time for multi-day event in Event details
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'EventDetails.qml'
--- EventDetails.qml	2014-11-06 13:14:06 +
+++ EventDetails.qml	2015-06-18 15:51:16 +
@@ -122,7 +122,12 @@
 dateLabel.text = i18n.tr(%1 (All Day)).arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
 }
 } else {
-   dateLabel.text = e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) + ,  +startTime +  -   + endTime;
+if (e.endDateTime.getDate() !== e.startDateTime.getDate()) {
+dateLabel.text = e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) + ,  +startTime +  - 
++ e.endDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) +  ,  + endTime;
+} else {
+dateLabel.text = e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) + ,  +startTime +  -   + endTime;
+}
 }
 
 if( e.itemType === Type.EventOccurrence ){

=== modified file 'TimeLineBase.qml'
--- TimeLineBase.qml	2015-06-01 08:54:59 +
+++ TimeLineBase.qml	2015-06-18 15:51:16 +
@@ -232,21 +232,20 @@
 durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
 }
 if (event.endDateTime.getDate() - day.getDate() == 0 
-event.startDateTime.getDate() - day.getDate()  0) {
+event.startDateTime - day  0) {
 hour = 0;
 yPos = 0;
 durationMin = event.endDateTime.getHours() * 60;
 durationMin += event.endDateTime.getMinutes();
 }
-if (event.endDateTime.getDate() - day.getDate()  0 
-event.startDateTime.getDate() - day.getDate() == 0) {
+if (event.startDateTime.getDate() - day.getDate() == 0 
+event.endDateTime - day  Date.msPerDay) {
 hour = event.startDateTime.getHours();
 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
 durationMin = (24 - event.startDateTime.getHours()) * 60;
 }
-
-if (event.endDateTime.getDate() - day.getDate()  0 
-event.startDateTime.getDate() - day.getDate()  0) {
+if (event.endDateTime - day  Date.msPerDay 
+event.startDateTime- day  0) {
 hour = 0;
 yPos = 0;
 durationMin = 24 * 60;

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2015-06-09 10:45:01 +
+++ po/com.ubuntu.calendar.pot	2015-06-18 15:51:16 +
@@ -8,7 +8,7 @@
 msgstr 
 Project-Id-Version: \n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-06-09 18:44+0800\n
+POT-Creation-Date: 2015-06-18 23:41+0800\n
 PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
 Last-Translator: FULL NAME EMAIL@ADDRESS\n
 Language-Team: LANGUAGE l...@li.org\n
@@ -77,8 +77,8 @@
 msgid Syncing
 msgstr 
 
-#: ../CalendarChoicePopup.qml:71
-msgid Add new Calendar
+#: ../CalendarChoicePopup.qml:70
+msgid Add online Calendar
 msgstr 
 
 #: ../ColorPickerDialog.qml:25
@@ -132,7 +132,7 @@
 msgid Delete this
 msgstr 
 
-#: ../DeleteConfirmationDialog.qml:51 ../EventDetails.qml:183
+#: ../DeleteConfirmationDialog.qml:51 ../EventDetails.qml:188
 msgid Delete
 msgstr 
 
@@ -185,15 +185,15 @@
 msgid %1 (All Day)
 msgstr 
 
-#: ../EventDetails.qml:196
+#: ../EventDetails.qml:201
 msgid Edit
 msgstr 
 
-#: ../EventDetails.qml:347 ../NewEvent.qml:509
+#: ../EventDetails.qml:352 ../NewEvent.qml:509
 msgid Guests
 msgstr 
 
-#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:606
+#: ../EventDetails.qml:395 ../EventReminder.qml:35 ../NewEvent.qml:606
 msgid Reminder
 msgstr 
 

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/1455377 into lp:ubuntu-calendar-app

2015-06-16 Thread Gary.Wang
Thanks for your reply.
I got your point that the wrong end date causes this issue for recurrence Event.
But.
As u can see in the log. In fact, there is 3 all day event items(items.length) 
returned from EDS engine.However It shows 6 items in log.The reason for this 
because we include event.endDateTime in the condition.
for(var d = event.startDateTime; d = event.endDateTime; d = d.addDays(1)) {

So if period of all day event outlasts 24 hours for single day, then 
corresponding log will change from 
qml: Thu Jun 11 00:00:00 2015 GMT+0900---Thu Jun 11 00:00:00 2015 GMT+0900
to
qml: Thu Jun 11 00:00:00 2015 GMT+0900---Fri Jun 12 00:00:00 2015 GMT+0900
qml: Thu Jun 11 00:00:00 2015 GMT+0900---Fri Jun 12 00:00:00 2015 GMT+0900

All day event for single day will be broken as well.

my personal option for this is if 
*.length of event items returned from EDS is right 
*.start date of event is right
Then from EDS layer, I think the results is *right*, even through end date is 
not correct since end date is not mandatory parameter to check all day event.
   
So I think this patch can fix it if there is no need to do some major code 
change on EDS engine and decrease risk of introducing new bugs.


-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/1455377/+merge/259207
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix_1437305_and_1455377 into lp:ubuntu-calendar-app

2015-06-16 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-calendar-app/fix_1437305_and_1455377 into 
lp:ubuntu-calendar-app.

Requested reviews:
  Alan Pope  (popey)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1437305_and_1455377/+merge/262059

Confirmed by Renato
https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1437305/comments/6

We save wrong end date for all day event(end date should be one day later than 
start date). This issue results in
1. Duplicated event display for all day event in weekly/daily view 
2. Wrong date day in monthly view

This patch fix these two issue.
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'AllDayEventComponent.qml'
--- AllDayEventComponent.qml	2014-11-29 03:36:18 +
+++ AllDayEventComponent.qml	2015-06-16 09:28:53 +
@@ -18,6 +18,7 @@
 import QtQuick 2.3
 import Ubuntu.Components 1.1
 import Ubuntu.Components.Popups 1.0
+import QtOrganizer 5.0
 
 import dateExt.js as DateExt
 import ViewType.js as ViewType
@@ -39,7 +40,7 @@
 for(var i = 0 ; i  items.length ; ++i) {
 var event = items[(i)];
 if( event  event.allDay ) {
-for(var d = event.startDateTime; d = event.endDateTime; d = d.addDays(1)) {
+for(var d = event.startDateTime; d  event.endDateTime; d = d.addDays(1)) {
 var key = Qt.formatDateTime(d, dd-MMM-);
 if( !(key in map)) {
 map[key] = [];

=== modified file 'NewEvent.qml'
--- NewEvent.qml	2015-05-22 12:25:24 +
+++ NewEvent.qml	2015-06-16 09:28:53 +
@@ -179,14 +179,17 @@
 event = Qt.createQmlObject(import QtOrganizer 5.0; Event {}, Qt.application,NewEvent.qml);
 }
 
+event.allDay = allDayEventCheckbox.checked;
+
 event.startDateTime = startDate;
-event.endDateTime = endDate;
+if (event.allDay)
+event.endDateTime = startDate.addDays(1);
+else
+event.endDateTime = endDate;
 event.displayLabel = titleEdit.text;
 event.description = messageEdit.text;
 event.location = locationEdit.text
 
-event.allDay = allDayEventCheckbox.checked;
-
 if( event.itemType === Type.Event ) {
 event.attendees = []; // if Edit remove all attendes  add them again if any
 var contacts = [];

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2015-06-09 10:45:01 +
+++ po/com.ubuntu.calendar.pot	2015-06-16 09:28:53 +
@@ -8,7 +8,7 @@
 msgstr 
 Project-Id-Version: \n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-06-09 18:44+0800\n
+POT-Creation-Date: 2015-06-16 17:18+0800\n
 PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
 Last-Translator: FULL NAME EMAIL@ADDRESS\n
 Language-Team: LANGUAGE l...@li.org\n
@@ -46,13 +46,13 @@
 #. on a given day. Ev. is short form for Events.
 #. Please keep the translation of Ev. to 3 characters only, as the week view
 #. where it's shown has limited space
-#: ../AllDayEventComponent.qml:122
+#: ../AllDayEventComponent.qml:123
 #, qt-format
 msgid %1 ev.
 msgstr 
 
 #. TRANSLATORS: the argument refers to the number of all day events
-#: ../AllDayEventComponent.qml:126
+#: ../AllDayEventComponent.qml:127
 #, qt-format
 msgid %1 all day event
 msgid_plural %1 all day events
@@ -77,8 +77,8 @@
 msgid Syncing
 msgstr 
 
-#: ../CalendarChoicePopup.qml:71
-msgid Add new Calendar
+#: ../CalendarChoicePopup.qml:70
+msgid Add online Calendar
 msgstr 
 
 #: ../ColorPickerDialog.qml:25
@@ -136,7 +136,7 @@
 msgid Delete
 msgstr 
 
-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:296
+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:299
 msgid Edit Event
 msgstr 
 
@@ -154,7 +154,7 @@
 msgid Edit this
 msgstr 
 
-#: ../EventActions.qml:50 ../NewEvent.qml:296
+#: ../EventActions.qml:50 ../NewEvent.qml:299
 msgid New Event
 msgstr 
 
@@ -165,7 +165,7 @@
 msgid %1 b%2/b
 msgstr 
 
-#: ../EventDetails.qml:42 ../NewEvent.qml:407
+#: ../EventDetails.qml:42 ../NewEvent.qml:410
 msgid Event Details
 msgstr 
 
@@ -189,11 +189,11 @@
 msgid Edit
 msgstr 
 
-#: ../EventDetails.qml:347 ../NewEvent.qml:509
+#: ../EventDetails.qml:347 ../NewEvent.qml:512
 msgid Guests
 msgstr 
 
-#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:606
+#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:609
 msgid Reminder
 msgstr 
 
@@ -216,7 +216,7 @@
 #. TRANSLATORS: this refers to how often a recurrent event repeats
 #. and it is shown as the header of the option selector to choose
 #. its repetition
-#: ../EventRepetition.qml:237 ../NewEvent.qml:590
+#: ../EventRepetition.qml:237 ../NewEvent.qml:593
 msgid Repeats
 msgstr 
 
@@ -267,43 +267,43 @@
 msgid End time can't be before start time
 msgstr 
 
-#: ../NewEvent.qml:306
+#: ../NewEvent.qml:309
 msgid Error
 msgstr

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/1455377 into lp:ubuntu-calendar-app

2015-06-16 Thread Gary.Wang
Confirmed by Renato
https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1437305/comments/6

We save wrong end date for all day event(end date should be one day later than 
start date). 
I submit another patch here and will delete this one if that pass review.
Thanks.

https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1437305_and_1455377
-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/1455377/+merge/259207
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix-1428036 into lp:ubuntu-calendar-app

2015-06-05 Thread Gary.Wang
Looks good after using Locale.NarrowFormat.
Thanks for your good reminder.
Pls check the screenshots as following for three different locale.

en_UK : https://drive.google.com/open?id=0B2H9ECPSSfqIcFYybldnakdLNEEauthuser=1
zh_CN : https://drive.google.com/open?id=0B2H9ECPSSfqIdnJUYUFXQjVOc28authuser=1
he_IL : https://drive.google.com/open?id=0B2H9ECPSSfqIODJzMEtmZFAwTEkauthuser=1




-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix-1428036/+merge/260804
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/1455377 into lp:ubuntu-calendar-app

2015-06-04 Thread Gary.Wang
Try to set re-occurrence type(Daily| Monthly| Yearly ) for all day event.
Then you can reproduce it.

-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/1455377/+merge/259207
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix-1428036 into lp:ubuntu-calendar-app

2015-06-03 Thread Gary.Wang
 In en_GB this is pretty tight on a low resolution display like the bq e4.5.
 
 Here's the current calendar app:-
 http://people.canonical.com/~alan/screenshots/device-2015-06-02-120425.png
 
 This is what it looks like with your change:-
 http://people.canonical.com/~alan/screenshots/device-2015-06-02-120540.png
 
 Could be even more tight in other languages.


Quick review on zh_CN on bq e4.5
Yeah, same case for zh_CN, pretty tight.Almost no space for each items on the 
header.
hmm...
I think it gonna be quite bad to check on this according to different locale.
However current implementation was broken in several locale.
Any ideas?
-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix-1428036/+merge/260804
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix-1428036 into lp:ubuntu-calendar-app

2015-06-02 Thread Gary.Wang
Gary.Wang has proposed merging lp:~gary-wzl77/ubuntu-calendar-app/fix-1428036 
into lp:ubuntu-calendar-app.

Requested reviews:
  Alan Pope  (popey)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix-1428036/+merge/260804
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'MonthComponent.qml'
--- MonthComponent.qml	2015-03-05 21:59:16 +
+++ MonthComponent.qml	2015-06-02 09:29:12 +
@@ -234,7 +234,7 @@
 objectName: weekDay + index
 width: parent.dayWidth
 property var day :Qt.locale().standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.ShortFormat)
-text: isYearView ? day.charAt(0) : day;
+text: day;
 horizontalAlignment: Text.AlignHCenter
 font.pixelSize: intern.dayFontSize
 font.bold: true

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2015-06-01 08:54:59 +
+++ po/com.ubuntu.calendar.pot	2015-06-02 09:29:12 +
@@ -8,7 +8,7 @@
 msgstr 
 Project-Id-Version: \n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-06-01 16:53+0800\n
+POT-Creation-Date: 2015-06-02 17:23+0800\n
 PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
 Last-Translator: FULL NAME EMAIL@ADDRESS\n
 Language-Team: LANGUAGE l...@li.org\n

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/1455377 into lp:ubuntu-calendar-app

2015-05-15 Thread Gary.Wang
Gary.Wang has proposed merging lp:~gary-wzl77/ubuntu-calendar-app/1455377 into 
lp:ubuntu-calendar-app.

Requested reviews:
  Kunal Parmar (pkunal-parmar)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/1455377/+merge/259207
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'AllDayEventComponent.qml'
--- AllDayEventComponent.qml	2014-11-29 03:36:18 +
+++ AllDayEventComponent.qml	2015-05-15 08:20:00 +
@@ -18,6 +18,7 @@
 import QtQuick 2.3
 import Ubuntu.Components 1.1
 import Ubuntu.Components.Popups 1.0
+import QtOrganizer 5.0
 
 import dateExt.js as DateExt
 import ViewType.js as ViewType
@@ -44,6 +45,14 @@
 if( !(key in map)) {
 map[key] = [];
 }
+
+//for occurrence, duplited event added in upcoming day since endDate
+//is current day' midnight.
+if (event.itemType === Type.EventOccurrence
+ (d - event.endDateTime) == 0) {
+continue;
+}
+
 map[key].push(event);
 }
 }

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2015-04-17 05:05:13 +
+++ po/com.ubuntu.calendar.pot	2015-05-15 08:20:00 +
@@ -8,7 +8,7 @@
 msgstr 
 Project-Id-Version: \n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2015-04-17 07:04+0200\n
+POT-Creation-Date: 2015-05-15 16:11+0800\n
 PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
 Last-Translator: FULL NAME EMAIL@ADDRESS\n
 Language-Team: LANGUAGE l...@li.org\n
@@ -37,7 +37,7 @@
 
 #. TRANSLATORS: the first argument (%1) refers to a start time for an event,
 #. while the second one (%2) refers to the end time
-#: ../AgendaView.qml:168 ../EventBubble.qml:131
+#: ../AgendaView.qml:168 ../EventBubble.qml:133
 #, qt-format
 msgid %1 - %2
 msgstr 
@@ -46,20 +46,20 @@
 #. on a given day. Ev. is short form for Events.
 #. Please keep the translation of Ev. to 3 characters only, as the week view
 #. where it's shown has limited space
-#: ../AllDayEventComponent.qml:122
+#: ../AllDayEventComponent.qml:131
 #, qt-format
 msgid %1 ev.
 msgstr 
 
 #. TRANSLATORS: the argument refers to the number of all day events
-#: ../AllDayEventComponent.qml:126
+#: ../AllDayEventComponent.qml:135
 #, qt-format
 msgid %1 all day event
 msgid_plural %1 all day events
 msgstr[0] 
 msgstr[1] 
 
-#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:59
+#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:60
 msgid Calendars
 msgstr 
 
@@ -77,15 +77,15 @@
 msgid Syncing
 msgstr 
 
-#: ../CalendarChoicePopup.qml:70
+#: ../CalendarChoicePopup.qml:71
 msgid Add new Calendar
 msgstr 
 
-#: ../ColorPickerDialog.qml:24
+#: ../ColorPickerDialog.qml:25
 msgid Select Color
 msgstr 
 
-#: ../ColorPickerDialog.qml:53 ../DeleteConfirmationDialog.qml:60
+#: ../ColorPickerDialog.qml:55 ../DeleteConfirmationDialog.qml:60
 #: ../EditEventConfirmationDialog.qml:53
 msgid Cancel
 msgstr 
@@ -101,7 +101,7 @@
 #. TRANSLATORS: this is a time formatting string,
 #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
 #. It's used in the header of the month and week views
-#: ../DayView.qml:59 ../MonthView.qml:57 ../WeekView.qml:61
+#: ../DayView.qml:59 ../MonthView.qml:58 ../WeekView.qml:61
 msgid  
 msgstr 
 
@@ -136,7 +136,7 @@
 msgid Delete
 msgstr 
 
-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:283
+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:286
 msgid Edit Event
 msgstr 
 
@@ -154,18 +154,18 @@
 msgid Edit this
 msgstr 
 
-#: ../EventActions.qml:50 ../NewEvent.qml:283
+#: ../EventActions.qml:50 ../NewEvent.qml:286
 msgid New Event
 msgstr 
 
 #. TRANSLATORS: the first argument (%1) refers to a time for an event,
 #. while the second one (%2) refers to title of event
-#: ../EventBubble.qml:142 ../EventBubble.qml:147
+#: ../EventBubble.qml:144 ../EventBubble.qml:149
 #, qt-format
 msgid %1 b%2/b
 msgstr 
 
-#: ../EventDetails.qml:42 ../NewEvent.qml:393
+#: ../EventDetails.qml:42 ../NewEvent.qml:397
 msgid Event Details
 msgstr 
 
@@ -189,11 +189,11 @@
 msgid Edit
 msgstr 
 
-#: ../EventDetails.qml:347 ../NewEvent.qml:479
+#: ../EventDetails.qml:347 ../NewEvent.qml:499
 msgid Guests
 msgstr 
 
-#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:578
+#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:598
 msgid Reminder
 msgstr 
 
@@ -201,26 +201,26 @@
 #. and it is shown as the header of the page to choose repetition
 #. and as the header of the list item that shows the repetition
 #. summary in the page that displays the event details
-#: ../EventRepetition.qml:41 ../EventRepetition.qml:132
+#: ../EventRepetition.qml:41 ../EventRepetition.qml:150
 msgid Repeat
 msgstr 
 
-#: ../EventRepetition.qml:151
+#: ../EventRepetition.qml:169
 msgid Repeats On:
 msgstr

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/dynamic_creation_perf_tunning into lp:ubuntu-calendar-app

2015-05-13 Thread Gary.Wang
Kunal, have u fun with this MR. Still two clear UI bugs has been fixed.
Pls approve.

BTW: Have u check this one on ur devices? it's marked as FIX COMMITTED. 
 https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1438910
 I can see it's still exciting with latest repo on 15.04(r211) 

-- 
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/dynamic_creation_perf_tunning/+merge/258449
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~gary-wzl77/ubuntu-calendar-app/dynamic_creation_perf_tunning into lp:ubuntu-calendar-app

2015-05-06 Thread Gary.Wang
Gary.Wang has proposed merging 
lp:~gary-wzl77/ubuntu-calendar-app/dynamic_creation_perf_tunning into 
lp:ubuntu-calendar-app.

Requested reviews:
  Kunal Parmar (pkunal-parmar)

For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/dynamic_creation_perf_tunning/+merge/258449

Performance tunning for page transition.
Page Transition between different views will cause dynamic 
creation(Qt.ResolvedUrl)
for qml object back and forth.Using Qt.CreateComponent for dynamic creation for 
1st
time and reuse exsiting obj without re-creating.

related bugs:#1423185,#1309263
-- 
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.
=== modified file 'EventListModel.qml'
--- EventListModel.qml	2014-09-28 05:25:31 +
+++ EventListModel.qml	2015-05-07 05:25:29 +
@@ -44,7 +44,7 @@
 var newObject = Qt.createQmlObject(import QtQuick 2.3; Timer {interval: 1000; running: true; repeat: false;},
 eventModel, EventListMode.qml);
 newObject.onTriggered.connect( function(){
-var items = getItems(eventModel.startPeriod, eventModel.endPeriod);
+var items = itemsByTimePeriod(eventModel.startPeriod, eventModel.endPeriod);
 if( isLoading == true  items.length === 0) {
 isLoading = false;
 modelChanged();
@@ -53,7 +53,6 @@
 });
 }
 
-
 onModelChanged: {
 isLoading = false
 if(listeners === undefined){

=== modified file 'NewEvent.qml'
--- NewEvent.qml	2015-04-05 04:54:54 +
+++ NewEvent.qml	2015-05-07 05:25:29 +
@@ -219,6 +219,7 @@
 event.collectionId = calendarsOption.model[calendarsOption.selectedIndex].collectionId;
 model.saveItem(event);
 pageStack.pop();
+
 root.eventAdded(event);
 }
 }

=== modified file 'YearView.qml'
--- YearView.qml	2015-02-18 19:27:20 +
+++ YearView.qml	2015-05-07 05:25:29 +
@@ -29,6 +29,12 @@
 
 Keys.forwardTo: [yearPathView]
 
+function refreshCurrentYear(year) {
+currentYear = year;
+var yearViewDelegate = yearPathView.currentItem.item;
+yearViewDelegate.refresh();
+}
+
 Action {
 id: calendarTodayAction
 objectName:todaybutton
@@ -85,7 +91,7 @@
 
 scrollMonth: 0;
 isCurrentItem: index == yearPathView.currentIndex
-year: (yearViewPage.currentYear + yearPathView.indexType(index))
+year: (currentYear + yearPathView.indexType(index))
 
 anchors.fill: parent
 }

=== modified file 'YearViewDelegate.qml'
--- YearViewDelegate.qml	2014-11-29 09:40:53 +
+++ YearViewDelegate.qml	2015-05-07 05:25:29 +
@@ -18,6 +18,19 @@
 model: 12 /* months in a year */
 
 onYearChanged: {
+refresh();
+}
+
+//scroll in case content height changed
+onHeightChanged: {
+yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
+}
+
+Component.onCompleted: {
+yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
+}
+
+function refresh() {
 scrollMonth = 0;
 var today = new Date();
 if(year == today.getFullYear()) {
@@ -26,15 +39,6 @@
 yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
 }
 
-//scroll in case content height changed
-onHeightChanged: {
-yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
-}
-
-Component.onCompleted: {
-yearView.positionViewAtIndex(scrollMonth, GridView.Beginning);
-}
-
 Connections{
 target: yearPathView
 onScrollUp: {

=== modified file 'calendar.qml'
--- calendar.qml	2015-01-22 20:07:30 +
+++ calendar.qml	2015-05-07 05:25:29 +
@@ -186,7 +186,7 @@
 
 Tabs{
 id: tabs
-Keys.forwardTo: [tabs.currentPage.item]
+Keys.forwardTo: [tabs.currentPage]
 
 property var currentDay: DateExt.today();
 
@@ -316,156 +316,139 @@
 }
 }
 
+onSelectedTabChanged: {
+switch (tabs.selectedTab) {
+case yearTab:{
+if (yearTab.page === null) {
+var yearViewCom = Qt.createComponent(YearView.qml);
+if (yearViewCom.status === Component.Ready) {
+var yearViewObj = yearViewCom.createObject(mainView);
+
+yearViewObj.monthSelected.connect(function (date){
+var now = DateExt.today();
+if( date.getMonth() === now.getMonth()
+ date.getFullYear() === now.getFullYear()) {
+tabs.currentDay = now;
+} else {
+tabs.currentDay = date.midnight