[Merge] lp:~boiko/messaging-app/more_attachment_types into lp:messaging-app

Tiago Salem Herrmann tiago.herrmann at canonical.com
Wed Nov 25 18:31:50 UTC 2015


Review: Needs Fixing



Diff comments:

> === added file 'src/qml/AttachmentPanel.qml'
> --- src/qml/AttachmentPanel.qml	1970-01-01 00:00:00 +0000
> +++ src/qml/AttachmentPanel.qml	2015-11-24 17:02:21 +0000
> @@ -0,0 +1,148 @@
> +import QtQuick 2.0
> +import Ubuntu.Components 1.2
> +import Ubuntu.Components.ListItems 1.2 as ListItem

Can you change these two imports to 1.3 ?

> +import QtQuick.Layouts 1.0
> +
> +Item {
> +    id: panel
> +    signal attachmentAvailable(var attachment)
> +
> +    property bool expanded: false
> +
> +    function show() {
> +        expanded = true
> +    }
> +
> +    function hide() {
> +        expanded = false
> +    }
> +
> +    height: expanded ? childrenRect.height + units.gu(3): 0
> +    Behavior on height {
> +        UbuntuNumberAnimation {}
> +    }
> +    enabled: expanded
> +
> +    Connections {
> +        target: Qt.inputMethod
> +        onVisibleChanged: {
> +            if (Qt.inputMethod.visible) {
> +                panel.expanded = false
> +            }
> +        }
> +    }
> +
> +    ContentImport {
> +        id: contentImporter
> +
> +        onContentReceived: {
> +            var attachment = {}
> +            var filePath = String(contentUrl).replace('file://', '')
> +            attachment["contentType"] = application.fileMimeType(filePath)
> +            attachment["name"] = filePath.split('/').reverse()[0]
> +            attachment["filePath"] = filePath
> +            panel.attachmentAvailable(attachment)
> +            hide()
> +        }
> +    }
> +
> +    ListItem.ThinDivider {
> +        id: divider
> +        anchors {
> +            top: parent.top
> +            left: parent.left
> +            right: parent.right
> +        }
> +    }
> +
> +    GridLayout {
> +        id: grid
> +
> +        property int iconSize: units.gu(3)
> +        property int buttonSpacing: units.gu(2)
> +        anchors {
> +            top: parent.top
> +            topMargin: units.gu(3)
> +            left: parent.left
> +            right: parent.right
> +        }
> +
> +        height: childrenRect.height
> +        columns: 4
> +        rowSpacing: units.gu(3)
> +
> +        TransparentButton {
> +            id: pictureButton
> +            objectName: "pictureButton"
> +            iconName: "stock_image"
> +            iconSize: grid.iconSize
> +            spacing: grid.buttonSpacing
> +            text: i18n.tr("Image")
> +            Layout.alignment: Qt.AlignHCenter
> +            onClicked: {
> +                contentImporter.requestPicture()
> +            }
> +        }
> +
> +        // FIXME: re-enable that once we have proper delegates
> +        /*TransparentButton {
> +            id: videoButton
> +            objectName: "videoButton"
> +            iconName: "stock_video"
> +            iconSize: grid.iconSize
> +            spacing: grid.buttonSpacing
> +            text: i18n.tr("Video")
> +            Layout.alignment: Qt.AlignHCenter
> +            onClicked: {
> +                contentImporter.requestVideo()
> +            }
> +        }*/
> +
> +        // FIXME: enable generic file sharing if we ever support it
> +        /*TransparentButton {
> +            id: fileButton
> +            objectName: "fileButton"
> +            iconSource: Qt.resolvedUrl("assets/stock_document.svg")
> +            iconSize: grid.iconSize
> +            spacing: grid.buttonSpacing
> +            text: i18n.tr("File")
> +            Layout.alignment: Qt.AlignHCenter
> +        }*/
> +
> +        // FIXME: enable location sharing if we ever support it
> +        /*TransparentButton {
> +            id: locationButton
> +            objectName: "locationButton"
> +            iconName: "location"
> +            iconSize: grid.iconSize
> +            spacing: grid.buttonSpacing
> +            text: i18n.tr("Location")
> +            Layout.alignment: Qt.AlignHCenter
> +        }*/
> +
> +        TransparentButton {
> +            id: contactButton
> +            objectName: "contactButton"
> +            iconName: "stock_contact"
> +            iconSize: grid.iconSize
> +            spacing: grid.buttonSpacing
> +            text: i18n.tr("Contact")
> +            Layout.alignment: Qt.AlignHCenter
> +            onClicked: {
> +                contentImporter.requestContact()
> +            }
> +        }
> +
> +        // FIXME: enable that once we add support for burn-after-read
> +        /*TransparentButton {
> +            id: burnAfterReadButton
> +            objectName: "burnAfterReadButton"
> +            iconSource: Qt.resolvedUrl("assets/burn-after-read.svg")
> +            iconSize: grid.iconSize
> +            spacing: grid.buttonSpacing
> +            text: i18n.tr("Burn after read")
> +            Layout.alignment: Qt.AlignHCenter
> +        }*/
> +    }
> +}
> +
> 
> === renamed file 'src/qml/PictureImport.qml' => 'src/qml/ContentImport.qml'
> --- src/qml/PictureImport.qml	2015-09-14 13:51:27 +0000
> +++ src/qml/ContentImport.qml	2015-11-24 17:02:21 +0000
> @@ -15,8 +15,8 @@
>   */
>  
>  import QtQuick 2.2
> -import Ubuntu.Components 1.3
> -import Ubuntu.Components.Popups 1.3 as Popups
> +import Ubuntu.Components 1.1

Can you change it back to 1.3?

> +import Ubuntu.Components.Popups 1.0 as Popups
>  import Ubuntu.Content 0.1 as ContentHub
>  
>  Item {


-- 
https://code.launchpad.net/~boiko/messaging-app/more_attachment_types/+merge/278459
Your team Ubuntu Phablet Team is subscribed to branch lp:messaging-app.



More information about the Ubuntu-reviews mailing list