diff --git a/assets/core/negative_heart_24px.svg b/assets/core/negative_heart_24px.svg new file mode 100644 index 00000000..05f00c83 --- /dev/null +++ b/assets/core/negative_heart_24px.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/go.mod b/go.mod index c53c6bc6..cd49716d 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,12 @@ module cwtch.im/ui go 1.12 require ( - cwtch.im/cwtch v0.3.15 - git.openprivacy.ca/openprivacy/connectivity v1.1.4 + cwtch.im/cwtch v0.3.16 + git.openprivacy.ca/openprivacy/connectivity v1.2.0 git.openprivacy.ca/openprivacy/log v1.0.1 github.com/gopherjs/gopherjs v0.0.0-20200209183636-89e6cbcd0b6d // indirect github.com/therecipe/qt v0.0.0-20200126204426-5074eb6d8c41 github.com/therecipe/qt/internal/binding/files/docs/5.12.0 v0.0.0-20200126204426-5074eb6d8c41 // indirect github.com/therecipe/qt/internal/binding/files/docs/5.13.0 v0.0.0-20200126204426-5074eb6d8c41 // indirect golang.org/x/crypto v0.0.0-20200420104511-884d27f42877 // indirect -) - +) \ No newline at end of file diff --git a/go.sum b/go.sum index e6e5746f..12bdad00 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,8 @@ git.openprivacy.ca/openprivacy/connectivity v1.1.3 h1:iRGHS8RB4SZ9cjYK/yXt4R8PqQ git.openprivacy.ca/openprivacy/connectivity v1.1.3/go.mod h1:4P8mirZZslKbo2zBrXXVjgEdqGwHo/6qoFBwFQW6d6E= git.openprivacy.ca/openprivacy/connectivity v1.1.4 h1:/I9epvNNjM8rR/q5y9Y63D9/aPXpBFvngwNGLD8mvUk= git.openprivacy.ca/openprivacy/connectivity v1.1.4/go.mod h1:4P8mirZZslKbo2zBrXXVjgEdqGwHo/6qoFBwFQW6d6E= +git.openprivacy.ca/openprivacy/connectivity v1.2.0 h1:dbZ5CRl11vg3BNHdzRKSlDP8OUtDB+mf6FkxMVf73qw= +git.openprivacy.ca/openprivacy/connectivity v1.2.0/go.mod h1:B7vzuVmChJtSKoh0ezph5vu6DQ0gIk0zHUNG6IgXCcA= git.openprivacy.ca/openprivacy/libricochet-go v1.0.11 h1:C7QFFzG0p5XKu0zcOIdLGwEpA9uU0BceBM7CfVK5D40= git.openprivacy.ca/openprivacy/libricochet-go v1.0.11/go.mod h1:yTMps/ZpYS+BNBBvANsNAft28FXrBvFHQauMYNWPrwE= git.openprivacy.ca/openprivacy/libricochet-go v1.0.13 h1:Z86uL9K47onznY1wP1P/wWfWMbbyvk6xnCp94R180os= @@ -32,6 +34,7 @@ git.openprivacy.ca/openprivacy/log v1.0.1/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQN github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= github.com/c-bata/go-prompt v0.2.3/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cretz/bine v0.1.1-0.20200124154328-f9f678b84cca h1:Q2r7AxHdJwWfLtBZwvW621M3sPqxPc6ITv2j1FGsYpw= github.com/cretz/bine v0.1.1-0.20200124154328-f9f678b84cca/go.mod h1:6PF6fWAvYtwjRGkAuDEJeWNOv3a2hUouSP/yRYXmvHw= @@ -49,6 +52,7 @@ github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4Lr github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200209183636-89e6cbcd0b6d h1:vr95xIx8Eg3vCzZPxY3rCwTfkjqNDt/FgVqTOk0WByk= github.com/gopherjs/gopherjs v0.0.0-20200209183636-89e6cbcd0b6d/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= @@ -63,6 +67,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -159,6 +164,7 @@ golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200420001825-978e26b7c37c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625195345-7480c7b4547d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go/ui/gcd.go b/go/ui/gcd.go index f70ae3e0..e6b4b229 100644 --- a/go/ui/gcd.go +++ b/go/ui/gcd.go @@ -79,7 +79,7 @@ type GrandCentralDispatcher struct { _ func(str string) `signal:"InvokePopup"` _ func(locale string, zoom float32, theme string) `signal:"SupplySettings"` _ func(groupID, name, server, invitation string, accepted bool, addrbooknames, addrbookaddrs []string) `signal:"SupplyGroupSettings"` - _ func(onion, nick string, authorization string) `signal:"SupplyPeerSettings"` + _ func(onion, nick string, authorization string, storage string) `signal:"SupplyPeerSettings"` // signals emitted from the ui (written in go, below) // ui @@ -113,6 +113,8 @@ type GrandCentralDispatcher struct { _ func(onion string) `signal:"deleteContact,auto"` _ func() `signal:"allowUnknownPeers,auto"` _ func() `signal:"blockUnknownPeers,auto"` + _ func(onion string) `signal:"storeHistoryForPeer,auto"` + _ func(onion string) `signal:"deleteHistoryForPeer,auto"` _ func() `constructor:"init"` } @@ -339,7 +341,7 @@ func (this *GrandCentralDispatcher) requestPeerSettings() { contact := the.Peer.GetContact(this.SelectedConversation()) if contact == nil { log.Errorf("error: requested settings for unknown contact %v?", this.SelectedConversation()) - this.SupplyPeerSettings(this.SelectedConversation(), this.SelectedConversation(), string(contact.Authorization)) + this.SupplyPeerSettings(this.SelectedConversation(), this.SelectedConversation(), string(contact.Authorization), "") return } @@ -348,7 +350,13 @@ func (this *GrandCentralDispatcher) requestPeerSettings() { // Todo: Move to profile settings //blockunkownpeers, _ := the.Peer.GetAttribute(attr.GetPeerScope(constants.BlockUnknownPeersSetting)) - this.SupplyPeerSettings(contact.Onion, name, string(contact.Authorization)) + // Whether Cwtch should save the history of the peer + saveHistory,exists := contact.GetAttribute(event.SaveHistoryKey) + if !exists { + saveHistory = event.DeleteHistoryDefault + } + + this.SupplyPeerSettings(contact.Onion, name, string(contact.Authorization), saveHistory) } func (this *GrandCentralDispatcher) savePeerSettings(onion, nick string) { @@ -356,6 +364,14 @@ func (this *GrandCentralDispatcher) savePeerSettings(onion, nick string) { this.UpdateContactDisplayName(onion, nick) } +func (this *GrandCentralDispatcher) storeHistoryForPeer(onion string) { + the.Peer.SetContactAttribute(onion, event.SaveHistoryKey, event.SaveHistoryConfirmed) +} + +func (this *GrandCentralDispatcher) deleteHistoryForPeer(onion string) { + the.Peer.SetContactAttribute(onion, event.SaveHistoryKey, event.DeleteHistoryConfirmed) +} + func (this *GrandCentralDispatcher) requestGroupSettings(groupID string) { group := the.Peer.GetGroup(groupID) diff --git a/i18n/translation_de.qm b/i18n/translation_de.qm index c442202f..c40eed58 100644 Binary files a/i18n/translation_de.qm and b/i18n/translation_de.qm differ diff --git a/i18n/translation_de.ts b/i18n/translation_de.ts index 5e0ea234..42e5eb7e 100644 --- a/i18n/translation_de.ts +++ b/i18n/translation_de.ts @@ -114,22 +114,35 @@ ListOverlay - add-list-item Add a New List Item - Liste hinzufügen + Liste hinzufügen - add-new-item Add a new item to the list - Neues Listenelement hinzüfgen + Neues Listenelement hinzüfgen - todo-placeholder Todo... placeholder text - noch zu erledigen + noch zu erledigen + + + + search-list + ex: "... paste an address here to add a contact ..." + + + + + peer-not-online + + + + + add-list-item-btn + @@ -232,38 +245,60 @@ PeerSettingsPane - + address-label Adresse - + copy-btn Kopieren - + copied-to-clipboard-notification notification: copied to clipboard in die Zwischenablage kopiert - + display-name-label Angezeigter Name - + save-btn speichern - + + + save-peer-history + Save Peer History + + + + + save-peer-history-description + + + + + dont-save-peer-history-default + + + + + dont-save-peer-history + + + + delete-btn löschen - + block-btn diff --git a/i18n/translation_en.qm b/i18n/translation_en.qm index 295db41b..8d749503 100644 Binary files a/i18n/translation_en.qm and b/i18n/translation_en.qm differ diff --git a/i18n/translation_en.ts b/i18n/translation_en.ts index d075bdc8..0f29ecc2 100644 --- a/i18n/translation_en.ts +++ b/i18n/translation_en.ts @@ -209,22 +209,20 @@ Right-click to reset. ListOverlay - - add-list-item - Add a New List Item - Add a New List Item + + search-list + ex: "... paste an address here to add a contact ..." + Search List - - add-new-item - Add a new item to the list - Add a new item to the list + + peer-not-online + Peer is Offline. Applications cannot be used right now. - - todo-placeholder - Todo... placeholder text - Todo... + + add-list-item-btn + Add Item @@ -327,42 +325,64 @@ Right-click to reset. PeerSettingsPane - + address-label Address - + copy-btn Copy - + copied-to-clipboard-notification notification: copied to clipboard Copied to Clipboard - + display-name-label Display Name - + save-btn Save - + block-btn Block Peer + + + + save-peer-history + Save Peer History + Save Peer History + + + + save-peer-history-description + Determines whether or not to delete any history associated with the peer. + + + + dont-save-peer-history-default + + + + + dont-save-peer-history + Delete Peer History + unblock-btn Unblock Peer - + delete-btn Delete diff --git a/i18n/translation_fr.qm b/i18n/translation_fr.qm index 3026fc59..3b814608 100644 Binary files a/i18n/translation_fr.qm and b/i18n/translation_fr.qm differ diff --git a/i18n/translation_fr.ts b/i18n/translation_fr.ts index f80bbf5b..7b4b9716 100644 --- a/i18n/translation_fr.ts +++ b/i18n/translation_fr.ts @@ -114,22 +114,35 @@ ListOverlay - add-list-item Add a New List Item - Ajouter un nouvel élément + Ajouter un nouvel élément - add-new-item Add a new item to the list - Ajouter un nouvel élément à la liste + Ajouter un nouvel élément à la liste - todo-placeholder Todo... placeholder text - A faire... + A faire... + + + + search-list + ex: "... paste an address here to add a contact ..." + + + + + peer-not-online + + + + + add-list-item-btn + @@ -232,38 +245,60 @@ PeerSettingsPane - + address-label Adresse - + copy-btn Copier - + copied-to-clipboard-notification notification: copied to clipboard Copié dans le presse-papier - + display-name-label Pseudo - + save-btn Sauvegarder - + + + save-peer-history + Save Peer History + + + + + save-peer-history-description + + + + + dont-save-peer-history-default + + + + + dont-save-peer-history + + + + delete-btn Effacer - + block-btn diff --git a/i18n/translation_pt.qm b/i18n/translation_pt.qm index 39f9c4bd..b6c2805f 100644 Binary files a/i18n/translation_pt.qm and b/i18n/translation_pt.qm differ diff --git a/i18n/translation_pt.ts b/i18n/translation_pt.ts index 0f7938bc..7f3910f1 100644 --- a/i18n/translation_pt.ts +++ b/i18n/translation_pt.ts @@ -114,22 +114,35 @@ ListOverlay - add-list-item Add a New List Item - Adicionar Item à Lista + Adicionar Item à Lista - add-new-item Add a new item to the list - Adicionar novo item à lista + Adicionar novo item à lista - todo-placeholder Todo... placeholder text - Afazer… + Afazer… + + + + search-list + ex: "... paste an address here to add a contact ..." + + + + + peer-not-online + + + + + add-list-item-btn + @@ -232,38 +245,60 @@ PeerSettingsPane - + address-label Endereço - + copy-btn Copiar - + copied-to-clipboard-notification notification: copied to clipboard Copiado - + display-name-label Nome de Exibição - + save-btn Salvar - + + + save-peer-history + Save Peer History + + + + + save-peer-history-description + + + + + dont-save-peer-history-default + + + + + dont-save-peer-history + + + + delete-btn Deletar - + block-btn diff --git a/qml/overlays/ListOverlay.qml b/qml/overlays/ListOverlay.qml index 0ed706ce..444f9696 100644 --- a/qml/overlays/ListOverlay.qml +++ b/qml/overlays/ListOverlay.qml @@ -10,38 +10,65 @@ import "../opaque/controls" as Awesome import "../opaque/fonts/Twemoji.js" as T import "../utils.js" as Utils import "../opaque/styles" +import "../opaque/theme" ColumnLayout { Layout.fillWidth: true width:parent.width + id: listpanel + property bool online: false Text { Layout.fillWidth: true } - TextField { + Opaque.IconTextField { id: filter - - placeholderText: "Search.." - - style: CwtchTextFieldStyle{} - + visible:listpanel.online anchors.left: parent.left anchors.right: parent.right - anchors.margins: 10 + //: ex: "... paste an address here to add a contact ..." + placeholderText: qsTr("search-list") + horizontalAlignment: TextInput.AlignHCenter + icon: gcd.assetPath + "core/search-24px.svg" + + onTextChanged: { - bulletinView.filter = text - if (bulletinView.model.get(bulletinView.currentIndex).title.indexOf(text) == -1) { - bulletinView.currentIndex = -1 + listView.filter = text + if (listView.model.get(listView.currentIndex).title.indexOf(text) == -1) { + listView.currentIndex = -1 } } } + + + Opaque.Icon { + visible:!listpanel.online + source: gcd.assetPath + "core/negative_heart_24px.svg" + iconColor: Theme.mainTextColor + backgroundColor: Theme.backgroundPaneColor + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + height: 150 + width: 150 + } + Opaque.EllipsisLabel { + visible:!listpanel.online + color: Theme.mainTextColor + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + size: 18 * gcd.themeScale + text: qsTr("peer-not-online") + } + + + + Flickable { // THE MESSAGE LIST ITSELF id: sv clip: true + visible:listpanel.online Layout.alignment: Qt.AlignLeft | Qt.AlignTop Layout.fillHeight: true Layout.fillWidth: true @@ -87,25 +114,22 @@ ColumnLayout { }) } - /*if(msg.c != undefined) { - jsonModel4.get(msg.c).complete = true + if(msg.c != undefined) { + jsonModel4.get(msg.c).complete = true } - - if (sv.contentY + sv.height >= sv.contentHeight - colMessages.height && sv.contentHeight > sv.height) { - sv.contentY = sv.contentHeight - sv.height - }*/ } onUpdateContactStatus: function(_handle, _status, _loading) { if (gcd.selectedConversation == _handle) { - if (_loading == true) { - newposttitle.enabled = false - btnSend.enabled = false - } else { - newposttitle.enabled = true - btnSend.enabled = true - } + // Group is Synced OR p2p is Authenticated + if ( (_handle.length == 32 && _status == 4) || (_handle.length == 56 && _status == 3) ) { + newlistitem.readOnly = false + listpanel.online = true + } else { + newlistitem.readOnly = true + listpanel.online= false + } } } } @@ -115,7 +139,7 @@ ColumnLayout { } ListView { - id: bulletinView + id: listView anchors.left: parent.left anchors.leftMargin: 10 anchors.topMargin: 10 @@ -130,8 +154,8 @@ ColumnLayout { Item { width: parent.width - height: title.indexOf(bulletinView.filter) >= 0 ? texttitle.height : 0 - visible: title.indexOf(bulletinView.filter) >= 0 + height: title.indexOf(listView.filter) >= 0 ? texttitle.height : 0 + visible: title.indexOf(listView.filter) >= 0 Column { width: parent.width @@ -141,31 +165,24 @@ ColumnLayout { checked: complete onClicked: { var msg = JSON.stringify({"o":4, "c":index}) - gcd.sendMessage(msg, btnSend.nextMessageID++) + gcd.sendMessage(msg, newlistitem.nextMessageID++) } } RowLayout { Text { id: texttitle - text: '' + Utils.htmlEscaped(title) + ' by ' + from + "
" + timestamp + text: '' + Utils.htmlEscaped(title) + ' by ' + displayName + "
" + timestamp leftPadding: 10 topPadding: 5 bottomPadding:5 - color: windowItem.cwtch_dark_color + color: Theme.mainTextColor } } } - Rectangle { - height: 1 - color: windowItem.cwtch_color - anchors { - left: parent.left - right: parent.right - } - } + Opaque.HLine{} } @@ -179,55 +196,28 @@ ColumnLayout { } } - GroupBox { - //: Add a New List Item - title: qsTr("add-list-item") - Layout.fillWidth: true + Opaque.ButtonTextField { + id: newlistitem + visible:listpanel.online + readOnly: false + button_text: qsTr("add-list-item-btn") + dropShadowColor: Theme.dropShadowPaneColor + property int nextMessageID: 1 + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 10 - RowLayout { - Layout.fillWidth: true - width: parent.width - ColumnLayout { - Layout.fillWidth: true - - - Text { - //: Add a new item to the list - text: qsTr("add-new-item") - } - - TextField { - id: newposttitle - //: Todo... placeholder text - placeholderText: qsTr("todo-placeholder") - Layout.fillWidth: true - style: CwtchTextFieldStyle{} - } - - Opaque.Button { // SEND MESSAGE BUTTON - id: btnSend - icon: "regular/paper-plane" - text: "add" - anchors.right: parent.right - anchors.rightMargin: 2 - - property int nextMessageID: 1 - - onClicked: { - if (newposttitle.text != "") { - var msg = JSON.stringify({"o":4, "t":newposttitle.text}) - gcd.sendMessage(msg, nextMessageID++) - } - newposttitle.text = "" - } + onClicked: { + if (newlistitem.text != "") { + var msg = JSON.stringify({"o":4, "t":newlistitem.text}) + gcd.sendMessage(msg, nextMessageID++) } + newlistitem.text = "" } - } } - - + Opaque.HLine{} diff --git a/qml/panes/PeerSettingsPane.qml b/qml/panes/PeerSettingsPane.qml index dffded18..9bd3e755 100644 --- a/qml/panes/PeerSettingsPane.qml +++ b/qml/panes/PeerSettingsPane.qml @@ -17,6 +17,7 @@ Opaque.SettingsList { // settingsPane anchors.fill: parent property string authorization + property string saveHistory settings: Column { anchors.fill: parent @@ -84,6 +85,34 @@ Opaque.SettingsList { // settingsPane } } + Opaque.Setting { + //: Save Peer History + label: qsTr("save-peer-history") + description: qsTr("save-peer-history-description") + field: Opaque.ComboBox { + id: cbSaveHistory + anchors.right: parent.right + anchors.left: parent.left + + model: ListModel { + id: cbSaveHistoryItems + ListElement { text: qsTr("dont-save-peer-history"); value: "DeleteHistoryConfirmed" } + ListElement { text: qsTr("save-peer-history"); value: "SaveHistory" } + } + + onActivated: { + var item = cbSaveHistoryItems.get(cbSaveHistory.currentIndex) + if (item["value"] == "SaveHistory") { + gcd.storeHistoryForPeer(txtOnion.text) + } else { + gcd.deleteHistoryForPeer(txtOnion.text) + } + } + + } + } + + Column { width:parent.width * 0.95 anchors.horizontalCenter: parent.horizontalCenter @@ -106,10 +135,21 @@ Opaque.SettingsList { // settingsPane Connections { target: gcd - onSupplyPeerSettings: function(onion, nick, authorization) { + onSupplyPeerSettings: function(onion, nick, authorization, saveHistory) { txtOnion.text = onion txtDisplayName.text = nick root.authorization = authorization + root.saveHistory = saveHistory + + // This will not set the value in the default case where saveHistory = DefaultDeleteHistory and thus + // the combobox will default to showing DeleteHistoryConfirmed + for (var i=0; i < cbSaveHistoryItems.count; i++) { + var item = cbSaveHistoryItems.get(i) + if (item["value"] == root.saveHistory || (root.saveHistory == "DefaultDeleteHistory" && item["value"] == "DeleteHistoryConfirmed")) { + cbSaveHistory.currentIndex = i + break + } + } } }