forked from Silverfish/proton-bridge
Import/Export final touches
This commit is contained in:
@ -458,7 +458,7 @@ Dialog {
|
||||
if (progressbarImport.isFinished) return qsTr("Import finished","todo")
|
||||
if (
|
||||
go.progressDescription == gui.enums.progressInit ||
|
||||
(go.progress == 0 && go.description=="")
|
||||
(go.progress == 0 && go.progressDescription=="")
|
||||
) return qsTr("Estimating the total number of messages","todo")
|
||||
if (
|
||||
go.progressDescription == gui.enums.progressLooping
|
||||
|
||||
@ -43,6 +43,8 @@ Rectangle {
|
||||
property string lastTargetFolder: "6" // Archive
|
||||
property string lastTargetLabels: "" // no flag by default
|
||||
|
||||
property string sourceID : mboxID
|
||||
property string sourceName : name
|
||||
|
||||
Rectangle {
|
||||
id: line
|
||||
@ -71,7 +73,7 @@ Rectangle {
|
||||
|
||||
Text {
|
||||
id: folderIcon
|
||||
text : gui.folderIcon(name, gui.enums.folderTypeFolder)
|
||||
text : gui.folderIcon(root.sourceName, gui.enums.folderTypeFolder)
|
||||
anchors.verticalCenter : parent.verticalCenter
|
||||
color: root.isSourceSelected ? Style.main.text : Style.main.textDisabled
|
||||
font {
|
||||
@ -81,7 +83,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
Text {
|
||||
text : name
|
||||
text : root.sourceName
|
||||
width: nameWidth
|
||||
elide: Text.ElideRight
|
||||
anchors.verticalCenter : parent.verticalCenter
|
||||
@ -102,8 +104,8 @@ Rectangle {
|
||||
|
||||
SelectFolderMenu {
|
||||
id: selectFolder
|
||||
sourceID: mboxID
|
||||
targets: transferRules.targetFolders(mboxID)
|
||||
sourceID: root.sourceID
|
||||
targets: transferRules.targetFolders(root.sourceID)
|
||||
width: nameWidth
|
||||
anchors.verticalCenter : parent.verticalCenter
|
||||
enabled: root.isSourceSelected
|
||||
@ -112,8 +114,8 @@ Rectangle {
|
||||
}
|
||||
|
||||
SelectLabelsMenu {
|
||||
sourceID: mboxID
|
||||
targets: transferRules.targetLabels(mboxID)
|
||||
sourceID: root.sourceID
|
||||
targets: transferRules.targetLabels(root.sourceID)
|
||||
width: nameWidth
|
||||
anchors.verticalCenter : parent.verticalCenter
|
||||
enabled: root.isSourceSelected
|
||||
@ -130,7 +132,7 @@ Rectangle {
|
||||
|
||||
DateRangeMenu {
|
||||
id: dateRangeMenu
|
||||
sourceID: mboxID
|
||||
sourceID: root.sourceID
|
||||
sourceFromDate: fromDate
|
||||
sourceToDate: toDate
|
||||
|
||||
@ -143,10 +145,10 @@ Rectangle {
|
||||
|
||||
|
||||
function importToFolder(newTargetID) {
|
||||
transferRules.addTargetID(mboxID,newTargetID)
|
||||
transferRules.addTargetID(root.sourceID,newTargetID)
|
||||
}
|
||||
|
||||
function toggleImport() {
|
||||
transferRules.setIsRuleActive(mboxID, !root.isSourceSelected)
|
||||
transferRules.setIsRuleActive(root.sourceID, !root.isSourceSelected)
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ Rectangle {
|
||||
left: parent.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
leftMargin: {
|
||||
if (listview.currentIndex<0) return 0
|
||||
if (listview.currentItem === null) return 0
|
||||
else return listview.currentItem.leftMargin1
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ Window {
|
||||
rightMargin: innerWindowBorder
|
||||
}
|
||||
model: [
|
||||
{ "title" : qsTr("Import/Export" , "title of tab that shows account list" ), "iconText": Style.fa.home },
|
||||
{ "title" : qsTr("Import-Export" , "title of tab that shows account list" ), "iconText": Style.fa.home },
|
||||
{ "title" : qsTr("Settings" , "title of tab that allows user to change settings" ), "iconText": Style.fa.cogs },
|
||||
{ "title" : qsTr("Help" , "title of tab that shows the help menu" ), "iconText": Style.fa.life_ring }
|
||||
]
|
||||
@ -381,8 +381,9 @@ Window {
|
||||
|
||||
onClickedNo: popupMessage.hide()
|
||||
onClickedOkay: popupMessage.hide()
|
||||
onClickedCancel: popupMessage.hide()
|
||||
onClickedYes: {
|
||||
if (popupMessage.message == gui.areYouSureYouWantToQuit) Qt.quit()
|
||||
if (popupMessage.text == gui.areYouSureYouWantToQuit) Qt.quit()
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,8 +462,9 @@ Window {
|
||||
(dialogExport.visible && dialogExport.currentIndex == 2 && go.progress!=1)
|
||||
) {
|
||||
popupMessage.buttonOkay .visible = false
|
||||
popupMessage.buttonNo .visible = true
|
||||
popupMessage.buttonYes .visible = true
|
||||
popupMessage.buttonYes .visible = false
|
||||
popupMessage.buttonQuit .visible = true
|
||||
popupMessage.buttonCancel .visible = true
|
||||
popupMessage.show ( gui.areYouSureYouWantToQuit )
|
||||
return
|
||||
}
|
||||
|
||||
@ -58,7 +58,6 @@ ComboBox {
|
||||
}
|
||||
|
||||
displayText: {
|
||||
console.log("Target Menu current", view.currentItem, view.currentIndex)
|
||||
if (view.currentIndex >= 0) {
|
||||
if (!root.isFolderType) return Style.fa.tags + " " + qsTr("Add/Remove labels")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user