I have made the following changes intended for :
  CE:Apps / qmlcontacts

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/6838

Thank You,
Robin Burchell

[This message was auto-generated]

---

Request # 6838:

Messages from BOSS:

State: review at 2012-09-30T23:57:34 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:w00t:branches:CE:Apps / qmlcontacts -> CE:Apps / qmlcontacts
  
changes files:
--------------
--- qmlcontacts.changes
+++ qmlcontacts.changes
@@ -0,0 +1,8 @@
+* Mon Oct 1 2012 Robin Burchell <[email protected]> - 0.4.0
+- Fix QML/JS files not showing in Qt Creator (from Johan Paul)
+- Fixes NEMO#250: Integrate messaging into contacts (from Robin/John Brooks)
+- Fixes NEMO#384: SMS button does nothing (from Robin/John Brooks)
+- New contact card design (from Robin)
+- Fixes NEMO#390: Unable to scroll contact card to the end (from Robin)
+- Fixes NEMO#268: [FEA] Search contacts (from Nicola De Filippo/Robin)
+

old:
----
  0001-fix-card-page-loading.patch
  qmlcontacts-0.3.15.tar.bz2

new:
----
  qmlcontacts-0.4.0.tar.bz2

spec files:
-----------
--- qmlcontacts.spec
+++ qmlcontacts.spec
@@ -1,6 +1,6 @@
 # 
 # Do NOT Edit the Auto-generated Part!
-# Generated by: spectacle version 0.24.1
+# Generated by: spectacle version 0.25
 # 
 
 Name:       qmlcontacts
@@ -9,14 +9,13 @@
 # << macros
 
 Summary:    Contacts application for nemo
-Version:    0.3.15
+Version:    0.4.0
 Release:    1
 Group:      Applications/System
 License:    GPLv2
 URL:        https://github.com/nemomobile/qmlcontacts
 Source0:    %{name}-%{version}.tar.bz2
 Source100:  qmlcontacts.yaml
-Patch0:     0001-fix-card-page-loading.patch
 Requires:   qt-components
 Requires:   nemo-qml-plugins-thumbnailer
 Requires:   nemo-qml-plugins-contacts
@@ -24,6 +23,7 @@
 Requires:   qmlgallery
 Requires:   qmlfilemuncher
 Requires:   contactsd
+Requires:   qmlmessages
 BuildRequires:  pkgconfig(QtCore) >= 4.7.0
 BuildRequires:  pkgconfig(QtDeclarative)
 BuildRequires:  pkgconfig(QtContacts)
@@ -50,8 +50,6 @@
 %prep
 %setup -q -n %{name}
 
-# 0001-fix-card-page-loading.patch
-%patch0 -p1
 # >> setup
 # << setup
 

other changes:
--------------

++++++ qmlcontacts-0.3.15.tar.bz2 -> qmlcontacts-0.4.0.tar.bz2
--- src/qml/AvatarPickerSheet.qml
+++ src/qml/AvatarPickerSheet.qml
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import org.nemomobile.thumbnailer 1.0
--- src/qml/ContactCardContentWidget.qml
+++ src/qml/ContactCardContentWidget.qml
@@ -1,89 +1,183 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import org.nemomobile.contacts 1.0
+import org.nemomobile.qmlcontacts 1.0
 import stage.rubyx.voicecall 1.0
+import org.nemomobile.messages 1.0
 
 Flickable {
     id: detailViewPortrait
     contentWidth: parent.width
-    contentHeight: detailsList.height + (UiConstants.DefaultMargin * 2)
+    contentHeight: childrenRect.height
     flickableDirection: Flickable.VerticalFlick
     clip: true
 
     property Person contact
     property VoiceCallManager callManager
+    property MessagesManager messagesManager
 
     Item {
-        id: detailsList
+        id: header
+        height: avatar.height + UiConstants.DefaultMargin
+        property int shortSize: parent.parent.width > parent.parent.height ? 
parent.parent.height : parent.parent.width
+        ContactAvatarImage {
+            id: avatar
+            contact: detailViewPage.contact
+            anchors.left: parent.left
+            anchors.top: parent.top
+            anchors.margins: UiConstants.DefaultMargin
+            width: parent.shortSize * 0.3
+            height: parent.shortSize * 0.3
+        }
+
+        Label {
+            anchors.verticalCenter: avatar.verticalCenter
+            anchors.left: avatar.right
+            anchors.leftMargin: UiConstants.DefaultMargin
+            text: contact.displayLabel
+        }
+    }
+
+    SelectionDialog {
+        id: selectionDialog
+        property int mode: 0 // 0: call, 1: sms, 2: message, 3: mail
+
+        onSelectedIndexChanged: {
+            if (mode == 0)
+                callManager.dial(callManager.defaultProviderId, 
contact.phoneNumbers[selectedIndex]);
+            else if (mode == 1)
+                onClicked: 
messagesManager.startSMS(contact.phoneNumbers[selectedIndex])
+            else if (mode == 2)
+                
messagesManager.startConversation(contact.accountPaths[selectedIndex], 
contact.accountUris[selectedIndex])
+                
+            accept()
+        }
+    }
+
+    Button {
+        id: callButton
+        anchors.top: header.bottom
+        anchors.topMargin: UiConstants.DefaultMargin
+        anchors.left: parent.left
+        anchors.leftMargin: UiConstants.DefaultMargin
+        height: contact.phoneNumbers.length ? 
UiConstants.ListItemHeightDefault - UiConstants.DefaultMargin : 0
+        width: parent.width - UiConstants.DefaultMargin * 2
+        visible: height != 0
+        iconSource: "image://theme/icon-m-telephony-incoming-call"; // TODO: 
icon-m-toolbar-make-call
+        text: "Call"
+        onClicked: {
+            if (contact.phoneNumbers.length == 1) {
+                callManager.dial(callManager.defaultProviderId, 
contact.phoneNumbers[0])
+                return
+            }
+
+            selectionDialog.mode = 0
+            selectionDialog.titleText = qsTr("Call %1").arg(contact.firstName)
+            selectionDialog.model = contact.phoneNumbers
+            selectionDialog.open()
+        }
+    }
+
+    Button {
+        id: smsButton
+        anchors.top: callButton.bottom
+        anchors.topMargin: UiConstants.DefaultMargin
         anchors.left: parent.left
-        anchors.right: parent.right
-        anchors.top: parent.top
-        anchors.margins: UiConstants.DefaultMargin
-        height: phones.childrenRect.height
-
-        ListView {
-            id: phones
-            anchors { left: parent.left; right: parent.right; top: parent.top; 
}
-            model: contact.phoneNumbers
-            interactive: false
-            height: childrenRect.height
-            delegate: Label {
-                anchors.left: parent.left
-                anchors.right: parent.right
-                height: UiConstants.ListItemHeightDefault
-                text: model.modelData
-                verticalAlignment: Text.AlignVCenter
-
-                ButtonRow {
-                    width: 220
-                    anchors.right: parent.right
-                    anchors.top: parent.top
-                    anchors.bottom: parent.bottom
-                    anchors.topMargin: UiConstants.DefaultMargin / 2
-                    anchors.bottomMargin: UiConstants.DefaultMargin / 2
-                    anchors.rightMargin: UiConstants.DefaultMargin
-                    exclusive: false
-                    Button {
-                        height: parent.height
-                        iconSource: 
"image://theme/icon-m-telephony-incoming-call";
-                        onClicked: 
callManager.dial(callManager.defaultProviderId, model.modelData);
-                    }
-                    Button {
-                        height: parent.height
-                        iconSource: "image://theme/icon-m-toolbar-send-sms";
-                        onClicked: console.log("TODO: Send SMS to " + 
contact.firstName)
-                    }
-                }
+        anchors.leftMargin: UiConstants.DefaultMargin
+        height: contact.phoneNumbers.length ? 
UiConstants.ListItemHeightDefault - UiConstants.DefaultMargin : 0
+        width: parent.width - UiConstants.DefaultMargin * 2
+        visible: height != 0
+        iconSource: "image://theme/icon-m-toolbar-send-chat";
+        text: "SMS"
+        onClicked: {
+            if (contact.phoneNumbers.length == 1) {
+                messagesManager.startSMS(contact.phoneNumbers[0])
+                return
             }
+
+            selectionDialog.mode = 1
+            selectionDialog.titleText = qsTr("SMS %1").arg(contact.firstName)
+            selectionDialog.model = contact.phoneNumbers
+            selectionDialog.open()
         }
+    }
 
-        ListView {
-            id: emails
-            anchors { left: parent.left; right: parent.right; top: 
phones.bottom; }
-            model: contact.emailAddresses
-            interactive: false
-            height: childrenRect.height
-            delegate: Label {
-                anchors.left: parent.left
-                anchors.right: parent.right
-                height: UiConstants.ListItemHeightDefault
-                text: model.modelData
-                verticalAlignment: Text.AlignVCenter
-
-                Button {
-                    width: 110
-                    anchors.right: parent.right
-                    anchors.top: parent.top
-                    anchors.bottom: parent.bottom
-                    anchors.topMargin: UiConstants.DefaultMargin / 2
-                    anchors.bottomMargin: UiConstants.DefaultMargin / 2
-                    anchors.rightMargin: UiConstants.DefaultMargin
-                    iconSource: "image://theme/icon-l-email";
-                    onClicked: console.log("TODO: Send SMS to " + 
contact.firstName)
-                }
+    Button {
+        id: messageButton
+        anchors.top: smsButton.bottom
+        anchors.topMargin: UiConstants.DefaultMargin
+        anchors.left: parent.left
+        anchors.leftMargin: UiConstants.DefaultMargin
+        height: contact.accountUris.length ? UiConstants.ListItemHeightDefault 
- UiConstants.DefaultMargin : 0
+        width: parent.width - UiConstants.DefaultMargin * 2
+        visible: height != 0
+        iconSource: "image://theme/icon-m-toolbar-send-chat";
+        text: "Message"
+        onClicked: {
+            if (contact.accountUris.length == 1) {
+                messagesManager.startConversation(contact.accountPaths[0], 
contact.accountUris[0])
+                return
             }
+
+            selectionDialog.mode = 2
+            selectionDialog.titleText = qsTr("Message 
%1").arg(contact.firstName)
+            selectionDialog.model = contact.accountUris
+            selectionDialog.open()
         }
+    }
 
+    Button {
+        id: mailButton
+        anchors.top: messageButton.bottom
+        anchors.topMargin: UiConstants.DefaultMargin
+        anchors.left: parent.left
+        anchors.leftMargin: UiConstants.DefaultMargin
+        height: contact.emailAddresses.length ? 
UiConstants.ListItemHeightDefault - UiConstants.DefaultMargin : 0
+        width: parent.width - UiConstants.DefaultMargin * 2
+        visible: height != 0
+        iconSource: "image://theme/icon-m-toolbar-send-sms"; // TODO: 
icon-m-toolbar-send-email
+        text: "Mail"
+        onClicked: {
+            console.log("TODO: integrate with mail client")
+            if (contact.emailAddresses.length == 1)
+                return
+
+            selectionDialog.mode = 3
+            selectionDialog.titleText = qsTr("Mail %1").arg(contact.firstName)
+            selectionDialog.model = contact.emailAddresses
+            selectionDialog.open()
+        }
     }
 }
 
--- src/qml/ContactCardPage.qml
+++ src/qml/ContactCardPage.qml
@@ -1,15 +1,48 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import "constants.js" as Constants
 import org.nemomobile.qmlcontacts 1.0
 import org.nemomobile.contacts 1.0
 import stage.rubyx.voicecall 1.0
+import org.nemomobile.messages 1.0
 
 Page {
     id: detailViewPage
     property Person contact
 
     VoiceCallManager {id:callManager}
+    MessagesManager { id: messagesManager }
 
     Connections {
         target: contact
@@ -18,22 +51,12 @@
         }
     }
 
-    PageHeader {
-        id: header
-        text: contact.displayLabel
-        content: ContactAvatarImage {
-            contact: detailViewPage.contact
-        }
-    }
-
     ContactCardContentWidget {
         id: detailViewContact
-        anchors.top: header.bottom
-        anchors.bottom: parent.bottom
-        anchors.left: parent.left
-        anchors.right: parent.right
+        anchors.fill: parent
         contact: detailViewPage.contact
-        callManager:callManager
+        callManager: callManager
+        messagesManager: messagesManager
     }
 
     tools: ToolBarLayout {
--- src/qml/ContactEditorSheet.qml
+++ src/qml/ContactEditorSheet.qml
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import "constants.js" as Constants
--- src/qml/ContactImportSheet.qml
+++ src/qml/ContactImportSheet.qml
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import "constants.js" as Constants
--- src/qml/ContactListPage.qml
+++ src/qml/ContactListPage.qml
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import "constants.js" as Constants
@@ -12,6 +43,17 @@
         text: qsTr("Contacts")
     }
 
+    SearchBox {
+         id: searchbox
+         placeHolderText: "Search"
+         anchors.top: header.bottom
+         anchors.left: parent.left
+         anchors.right: parent.right
+         onSearchTextChanged: {
+             app.contactListModel.search(searchbox.searchText);
+         }
+     }
+
     Component {
         id: contactComponent
         Person {
@@ -20,7 +62,7 @@
 
     ContactListWidget {
         id: gvp
-        anchors.top: header.bottom
+        anchors.top: searchbox.bottom
         anchors.left: parent.left
         anchors.right: parent.right
         anchors.bottom: parent.bottom
@@ -33,11 +75,12 @@
             })
         }
 
+        searching: (searchbox.searchText.length > 0)
         model: app.contactListModel
         delegate: ContactListDelegate {
             id: card
             onClicked: {
-                Constants.loadSingleton("ContactCardPage.qml", 
groupedViewPortrait,
+                Constants.loadSingleton("ContactCardPage.qml", groupedViewPage,
                     function(card) {
                         card.contact = model.person
                         pageStack.push(card)
--- src/qml/DeleteContactDialog.qml
+++ src/qml/DeleteContactDialog.qml
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.1
 import org.nemomobile.contacts 1.0
--- src/qml/EditableList.qml
+++ src/qml/EditableList.qml
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.1
 import org.nemomobile.contacts 1.0
--- src/qml/PageHeader.qml
+++ src/qml/PageHeader.qml
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 
--- src/qml/SearchBox.qml
+++ src/qml/SearchBox.qml
@@ -0,0 +1,138 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ **
+ ** $QT_BEGIN_LICENSE:BSD$
+ ** You may use this file under the terms of the BSD license as follows:
+ **
+ ** "Redistribution and use in source and binary forms, with or without
+ ** modification, are permitted provided that the following conditions are 
+ ** met:
+ **   * Redistributions of source code must retain the above copyright
+ **     notice, this list of conditions and the following disclaimer.
+ **   * Redistributions in binary form must reproduce the above copyright
+ **     notice, this list of conditions and the following disclaimer in
+ **     the documentation and/or other materials provided with the 
+ **     distribution.
+ **   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor 
+ **     the names of its contributors may be used to endorse or promote
+ **     products derived from this software without specific prior written
+ **     permission.
+ **
+ ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+ ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+ ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+ ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
+
+import QtQuick 1.1
+import com.nokia.meego 1.0
+
+Item {
+    id: root
+
+    // Declared properties
+    property alias searchText: searchTextInput.text
+    property alias placeHolderText: searchTextInput.placeholderText
+    property alias maximumLength: searchTextInput.maximumLength
+    property alias activeFocus: searchTextInput.activeFocus
+    // Styling for the SearchBox
+    property Style platformStyle: ToolBarStyle {}
+
+    // Signals & functions
+    signal backClicked
+
+    // Attribute definitions
+    width: parent ? parent.width : 0
+    height: bgImage.height
+
+
+    // SearchBox background.
+    BorderImage {
+        id: bgImage
+        width: root.width
+        border.left: 10
+        border.right: 10
+        border.top: 10
+        border.bottom: 10
+        source: platformStyle.background
+    }
+
+    TextField {
+        id: searchTextInput
+
+        // Helper function ripped from QQC platform sources. Used for
+        // getting the correct URI for the platform toolbar images.
+        function __handleIconSource(iconId) {
+            var prefix = "icon-m-"
+            // check if id starts with prefix and use it as is
+            // otherwise append prefix and use the inverted version if required
+            if (iconId.indexOf(prefix) !== 0)
+                iconId =  prefix.concat(iconId).concat(theme.inverted ? 
"-white" : "");
+            return "image://theme/" + iconId;
+        }
+
+        inputMethodHints: Qt.ImhNoPredictiveText
+
+        anchors {
+            left: parent.left
+            right: parent.right
+            verticalCenter: parent.verticalCenter
+            margins: UiConstants.DefaultMargin
+        }
+
+        // Save some empty space for the text on the left & right,
+        // for the icon graphics.
+        platformStyle: TextFieldStyle {
+            paddingLeft: searchIcon.width + UiConstants.DefaultMargin * 1.5 // 
2 is mathematically correct, but looks too big.
+            paddingRight: clearTextIcon.width
+        }
+
+        // Search icon, just for styling the SearchBox a bit.
+        Image {
+            id: searchIcon
+
+            anchors {
+                left: parent.left
+                verticalCenter: parent.verticalCenter
+                margins: UiConstants.DefaultMargin
+            }
+
+            fillMode: Image.PreserveAspectFit
+            source: searchTextInput.__handleIconSource("toolbar-search")
+        }
+
+        // A trash can image, clicking it allows the user to quickly
+        // remove the typed text.
+        Image {
+            id: clearTextIcon
+
+            anchors {
+                right: parent.right
+                rightMargin: UiConstants.DefaultMargin
+                verticalCenter: parent.verticalCenter
+            }
+
+            fillMode: Image.PreserveAspectFit
+            source: searchTextInput.__handleIconSource("toolbar-delete")
+            visible: searchTextInput.text.length > 0
+
+            MouseArea {
+                anchors.fill: parent
+                onClicked: {
+                    searchTextInput.text = ""
+                    searchTextInput.forceActiveFocus()
+                }
+            }
+        }
+    }
+}
--- src/qml/api/ContactAvatarImage.qml
+++ src/qml/api/ContactAvatarImage.qml
@@ -1,9 +1,32 @@
 /*
- * Copyright 2011 Intel Corporation.
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
  *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  */
 
 import QtQuick 1.1
@@ -24,16 +47,25 @@
         avatarPotentiallyChanged();
     }
 
+    Component.onCompleted: {
+        if (contact == null)
+            avatarPotentiallyChanged();
+    }
+
     function avatarPotentiallyChanged() {
-        if (contact.avatarPath == 
"image://theme/icon-m-telephony-contact-avatar")
+        if (contact == null || contact.avatarPath == 
"image://theme/icon-m-telephony-contact-avatar")
             source = "image://theme/icon-m-telephony-contact-avatar"
         else
             source = "image://nemoThumbnail/" + contact.avatarPath
     }
 
     onStatusChanged: {
+        var fallback = "image://theme/icon-m-telephony-contact-avatar"
         if (status == Image.Error || status == Image.Null) {
-            source = "image://theme/icon-m-telephony-contact-avatar"
+            if (source == fallback)
+                console.log("ContactAvatarImage failed to load fallback 
image!");
+            else
+                source = fallback
         }
     }
 }
--- src/qml/api/ContactListWidget.qml
+++ src/qml/api/ContactListWidget.qml
@@ -37,6 +37,8 @@
 
     signal addNewContact
 
+    property bool searching: false
+
     cacheBuffer: height
     section.property: "sectionBucket"
     section.criteria: ViewSection.FirstCharacter
@@ -61,7 +63,7 @@
         id: emptyListView
         visible: parent.count == 0
         anchors.centerIn: parent
-        text: qsTr("You haven't added any contacts yet.")
+        text: ((searching) ? qsTr("Contact not found.") : qsTr("You haven't 
added any contacts yet."));
 
         Button {
             id: button
--- src/qml/constants.js
+++ src/qml/constants.js
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2011-2012 Robin Burchell <[email protected]>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * "Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *   * Neither the name of Nemo Mobile nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ */
+
 var landscape = 0
 var portrait = 90
 var reverseLandscape = 180
--- src/res.qrc
+++ src/res.qrc
@@ -1,5 +1,5 @@
 <RCC>
-    <qresource>
+    <qresource prefix="/">
         <file>qml/AvatarPickerSheet.qml</file>
         <file>qml/ContactCardContentWidget.qml</file>
         <file>qml/ContactCardPage.qml</file>
@@ -11,5 +11,6 @@
         <file>qml/PageHeader.qml</file>
         <file>qml/main.qml</file>
         <file>qml/constants.js</file>
+        <file>qml/SearchBox.qml</file>
     </qresource>
 </RCC>
--- src/src.pro
+++ src/src.pro
@@ -20,8 +20,8 @@
 SOURCES += main.cpp
 RESOURCES += res.qrc
 
-QML_FILES = *.qml
-JS_FILES = *.js
+QML_FILES = qml/*.qml
+JS_FILES = *qml/.js
 
 OTHER_FILES += $${QML_FILES} $${JS_FILES}
 

++++++ qmlcontacts.yaml
--- qmlcontacts.yaml
+++ qmlcontacts.yaml
@@ -1,14 +1,12 @@
 Name:  qmlcontacts
 Summary: Contacts application for nemo
-Version: 0.3.15
+Version: 0.4.0
 Release: 1
 Group: Applications/System
 License: GPLv2
 URL: https://github.com/nemomobile/qmlcontacts
 Sources:
     - "%{name}-%{version}.tar.bz2"
-Patches:
-    - 0001-fix-card-page-loading.patch
 Provides:
     - meego-handset-people > 0.2.32
     - meego-handset-people-branding-upstream > 0.2.32
@@ -35,6 +33,8 @@
     - qmlfilemuncher
     # contactsd is required to show IM contacts in the applications
     - contactsd
+    # required for SMS/IM integration
+    - qmlmessages
  
 Files:
     - "%{_bindir}/qmlcontacts"

++++++ deleted files:
--- 0001-fix-card-page-loading.patch



Reply via email to