texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Wed, 30 Nov 2022 13:36:37 -0500 (EST)

branch: old/qt-info
commit bc37072191eeed058c5fa63582e31fd18213d401
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Apr 10 23:22:04 2019 +0100

    * js/info.js (web_channel_override) <input>: Pass
    store.state.index as an argument.
    (wc_init): Receive 'set_current_url' signal and pass on an
    action to be dispatched.
---
 ChangeLog  |  7 +++++++
 js/info.js | 14 +++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d96f6da914..7f84441244 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-04-09  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * js/info.js (web_channel_override) <input>: Pass 
+       store.state.index as an argument.
+       (wc_init): Receive 'set_current_url' signal and pass on an 
+       action to be dispatched.
+
 2019-04-09  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Reduce ambiguity of "index".
diff --git a/js/info.js b/js/info.js
index 778f7df317..bc2c6d7c7b 100644
--- a/js/info.js
+++ b/js/info.js
@@ -2112,12 +2112,20 @@ wc_init = function ()
         {
           window.core = channel.objects.core;
 
-          // receive signals from Qt/C++ side
-          // should we inject this code?
+          /* Receive signals from Qt/C++ side.  (Should we inject this code?)
+
+             We don't have code to receive "actions" from the C++ side:
+             the action message-passing architecture is only used to 
+             circumvent same-origin policy restrictions on some browsers for 
+             file: URI's. */
 
           channel.objects.core.setUrl.connect(function(url) {
             alert("asked to go to " + url);
           });
+
+          channel.objects.core.set_current_url.connect(function(linkid) {
+            store.dispatch (actions.set_current_url (linkid));
+          });
         });
     };
 
@@ -2152,7 +2160,7 @@ function web_channel_override (store, action)
     case "input":
       {
         if (action.input == "index")
-          window.core.show_text_input (action.input);
+          window.core.show_text_input (action.input, store.state.index);
         return 1;
       }
     default:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]