Paste from clipboard on "Add new URL"
This commit is contained in:
parent
2f63de31b0
commit
d1e7b2f2c9
3 changed files with 12 additions and 0 deletions
|
@ -29,6 +29,10 @@ Item {
|
||||||
property string placeholderText: ''
|
property string placeholderText: ''
|
||||||
signal accepted
|
signal accepted
|
||||||
|
|
||||||
|
function paste() {
|
||||||
|
textInput.paste();
|
||||||
|
}
|
||||||
|
|
||||||
height: 50 * pgst.scalef
|
height: 50 * pgst.scalef
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
|
|
|
@ -58,6 +58,7 @@ SlidePage {
|
||||||
pgst.loadPage('TextInputDialog.qml', {
|
pgst.loadPage('TextInputDialog.qml', {
|
||||||
buttonText: 'Subscribe',
|
buttonText: 'Subscribe',
|
||||||
placeholderText: 'Feed URL',
|
placeholderText: 'Feed URL',
|
||||||
|
pasteOnLoad: true,
|
||||||
callback: function (url) {
|
callback: function (url) {
|
||||||
ctx.py.call('main.subscribe', [url]);
|
ctx.py.call('main.subscribe', [url]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,17 @@ Dialog {
|
||||||
property string buttonText
|
property string buttonText
|
||||||
property string placeholderText
|
property string placeholderText
|
||||||
property string text
|
property string text
|
||||||
|
property bool pasteOnLoad: false
|
||||||
property var callback
|
property var callback
|
||||||
|
|
||||||
contentHeight: contentColumn.height
|
contentHeight: contentColumn.height
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (pasteOnLoad) {
|
||||||
|
input.paste();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function accept() {
|
function accept() {
|
||||||
textInputDialog.callback(input.text);
|
textInputDialog.callback(input.text);
|
||||||
textInputDialog.closePage();
|
textInputDialog.closePage();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue