added opening in speaker:

This commit is contained in:
Jeena 2015-04-12 01:02:20 +02:00
parent 1523a2ea2a
commit edc8eac2e7

View file

@ -78,6 +78,11 @@ ApplicationWindow {
textFontSize = fontSizes[textFontSizeIndex]
}
function removeHTML(str) {
forEscapingHTML.text = str
return forEscapingHTML.getText(0, forEscapingHTML.length)
}
function keyPressed(event) {
switch (event.key) {
case Qt.Key_Right:
@ -113,6 +118,10 @@ ApplicationWindow {
case Qt.Key_Return:
Qt.openUrlExternally(content.post.link)
break
case Qt.Key_S: {
console.log(Qt.openUrlExternally("speaker:"+ removeHTML(content.post.content)))
break
}
default:
break
}
@ -176,6 +185,12 @@ ApplicationWindow {
id: server
}
TextArea {
id: forEscapingHTML
visible: false
textFormat: TextEdit.RichText
}
Component.onCompleted: {
if(serverLogin.loggedIn()) {
loggedIn();