Commit 299384e9 authored by Bernd Paysan's avatar Bernd Paysan

Start implementing commands in GUI mode

parent 3482f63f
......@@ -357,14 +357,14 @@ previous
: -setip ['] .iperr is setip-xt ;
: sub-me ( -- ) msg( ." sub-me" forth:cr )
o to connection +resend
dht-connection >o o to connection +resend
net2o-code expect-reply
pk@ $, dht-id
pub-addr$ [: sigsize# - 2dup + sigdate datesize# move
gen-host-del $, dht-host- ;] $[]map
end-with
cookie+request
end-code| ;
end-code| o> ;
: addme-owndht ( -- )
pk@ >d#id >o dht-host $[]off
......
......@@ -977,6 +977,7 @@ wmsg-o >o msg-table @ token-table ! o>
#128 Value gui-msgs# \ display last 128 messages
0 Value chat-edit \ chat edit field
0 Value chat-edit-bg \ chat edit background
: (gui-msgs) ( gaddr u -- )
reset-time
......@@ -1007,8 +1008,16 @@ wmsg-o >o msg-table @ token-table ! o>
[IFDEF] android also android [THEN]
: ?chat-otr-status ( o:edit-w -- )
msg-group-o .msg:?otr
IF otr-col# [ greenish x-color ] Fliteral
ELSE chat-col# [ blackish x-color ] Fliteral THEN
chat-edit >o to w-color o>
chat-edit-bg >o to w-color o> ;
: chat-edit-enter ( o:edit-w -- )
text$ dup IF do-chat-cmd? 0= IF avalanche-text THEN
text$ dup IF do-chat-cmd? 0= IF avalanche-text
ELSE ?chat-otr-status THEN
ELSE 2drop THEN
64#-1 line-date 64! $lastline $free ;
......@@ -1042,6 +1051,7 @@ wmsg-o >o msg-table @ token-table ! o>
}}v box[]
{{
{{ glue*lll edit-bg x-color font-size# 40% f* }}frame dup .button3
dup to chat-edit-bg
{{ \normal \regular blackish "" }}edit 40%b dup to chat-edit glue*l }}glue
glue*lll }}glue
}}h box[]
......
......@@ -120,8 +120,7 @@ Variable announced
Forward insert-addr ( o -- )
: renat ( -- )
msg-group# [:
cell+ $@ drop cell+ .msg:peers[] bounds ?DO
[: msg:peers[] $@ bounds ?DO
I @ >o o-beacon pings
\ !!FIXME!! should maybe do a re-lookup?
ret-addr $10 erase dest-0key dest-0key> !
......@@ -133,7 +132,7 @@ Forward insert-addr ( o -- )
THEN
cell +LOOP o>
cell +LOOP
;] #map ;
;] group#map ;
\ notification for address changes
......@@ -158,7 +157,7 @@ Forward insert-addr ( o -- )
beacon( ." done renat" cr ) ;
scope{ /chat
: /renat ( addr u -- ) renat-all /nat ;
:noname ( addr u -- ) renat-all /nat ; is /renat
}scope
\ beacon handling
......
This diff is collapsed.
......@@ -795,10 +795,8 @@ n2o-history
\ allow issuing commands during chat
scope{ /chat
: /n2o [: word-args ['] evaluate do-net2o-cmds ;] catch
?dup-IF <err> ." error: " error$ type cr <default> THEN ;
:noname [: word-args ['] evaluate do-net2o-cmds ;] catch
?dup-IF <err> ." error: " error$ type cr <default> THEN ; is /n2o
}scope
: start-n2o ( -- )
......
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