Commit 1ec673d8 authored by Bernd Paysan's avatar Bernd Paysan

Add pen to edit name

parent b8afec75
cat <<EOF
<!-- Our activity is a homebrewn variant of the NativeAcitivity.
This will take care of integrating with our NDK code. -->
<activity android:name="${APP_PACKAGE}.Gforth_n2o"
<activity android:name=".Gforth_n2o"
android:icon="@drawable/net2o_green"
android:label="@string/net2o_app_name"
android:windowAnimationStyle="@android:style/Animation.Activity"
......@@ -20,7 +20,7 @@ cat <<EOF
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="${APP_PACKAGE}.Gforth_n2o_gui"
<activity android:name=".Gforth_n2o_gui"
android:icon="@drawable/net2o"
android:label="@string/net2o_gui_name"
android:windowAnimationStyle="@android:style/Animation.Activity"
......
......@@ -186,8 +186,8 @@ $FFFFFFFF new-color, FValue posting-bg-col#
THEN ;
: nick-filter ( -- ) edit-w >o
0 >r BEGIN text$ r@ safe/string WHILE
c@ bl = IF
addr text$ r@ 1 $del
c@ dup bl = over '@' = or swap '#' = or
IF addr text$ r@ 1 $del
r@ curpos u< +to curpos
ELSE r> 1+ >r THEN REPEAT drop rdrop
o> ;
......@@ -472,6 +472,23 @@ event: :>fetch-avatar { thumb task hash u1 pk u2 -- }
ELSE 2drop THEN
ELSE drop THEN ;
: edit-pen[] ( backframe edit-x update-xt -- xt )
\G create a closure for an edit pen
[{: backframe edit-x xt: upd :}d
data >o edit-x .act IF \ push back to default, grey out
edit-x >o act .dispose 0 to act o>
true upd
imports#rgb-fg sf@ transp#
ELSE \ engage+select all+black text
edit-x o [: true ;] edit[]
['] nick-filter filter[] drop
edit-x engage false upd
imports#rgb-fg sf@ imports#rgb-bg sf@
THEN
backframe >o to frame-color o> to text-color
o>
+resize +sync ;] ;
: show-nick ( o:key -- )
ke-imports @ [ 1 import#provisional lshift ]L and ?EXIT
ke-imports @ >im-color# sfloats { ki }
......@@ -480,21 +497,37 @@ event: :>fetch-avatar { thumb task hash u1 pk u2 -- }
{{ \large imports#rgb-fg ki + sf@ to x-color
ke-avatar $@ dup IF show-avatar ?+avatars
ELSE 2drop user-avatar avatar-thumb THEN
ke-sk sec@ nip IF \bold ELSE \regular THEN \sans
['] .nick-base $tmp }}text 25%b
\sans ke-sk sec@ nip IF
\bold
{{
glue*l }}glue
{{
glue*l transp# font-size# 40% f* }}frame dup .button3 dup { backframe }
{{
['] .nick-base $tmp }}edit 25%b dup { edit-w }
dup { edit-x }
l" " black# }}button /hfix
backframe edit-x [: drop ;] edit-pen[] edit-w click[]
}}h box[]
}}z box[]
}}v box[] >o 0e to baseline 0e to gap o o>
ELSE
\regular
['] .nick-base $tmp }}text 25%b
THEN
ke-pets[] $[]# IF
{{
x-color glue*l pet-color x-color slide-frame dup .button3 to x-color
['] .pet-base $tmp }}text 25%b
}}z
THEN
glue*l }}glue }}h name-tab
glue*l }}glue }}h name-tab box[]
{{
{{ \sans \script ke-selfsig $@ ['] .sigdates $tmp }}text glue*l }}glue }}h
{{ \mono \script ke-pk $@ key| ['] 85type $tmp }}text 20%bt glue*l }}glue }}h swap
}}v pk-tab
glue*lll }}glue }}h
}}z nick[] \regular
glue*lll }}glue }}h box[]
}}z box[] \regular
mykey-box nicks-box ke-sk sec@ nip select /flop .child+ ;
: fill-nicks ( -- )
......
......@@ -1410,7 +1410,7 @@ Variable tries#
forward read-chatgroups
: n2o-greeting ( -- )
[: ." net2o " (c) ." 2010-2020 Bernd Paysan" cr ;]
[: ." net2o " net2o-version type space (c) ." 2010-2020 Bernd Paysan" cr ;]
do-debug ;
: get-skc ( -- )
......
......@@ -7,6 +7,7 @@ Zum Öffnen Passphrase eingeben
Erzeuge neue ID
Neue Passphrase eingeben
Neue Passphrase nochmal eingeben
Spitznamen
Öffentlicher Schlüssel
Schlüsselsignaturdatum
......
......@@ -7,6 +7,7 @@ Enter passphrase to unlock
Create new ID
Enter new passphrase
Enter new passphrase again
Nick+Pet
Pubkey
Key date
......
......@@ -7,6 +7,7 @@ net2o 图形用户界面
创建新的ID
输入新的密码
再次输入新的密码
昵称
公钥
关键签名日期
......
......@@ -1290,7 +1290,7 @@ previous
[: 0 dht-owner $[]@ 2dup sigsize# - forth:type
dht-hash $. dup sigsize# - safe/string forth:type ;] $tmp
['] read-pk2key$ catch IF 2drop THEN
ELSE 1+ THEN o> ;] #map ;
THEN o> ;] #map ;
: fetch-pks ( o:peer-con -- )
0 msg-group-o .msg:pks# [: drop 1+ ;] #map 0<> IF
o to connection
......@@ -1988,6 +1988,7 @@ previous
timeout( <err> ." Excessive timeouts from "
pubkey $@ key>nick type ." : "
ack@ .timeouts @ . <default> cr )
ungroup-ctx \ ungroup before sending avalanches!
msg-group$ $@len IF
msg-group-o ?dup-IF .msg:mode dup @ msg:otr# or swap
[: pubkey $@ ['] left, send-avalanche ;] !wrapper
......
......@@ -4,7 +4,4 @@ e? os-type s" linux-android" string-prefix? [IF] require starta.fs [THEN]
page ." loading n2o..."
warnings off \ no warnings please
require n2o.fs
: n2o-greet page
." net2o " net2o-version type ." text UI, nerd edition" cr
." type 'bye' to leave and 'help' for help" cr ;
:noname load-rc n2o-greet get-me save-net2o-cmds set-net2o-cmds ; is bootmessage
:noname load-rc page get-me save-net2o-cmds set-net2o-cmds ; is bootmessage
......@@ -4,5 +4,4 @@ e? os-type s" linux-android" string-prefix? [IF] require starta.fs [THEN]
page ." loading n2o..."
warnings off \ no warnings please
require n2o.fs
page
:noname load-rc save-net2o-cmds set-net2o-cmds n2o:gui bye ; is bootmessage
:noname load-rc page save-net2o-cmds set-net2o-cmds n2o:gui bye ; is bootmessage
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