Merge lp:~tiagosh/address-book-app/bugfixing into lp:address-book-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 62
Merged at revision: 58
Proposed branch: lp:~tiagosh/address-book-app/bugfixing
Merge into: lp:address-book-app
Diff against target: 162 lines (+45/-12)
5 files modified
src/artwork/CMakeLists.txt (+1/-0)
src/artwork/favorite-selected.svg (+4/-4)
src/imports/ContactEdit/ValueSelector.qml (+28/-7)
src/imports/ContactList/ContactListPage.qml (+8/-0)
src/imports/Ubuntu/Contacts/ContactSimpleListView.qml (+4/-1)
To merge this branch: bzr merge lp:~tiagosh/address-book-app/bugfixing
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+183008@code.launchpad.net

Commit message

- add selection mode button to the main view toolbar
- change color of the favorite star
- do not append undefined variable to the contact name
- increase size touch area size for detail types
- do not rely on focus to open/close the detail type list

Description of the change

- add selection mode button to the main view toolbar
- change color of the favorite star
- do not append undefined variable to the contact name
- increase size touch area size for detail types
- do not rely on focus to open/close the detail type list

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Just tried on the device, the select.png artwork is not being installed, and thus the toolbar button has no icon.

review: Needs Fixing
62. By Tiago Salem Herrmann

install new icon

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good now!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/artwork/CMakeLists.txt'
2--- src/artwork/CMakeLists.txt 2013-07-25 21:47:14 +0000
3+++ src/artwork/CMakeLists.txt 2013-08-29 21:00:59 +0000
4@@ -32,6 +32,7 @@
5 protocol-twitter.svg
6 protocol-yahoo.svg
7 save.png
8+ select.png
9 settings.png
10 vertical-div.png
11 )
12
13=== modified file 'src/artwork/favorite-selected.svg'
14--- src/artwork/favorite-selected.svg 2013-07-25 20:00:03 +0000
15+++ src/artwork/favorite-selected.svg 2013-08-29 21:00:59 +0000
16@@ -13,8 +13,8 @@
17 height="90.000008"
18 id="svg3289"
19 version="1.1"
20- inkscape:version="0.48.3.1 r9886"
21- sodipodi:docname="favorite-selected@30.svg">
22+ inkscape:version="0.48.4 r9939"
23+ sodipodi:docname="favorite-selected.svg">
24 <defs
25 id="defs3291" />
26 <sodipodi:namedview
27@@ -31,7 +31,7 @@
28 inkscape:current-layer="g4451"
29 showgrid="true"
30 inkscape:window-width="1920"
31- inkscape:window-height="1029"
32+ inkscape:window-height="1056"
33 inkscape:window-x="0"
34 inkscape:window-y="24"
35 inkscape:window-maximized="1"
36@@ -84,7 +84,7 @@
37 </g>
38 <path
39 sodipodi:type="star"
40- style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
41+ style="color:#000000;fill:#db4111;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
42 id="path3008"
43 sodipodi:sides="5"
44 sodipodi:cx="-29"
45
46=== added file 'src/artwork/select.png'
47Binary files src/artwork/select.png 1970-01-01 00:00:00 +0000 and src/artwork/select.png 2013-08-29 21:00:59 +0000 differ
48=== modified file 'src/imports/ContactEdit/ValueSelector.qml'
49--- src/imports/ContactEdit/ValueSelector.qml 2013-07-25 21:16:28 +0000
50+++ src/imports/ContactEdit/ValueSelector.qml 2013-08-29 21:00:59 +0000
51@@ -17,13 +17,14 @@
52 import QtQuick 2.0
53 import Ubuntu.Components 0.1
54
55-FocusScope {
56+Item {
57 id: root
58
59 property alias values: listView.model
60 property alias currentIndex: listView.currentIndex
61- readonly property bool expanded: activeFocus
62+ property bool expanded: false
63 readonly property alias text: label.text
64+ onExpandedChanged: expanded && timer.start()
65
66 function selectItem(text) {
67 for(var i=0; i < values.length; i++) {
68@@ -35,11 +36,29 @@
69 currentIndex = -1
70 }
71
72- focus: true
73+ // FIXME: workaround to close list after a while.
74+ // we cant rely on focus since it hides the keyboard.
75+ MouseArea {
76+ anchors.fill: parent
77+ visible: expanded
78+ onPressed: {
79+ mouse.accepted = false
80+ timer.restart()
81+ }
82+ propagateComposedEvents: true
83+ z: 1
84+ }
85+
86+ Timer {
87+ id: timer
88+ interval: 5000
89+ onTriggered: expanded = false
90+ running: false
91+ }
92
93 Item {
94
95- visible: !root.activeFocus
96+ visible: !expanded
97 anchors.fill: parent
98
99 Label {
100@@ -78,7 +97,7 @@
101 MouseArea {
102 anchors.fill: label
103 propagateComposedEvents: true
104- onClicked: root.forceActiveFocus()
105+ onClicked: expanded = true
106 }
107 }
108
109@@ -87,7 +106,7 @@
110
111 anchors.fill: parent
112 orientation: ListView.Horizontal
113- visible: root.activeFocus
114+ visible: expanded
115
116 delegate: Item {
117 anchors {
118@@ -129,7 +148,9 @@
119 opacity: currentIndex == index ? 1.0 : 0.2
120
121 MouseArea {
122- anchors.fill: parent
123+ width: parent.width + units.gu(0.5)
124+ height: parent.height + units.gu(0.5)
125+ anchors.centerIn: parent
126 onClicked: currentIndex = index
127 }
128 }
129
130=== modified file 'src/imports/ContactList/ContactListPage.qml'
131--- src/imports/ContactList/ContactListPage.qml 2013-08-08 19:00:15 +0000
132+++ src/imports/ContactList/ContactListPage.qml 2013-08-29 21:00:59 +0000
133@@ -104,6 +104,14 @@
134 locked: contactList.isInSelectionMode
135 ToolbarButton {
136 action: Action {
137+ objectName: "selectButton"
138+ text: i18n.tr("Select")
139+ iconSource: "artwork:/select.png"
140+ onTriggered: contactList.startSelection()
141+ }
142+ }
143+ ToolbarButton {
144+ action: Action {
145 text: i18n.tr("Add")
146 iconSource: "artwork:/add.png"
147 onTriggered: {
148
149=== modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml'
150--- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2013-08-28 17:06:38 +0000
151+++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2013-08-29 21:00:59 +0000
152@@ -178,7 +178,10 @@
153 values += " "
154 }
155 if (detail) {
156- values += detail.value(detailFields[i])
157+ var value = detail.value(detailFields[i])
158+ if (value !== undefined) {
159+ values += value
160+ }
161 }
162 }
163

Subscribers

People subscribed via source and target branches