Commit 592a6fdb authored by Bernd Paysan's avatar Bernd Paysan

Start adapted commands for GUI chats

parent d5a88e72
......@@ -1368,6 +1368,20 @@ Variable gui-log[]
' chat-gui-exec is chat-cmd-file-execute
\ special modified chat commands for GUI
scope{ /chat
chat-cmds uclass chat-cmd-o
end-class gui-chat-cmds
gui-chat-cmds new Constant gui-chat-cmd-o
gui-chat-cmd-o to chat-cmd-o
' drop is ./otr-info
text-chat-cmd-o to chat-cmd-o
}scope
\ top box
box-actor class
......@@ -1476,6 +1490,7 @@ Variable invitation-stack
: net2o-gui ( -- )
[IFDEF] set-net2o-hints set-net2o-hints [THEN]
/chat:gui-chat-cmd-o to chat-cmd-o
n2o-frame to top-widget
"PASSPHRASE" getenv 2dup d0= IF 2drop
ELSE
......@@ -1490,6 +1505,7 @@ Variable invitation-stack
1config !widgets
get-order n>r ['] /chat >body 1 set-order
['] widgets-loop catch
/chat:text-chat-cmd-o to chat-cmd-o
nr> set-order throw ;
' net2o-gui is run-gui
......
......@@ -1392,6 +1392,8 @@ false value away?
uval-o chat-cmd-o
object uclass chat-cmd-o
\ internal stuff
umethod ./otr-info
also net2o-base scope: /chat
umethod /me ( addr u -- )
\U me <action> send string as action
......@@ -1496,12 +1498,15 @@ text-chat-cmd-o to chat-cmd-o
THEN
[: $, msg-action ;] send-avalanche ; is /away
:noname ( flag -- )
<info> ." === " IF ." enter" ELSE ." leave" THEN
." otr mode ===" <default> forth:cr ; is ./otr-info
:noname ( addr u -- )
2dup s" on" str= >r
2dup s" off" str= r@ or IF 2drop
2dup -trailing s" on" str= >r
2dup -trailing s" off" str= r@ or IF 2drop
msg-group-o r@ IF .msg:+otr ELSE .msg:-otr THEN
<info> ." === " r> IF ." enter" ELSE ." leave" THEN
." otr mode ===" <default> forth:cr
r> ./otr-info
ELSE rdrop
msg-group-o .msg:mode @ >r
msg-group-o .msg:+otr avalanche-text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment