cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [3/3] git commit: ubuntu: pass proper arguments to prompt callback
Date Tue, 05 Aug 2014 22:30:31 GMT
ubuntu: pass proper arguments to prompt callback


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/0bb58f87
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/0bb58f87
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/0bb58f87

Branch: refs/heads/master
Commit: 0bb58f8731d92b8f45ebc9c5d6a223396bfb96aa
Parents: 3f8c964
Author: Maxim Ermilov <maxim.ermilov@canonical.com>
Authored: Sat Jun 28 02:33:38 2014 +0400
Committer: Maxim Ermilov <maxim.ermilov@canonical.com>
Committed: Tue Aug 5 05:45:09 2014 +0400

----------------------------------------------------------------------
 src/ubuntu/notification.h   | 4 ++--
 src/ubuntu/notification.qml | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/0bb58f87/src/ubuntu/notification.h
----------------------------------------------------------------------
diff --git a/src/ubuntu/notification.h b/src/ubuntu/notification.h
index 9430554..5343073 100644
--- a/src/ubuntu/notification.h
+++ b/src/ubuntu/notification.h
@@ -44,8 +44,8 @@ public slots:
     void confirm(int scId, int ecId, const QString &message, const QString &title,
const QStringList &buttonLabels);
     void prompt(int scId, int ecId, const QString &message, const QString &title,
const QStringList &buttonLabels, const QString &defaultText);
 
-    void notificationDialogButtonPressed(int buttonId, const QString &text) {
-        if (text.size()) {
+    void notificationDialogButtonPressed(int buttonId, const QString &text, bool prompt)
{
+        if (prompt) {
             QVariantMap res;
             res.insert("buttonIndex", buttonId);
             res.insert("input1", text);

http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/0bb58f87/src/ubuntu/notification.qml
----------------------------------------------------------------------
diff --git a/src/ubuntu/notification.qml b/src/ubuntu/notification.qml
index 41c08e9..5fdc7d3 100644
--- a/src/ubuntu/notification.qml
+++ b/src/ubuntu/notification.qml
@@ -41,7 +41,7 @@ Dialog {
         text: button1Text
         color: "orange"
         onClicked: {
-            root.exec("Notification", "notificationDialogButtonPressed", [1, prompt.text]);
+            root.exec("Notification", "notificationDialogButtonPressed", [1, prompt.text,
promptVisible]);
             PopupUtils.close(dialogue)
         }
     }
@@ -50,7 +50,7 @@ Dialog {
         visible: button2Text.length > 0
         color: "orange"
         onClicked: {
-            root.exec("Notification", "notificationDialogButtonPressed", [2, prompt.text]);
+            root.exec("Notification", "notificationDialogButtonPressed", [2, prompt.text,
promptVisible]);
             PopupUtils.close(dialogue)
         }
     }
@@ -58,7 +58,7 @@ Dialog {
         text: button3Text
         visible: button3Text.length > 0
         onClicked: {
-            root.exec("Notification", "notificationDialogButtonPressed", [3, prompt.text]);
+            root.exec("Notification", "notificationDialogButtonPressed", [3, prompt.text,
promptVisible]);
             PopupUtils.close(dialogue)
         }
     }


Mime
View raw message