~ps-jenkins/trust-store/utopic-proposed

« back to all changes in this revision

Viewing changes to src/core/trust/mir/prompt_main.qml

  • Committer: CI bot
  • Author(s): thomas-voss
  • Date: 2014-08-06 13:48:03 UTC
  • mfrom: (21.3.40 add-trust-stored)
  • Revision ID: ps-jenkins@lists.canonical.com-20140806134803-sb2vk6hq36xq6ob2
Bail out in daemons if config and init stage fails.
Add a simple shell to core::trust::Daemon::Stub for testing purposes.
Add acceptance test for standalone service, in preparation for patches to the Android Camera Service.
Add tagged integer types for Pid, Uid and Gid.
Add test case to cover end-end scenarios for UnixDomainSocketRemoteAgent.
Add a remote agent interface together with an implementation for unix domain sockets. 
Approved by: Marcus Tomlinson, Seth Arnold

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2014 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
1
17
import QtQuick 2.0
2
 
import Ubuntu.Components 0.1
3
 
import QtQuick.Layouts 1.1
 
18
import Ubuntu.Components 1.1
 
19
import Ubuntu.Components.Popups 1.0
4
20
 
5
21
Rectangle {
6
 
    anchors.fill: parent
 
22
    width: units.gu(40)
 
23
    height: units.gu(71)
 
24
    color: "transparent"
 
25
 
 
26
    property var dialogTitle: title
 
27
    property var dialogDescription: description
7
28
 
8
29
    signal quit(int code)
9
30
 
10
 
    ColumnLayout {
11
 
        anchors.fill: parent
12
 
        anchors.margins: units.gu(2)
13
 
        spacing: units.gu(2)
14
 
 
15
 
        Label {
16
 
            anchors.horizontalCenter: parent.horizontalCenter
17
 
 
18
 
            text: title
19
 
            font.family: "Ubuntu"
20
 
            fontSize: "large"
21
 
 
22
 
            maximumLineCount: 1
23
 
            elide: Text.ElideRight
24
 
        }
25
 
 
26
 
        Label {
27
 
 
28
 
            text: description
29
 
            font.family: "Ubuntu"
30
 
            fontSize: "medium"
31
 
            Layout.maximumWidth: parent.width
32
 
            Layout.fillHeight: true
33
 
 
34
 
            wrapMode: Text.WordWrap
35
 
        }
36
 
 
37
 
        RowLayout {
38
 
            spacing: units.gu(1)
39
 
            height: units.gu(3)
40
 
            anchors.right: parent.right
41
 
 
42
 
            Button {
43
 
                text: "Deny"
44
 
                onClicked: quit(1)
45
 
            }
46
 
            Button {
47
 
                text: "Grant"
48
 
                onClicked: quit(0)
49
 
            }
 
31
    Component.onCompleted: dialog.show();
 
32
 
 
33
    Dialog {
 
34
        id: dialog
 
35
 
 
36
        title: dialogTitle
 
37
        text: dialogDescription
 
38
        fadingAnimation: PropertyAnimation { duration: 0 }
 
39
 
 
40
        Button {
 
41
            objectName: "deny"
 
42
            text: i18n.tr("Deny")
 
43
            color: UbuntuColors.red
 
44
            onClicked: quit(1)
 
45
        }
 
46
 
 
47
        Button {
 
48
            objectName: "allow"
 
49
            text: i18n.tr("Allow")
 
50
            color: UbuntuColors.green
 
51
            onClicked: quit(0)
50
52
        }
51
53
    }
52
54
}
53