Ubuntu Pastebin

Paste from sverzegnassi at Thu, 23 Apr 2015 17:03:28 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
TweakToolPage {
[...]

    ListItem.Base {
        Label {
            text: i18n.tr("Restore default...")
            anchors.verticalCenter: parent.verticalCenter
        }

        onClicked: {
            var dialog = PopupUtils.open(defaultDialog);
            dialog.accepted.connect(function() {
                setIncomingMessageSound("/usr/share/sounds/ubuntu/notifications/Xylo.ogg")
            })
        }
    }

    Component {
        id: defaultDialog

        Dialog {
            id: defaultDialogue

            signal accepted

            title: i18n.tr("Restore default")
            text: i18n.tr("Are you sure?")

            Button {
                text: i18n.tr("Yes")
                color: UbuntuColors.orange
                onClicked: {
                    defaultDialogue.accepted();
                    PopupUtils.close(defaultDialogue);
                }
            }

            Button {
                text: i18n.tr("No")
                onClicked: PopupUtils.close(defaultDialogue);
            }
        }
    }
}
Download as text