~ubuntu-branches/ubuntu/wily/webbrowser-app/wily

« back to all changes in this revision

Viewing changes to src/app/ContentPickerDialog.qml

  • Committer: Package Import Robot
  • Author(s): CI Train Bot, Alexandre Abreu, Arthur Mello, CI Train Bot, Olivier Tilloy, Ugo Riboni
  • Date: 2015-08-20 08:58:20 UTC
  • mfrom: (1.2.108)
  • Revision ID: package-import@ubuntu.com-20150820085820-r7zwvoqvii6o66a0
Tags: 0.23+15.10.20150820-0ubuntu1
[ Alexandre Abreu ]
* Fix webapp name logic (LP: #1473472)

[ Arthur Mello ]
* Add support for removing history entries with delete key in
  HistoryViewWide (LP: #1484562)

[ CI Train Bot ]
* New rebuild forced.

[ Olivier Tilloy ]
* Remove an old workaround for an issue that was fixed since then in
  the content hub and that caused the file picker to accept the
  selected file twice.

[ Ugo Riboni ]
* Merge two url utility files into one, since they had no reason for
  being separate. Add unit tests for some of the functions that had
  none.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        parent: QuickUtils.rootItem(this)
34
34
 
35
35
        property var activeTransfer
36
 
        property var selectedItems
37
36
 
38
37
        Rectangle {
39
38
            anchors.fill: parent
69
68
 
70
69
        Connections {
71
70
            id: stateChangeConnection
 
71
            target: null
72
72
            onStateChanged: {
73
73
                if (picker.activeTransfer.state === ContentTransfer.Charged) {
74
 
                    selectedItems = []
 
74
                    var selectedItems = []
75
75
                    for(var i in picker.activeTransfer.items) {
76
76
                        selectedItems.push(String(picker.activeTransfer.items[i].url).replace("file://", ""))
77
77
                    }
78
 
                    acceptTimer.running = true
79
 
                }
80
 
            }
81
 
        }
82
 
 
83
 
        // FIXME: Work around for browser becoming insensitive to touch events
84
 
        // if the dialog is dismissed while the application is inactive.
85
 
        // Just listening for changes to Qt.application.active doesn't appear
86
 
        // to be enough to resolve this, so it seems that something else needs
87
 
        // to be happening first. As such there's a potential for a race
88
 
        // condition here, although as yet no problem has been encountered.
89
 
        Timer {
90
 
            id: acceptTimer
91
 
            interval: 100
92
 
            repeat: true
93
 
            onTriggered: {
94
 
                if(Qt.application.active) {
95
 
                    webview.focus = true
96
78
                    model.accept(selectedItems)
97
79
                }
98
80
            }