<commit_before>/****************************************************************************
**
** Copyright (C) 2013 Jolla Ltd.
** Contact: <NAME> <<EMAIL>>
**
****************************************************************************/


import QtQuick 2.0
import Sailfish.Silica 1.0

RemorsePopup {
    id: popup

    property int _currentDownloadId

    onCanceled: {
      /*  MozContext.sendObserve("embedui:download",
                               {
                                   "msg": "cancelDownload",
                                   "id": _currentDownloadId
                               }) */
    }
/*
    Connections {
        target: MozContext

        onRecvObserve: {
            if (message === "embed:download") {
                switch (data.msg) {
                    case "dl-start": {
                        popup._currentDownloadId = data.id
                        //% "Downloading %1"
                        popup.execute(qsTrId("sailfish_browser-no-downloading").arg(data.displayName))
                        break
                    }
                    case "dl-fail":
                    case "dl-done": {
                        if (popup.visible && popup._currentDownloadId === data.id) {
                            popup.visible = false
                        }
                        break
                    }
                }
            }
        }
    }*/
}
<commit_msg>[browser] Enable DownloadRemorsePopup. Fixes JB#8105<commit_after>/****************************************************************************
**
** Copyright (C) 2013 Jolla Ltd.
** Contact: <NAME> <<EMAIL>>
**
****************************************************************************/


import QtQuick 2.0
import Sailfish.Silica 1.0

RemorsePopup {
    id: popup

    property int _currentDownloadId

    onCanceled: {
        MozContext.sendObserve("embedui:download",
                               {
                                   "msg": "cancelDownload",
                                   "id": _currentDownloadId
                               })
    }

    Connections {
        target: MozContext

        onRecvObserve: {
            if (message === "embed:download") {
                switch (data.msg) {
                    case "dl-start": {
                        popup._currentDownloadId = data.id
                        //% "Downloading %1"
                        popup.execute(qsTrId("sailfish_browser-no-downloading").arg(data.displayName))
                        break
                    }
                    case "dl-fail":
                    case "dl-done": {
                        if (popup.visible && popup._currentDownloadId === data.id) {
                            popup.visible = false
                        }
                        break
                    }
                }
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.1945983379501385, 'fraction_numerical': 0.007617728531855956, 'mean_word_length': 1.1803773584905661, 'pattern_counts': {'":': 10, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 23, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2226603', 'n_tokens_mistral': 707, 'n_tokens_neox': 629, 'n_words': 114}