add ability to do not translate strings

This commit is contained in:
arcan1s
2015-08-23 02:14:55 +03:00
parent 713aa611d9
commit b50c1d2363
16 changed files with 164 additions and 72 deletions

View File

@ -45,6 +45,8 @@ Item {
property string cfg_tempUnits: tempUnits.currentText
property alias cfg_acOnline: acOnline.text
property alias cfg_acOffline: acOffline.text
property alias cfg_checkUpdates: updates.checked
property alias cfg_translateStrings: translate.checked
Column {
@ -255,6 +257,34 @@ Item {
}
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.heigth
width: parent.width * 2 / 5
}
QtControls.CheckBox {
id: updates
width: parent.width * 3 / 5
text: i18n("Check updates on startup")
}
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.heigth
width: parent.width * 2 / 5
}
QtControls.CheckBox {
id: translate
width: parent.width * 3 / 5
text: i18n("Translate strings")
}
}
Row {
height: implicitHeight
width: parent.width

View File

@ -178,6 +178,8 @@ Item {
awKeys.dropSourceFromDataengine.connect(dropSource)
awKeys.needTextToBeUpdated.connect(needTextUpdate)
awKeys.needToolTipToBeUpdated.connect(needToolTipUpdate)
// check updates if required
if (plasmoid.configuration.checkUpdates) return action_checkUpdates()
}
onDropSource: {
@ -227,6 +229,7 @@ Item {
awKeys.initKeys(plasmoid.configuration.text)
awKeys.initTooltip(tooltipSettings)
awKeys.setPopupEnabled(plasmoid.configuration.notify)
awKeys.setTranslateStrings(plasmoid.configuration.translateStrings)
awKeys.setWrapNewLines(plasmoid.configuration.wrapNewLines)
needTextUpdate(plasmoid.configuration.text)
@ -235,24 +238,24 @@ Item {
function action_checkUpdates() {
if (debug) console.log("[main::action_checkUpdates]")
awActions.checkUpdates()
return awActions.checkUpdates()
}
function action_showReadme() {
if (debug) console.log("[main::action_showReadme]")
awActions.showReadme()
return awActions.showReadme()
}
function action_report() {
if (debug) console.log("[main::action_report]")
awActions.sendEmail()
return awActions.sendEmail()
}
function action_requestKey() {
if (debug) console.log("[main::action_requestKey]")
awKeys.graphicalValueByKey()
return awKeys.graphicalValueByKey()
}
}