Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
citizen-science
symbai
Commits
bba05857
Commit
bba05857
authored
Jul 04, 2014
by
Dave Griffiths
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks and fixes all over the shop
parent
66988f30
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
128 additions
and
97 deletions
+128
-97
android/AndroidManifest.xml
android/AndroidManifest.xml
+1
-1
android/assets/dbsync.scm
android/assets/dbsync.scm
+3
-3
android/assets/lib.scm
android/assets/lib.scm
+3
-1
android/assets/starwisp.scm
android/assets/starwisp.scm
+94
-51
android/assets/translations.scm
android/assets/translations.scm
+11
-2
android/src/foam/symbai/GeneaologyActivity.java
android/src/foam/symbai/GeneaologyActivity.java
+0
-30
android/src/foam/symbai/starwisp.java
android/src/foam/symbai/starwisp.java
+1
-1
eavdb/eavdb.ss
eavdb/eavdb.ss
+3
-2
eavdb/entity-filter.ss
eavdb/entity-filter.ss
+10
-5
eavdb/entity-sync.ss
eavdb/entity-sync.ss
+2
-1
No files found.
android/AndroidManifest.xml
View file @
bba05857
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<activity
android:name=
"foam.symbai.FamilyActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.FamilyActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.MigrationActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.MigrationActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.IncomeActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.IncomeActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.Genea
o
logyActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.GenealogyActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.SocialActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.SocialActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.FriendshipActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.FriendshipActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.AgreementActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"foam.symbai.AgreementActivity"
android:configChanges=
"orientation"
></activity>
...
...
android/assets/dbsync.scm
View file @
bba05857
...
@@ -1031,18 +1031,18 @@
...
@@ -1031,18 +1031,18 @@
(
define
(
build-test!
db
table
village-ktvlist
household-ktvlist
individual-ktvlist
)
(
define
(
build-test!
db
table
village-ktvlist
household-ktvlist
individual-ktvlist
)
(
looper!
(
looper!
1
3
(
lambda
(
i
)
(
lambda
(
i
)
(
msg
"making village"
i
)
(
msg
"making village"
i
)
(
let
((
village
(
simpsons-village
db
table
village-ktvlist
)))
(
let
((
village
(
simpsons-village
db
table
village-ktvlist
)))
(
looper!
(
looper!
3
15
(
lambda
(
i
)
(
lambda
(
i
)
(
alog
"household"
)
(
alog
"household"
)
(
msg
"making household"
i
)
(
msg
"making household"
i
)
(
let
((
household
(
simpsons-household
db
table
village
household-ktvlist
)))
(
let
((
household
(
simpsons-household
db
table
village
household-ktvlist
)))
(
looper!
(
looper!
(
random
10
)
(
+
5
(
random
10
)
)
(
lambda
(
i
)
(
lambda
(
i
)
(
msg
"making individual"
i
)
(
msg
"making individual"
i
)
(
simpsons-individual
db
table
household
individual-ktvlist
))))))))))
(
simpsons-individual
db
table
household
individual-ktvlist
))))))))))
...
...
android/assets/lib.scm
View file @
bba05857
...
@@ -795,7 +795,8 @@
...
@@ -795,7 +795,8 @@
((
null?
w
)
#f
)
((
null?
w
)
#f
)
;; drill deeper
;; drill deeper
((
eq?
(
update-widget-token
w
)
'contents
)
((
eq?
(
update-widget-token
w
)
'contents
)
(
msg
"updateing contents from callback"
)
(
update-callbacks!
(
update-widget-value
w
)))
((
eq?
(
update-widget-token
w
)
'contents-add
)
(
update-callbacks!
(
update-widget-value
w
)))
(
update-callbacks!
(
update-widget-value
w
)))
((
eq?
(
update-widget-token
w
)
'grid-buttons
)
((
eq?
(
update-widget-token
w
)
'grid-buttons
)
(
add-callback!
(
callback
(
update-widget-id
w
)
(
add-callback!
(
callback
(
update-widget-id
w
)
...
@@ -862,6 +863,7 @@
...
@@ -862,6 +863,7 @@
(
begin
(
display
"no dialog called "
)(
display
name
)(
newline
))
(
begin
(
display
"no dialog called "
)(
display
name
)(
newline
))
(
let
((
events
(
apply
(
dialog-fn
dialog
)
args
)))
(
let
((
events
(
apply
(
dialog-fn
dialog
)
args
)))
(
update-dialogs!
events
)
(
update-dialogs!
events
)
(
update-callbacks-from-update!
events
)
(
send
(
scheme->json
events
))))))
(
send
(
scheme->json
events
))))))
;; called by java
;; called by java
...
...
android/assets/starwisp.scm
View file @
bba05857
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
(
ktv
"state-bus-service-closest-access"
"varchar"
""
)
(
ktv
"state-bus-service-closest-access"
"varchar"
""
)
(
ktv
"district-bus-service-closest-access"
"varchar"
""
)
(
ktv
"district-bus-service-closest-access"
"varchar"
""
)
(
ktv
"panchayat-closest-access"
"varchar"
""
)
(
ktv
"panchayat-closest-access"
"varchar"
""
)
(
ktv
"
NGO
-closest-access"
"varchar"
""
)
(
ktv
"
ngo
-closest-access"
"varchar"
""
)
(
ktv
"market-closest-access"
"varchar"
""
)
(
ktv
"market-closest-access"
"varchar"
""
)
(
ktv
"car"
"int"
0
)))
(
ktv
"car"
"int"
0
)))
...
@@ -142,8 +142,8 @@
...
@@ -142,8 +142,8 @@
(
ktv
"rent-land"
"int"
0
)
(
ktv
"rent-land"
"int"
0
)
(
ktv
"hire-land"
"int"
0
)
(
ktv
"hire-land"
"int"
0
)
(
ktv
"house-type"
"varchar"
""
)
(
ktv
"house-type"
"varchar"
""
)
(
ktv
"loan"
"int"
0
)
(
ktv
"loan"
"int"
-1
)
(
ktv
"earning"
"int"
0
)
(
ktv
"earning"
"int"
-1
)
(
ktv
"radio"
"int"
0
)
(
ktv
"radio"
"int"
0
)
(
ktv
"tv"
"int"
0
)
(
ktv
"tv"
"int"
0
)
(
ktv
"mobile"
"int"
0
)
(
ktv
"mobile"
"int"
0
)
...
@@ -229,20 +229,21 @@
...
@@ -229,20 +229,21 @@
(
get-current
'debug-text
""
)))
(
get-current
'debug-text
""
)))
(
define
(
debug-timer-cb
)
(
define
(
debug-timer-cb
)
(
alog
"debug timer cb"
)
(
append
(
append
(
cond
(
cond
((
get-current
'sync-on
#f
)
((
get-current
'sync-on
#f
)
;(when (zero? (random 10))
;(when (zero? (random 10))
; (msg "mangling...")
; (msg "mangling...")
; (mangle-test! db "sync" entity-types))
; (mangle-test! db "sync" entity-types))
(
msg
"one"
)
(
set-current!
'upload
0
)
(
set-current!
'upload
0
)
(
set-current!
'download
0
)
(
set-current!
'download
0
)
(
connect-to-net
(
connect-to-net
(
lambda
()
(
lambda
()
(
msg
"connected, going in..."
)
(
msg
"connected, going in..."
)
(
alog
"got here..."
)
(
append
(
append
(
list
(
toast
"
s
ync
-cb
"
))
(
list
(
toast
"
S
ync
ing
"
))
(
upload-dirty
db
)
(
upload-dirty
db
)
;; important - don't receive until all are sent...
;; important - don't receive until all are sent...
(
if
(
have-dirty?
db
"sync"
)
'
()
(
if
(
have-dirty?
db
"sync"
)
'
()
...
@@ -441,7 +442,7 @@
...
@@ -441,7 +442,7 @@
(
image
(
if
(
image-invalid?
image-name
)
(
image
(
if
(
image-invalid?
image-name
)
"face"
(
string-append
"/sdcard/symbai/files/"
image-name
))))
"face"
(
string-append
"/sdcard/symbai/files/"
image-name
))))
(
cond
(
cond
((
>
(
length
search
)
50
)
((
>
(
length
search
)
50
0
)
(
button
(
button
(
make-id
(
string-append
"chooser-"
id
))
(
make-id
(
string-append
"chooser-"
id
))
(
ktv-get
e
"name"
)
30
(
layout
(
car
button-size
)
(
/
(
cadr
button-size
)
3
)
1
'centre
5
)
(
ktv-get
e
"name"
)
30
(
layout
(
car
button-size
)
(
/
(
cadr
button-size
)
3
)
1
'centre
5
)
...
@@ -470,32 +471,60 @@
...
@@ -470,32 +471,60 @@
search
)
search
)
3
))
3
))
;; getting late in the day...
(
define
filter-index
0
)
(
define
filter-households
'
())
(
define
(
gradual-build
)
(
if
(
or
(
null?
filter-households
)
(
>
filter-index
(
-
(
length
filter-households
)
1
)))
'
()
(
let
((
household
(
list-ref
filter-households
filter-index
)))
(
set!
filter-index
(
+
filter-index
1
))
(
let
((
search
(
db-filter-only
db
"sync"
"individual"
(
append
(
filter-get
)
(
list
(
list
"parent"
"varchar"
"="
(
ktv-get
household
"unique_id"
))))
(
list
(
list
"photo"
"file"
)
(
list
"name"
"varchar"
)))))
(
list
(
delayed
"filter-delayed"
100
gradual-build
)
(
update-widget
'linear-layout
(
get-id
"choose-pics"
)
'contents-add
(
list
(
apply
vert
(
cons
(
text-view
0
(
ktv-get
household
"name"
)
40
fillwrap
)
(
build-photo-buttons
search
)))))
)))))
(
define
(
update-individual-filter-inner
households
)
(
define
(
update-individual-filter-inner
households
)
(
map
(
set!
filter-households
households
)
(
lambda
(
household
)
(
delayed
"filter-delayed"
100
gradual-build
))
(
let
((
search
(
db-filter-only
db
"sync"
"individual"
(
append
(
filter-get
)
(
list
(
list
"parent"
"varchar"
"="
(
ktv-get
household
"unique_id"
))))
(
list
(
list
"photo"
"file"
)
(
list
"name"
"varchar"
)))))
(
apply
vert
(
cons
(
text-view
0
(
ktv-get
household
"name"
)
20
fillwrap
)
(
build-photo-buttons
search
)))
))
households
))
(
define
(
update-individual-filter
)
(
define
(
update-individual-filter
)
(
msg
"update if"
)
(
let
((
households
(
db-filter-only
db
"sync"
"household"
(
let
((
households
(
db-filter-only
db
"sync"
"household"
(
list
(
list
"parent"
"varchar"
"="
(
get-setting-value
"current-village"
)))
(
list
(
list
"parent"
"varchar"
"="
(
get-setting-value
"current-village"
)))
(
list
(
list
"name"
"varchar"
)))))
(
list
(
list
"name"
"varchar"
)))))
(
msg
households
)
(
update-individual-filter-inner
households
)))
(
define
(
update-individual-filter2
)
(
alog
"uif-inner"
)
(
let
((
search
(
db-filter-only
db
"sync"
"individual"
(
filter-get
)
(
list
(
list
"photo"
"file"
)
(
list
"name"
"varchar"
)))))
(
alog
"uif-house-search end"
)
(
update-widget
(
update-widget
'linear-layout
(
get-id
"choose-pics"
)
'contents
'linear-layout
(
get-id
"choose-pics"
)
'contents
(
update-individual-filter-inner
households
))))
(
build-photo-buttons
search
))
))
(
define
(
image/name-from-unique-id
db
table
unique-id
)
(
define
(
image/name-from-unique-id
db
table
unique-id
)
(
let
((
e
(
get-entity-by-unique
db
table
unique-id
)))
(
let
((
e
(
get-entity-by-unique
db
table
unique-id
)))
...
@@ -636,6 +665,7 @@
...
@@ -636,6 +665,7 @@
(
define
(
build-amenity-widgets
id
shade
)
(
define
(
build-amenity-widgets
id
shade
)
(
let
((
id-text
(
symbol->string
id
)))
(
let
((
id-text
(
symbol->string
id
)))
(
horiz-colour
(
horiz-colour
(
if
shade
colour-one
colour-two
)
(
if
shade
colour-one
colour-two
)
(
linear-layout
(
linear-layout
...
@@ -705,7 +735,11 @@
...
@@ -705,7 +735,11 @@
(
activity
(
activity
"main"
"main"
(
vert
(
vert
(
mbutton
'start
(
lambda
()
(
list
(
start-activity-goto
"main2"
0
""
)))))
(
image-view
0
"logo"
(
layout
'wrap-content
'wrap-content
-1
'centre
0
))
(
button
(
make-id
"main-start"
)
"Symbai"
40
(
layout
'wrap-content
'wrap-content
-1
'centre
5
)
(
lambda
()
(
list
(
start-activity-goto
"main2"
0
""
)))))
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
(
activity-layout
activity
))
(
activity-layout
activity
))
(
lambda
(
activity
arg
)
'
())
(
lambda
(
activity
arg
)
'
())
...
@@ -745,11 +779,13 @@
...
@@ -745,11 +779,13 @@
(
list
(
list
"name"
"varchar"
)))))
(
list
(
list
"name"
"varchar"
)))))
(
string-append
(
string-append
(
ktv-get
(
get-entity-by-unique
db
"sync"
(
get-setting-value
"current-village"
))
"name"
)
(
ktv-get
(
get-entity-by-unique
db
"sync"
(
get-setting-value
"current-village"
))
"name"
)
":"
(
get-setting-value
"user-id"
)
(
get-setting-value
"user-id"
)
"gamehousehold"
)
"
:
gamehousehold"
)
(
string-append
(
string-append
(
ktv-get
(
get-entity-by-unique
db
"sync"
(
get-setting-value
"current-village"
))
"name"
)
(
ktv-get
(
get-entity-by-unique
db
"sync"
(
get-setting-value
"current-village"
))
"name"
)
(
get-setting-value
"user-id"
)
":"
(
get-setting-value
"user-id"
)
":"
(
number->string
(
get/inc-setting
"house-id"
))))))
(
number->string
(
get/inc-setting
"house-id"
))))))
;; autogenerate the name from the current ID
;; autogenerate the name from the current ID
(
ktvlist-merge
(
ktvlist-merge
...
@@ -951,14 +987,14 @@
...
@@ -951,14 +987,14 @@
(
lambda
()
(
get-current
'household
#f
))
(
lambda
()
(
get-current
'household
#f
))
(
lambda
()
(
lambda
()
(
let
((
photo-id
(
get/inc-setting
"photo-id"
))
(
let
((
photo-id
(
get/inc-setting
"photo-id"
))
(
household-name
(
ktv-get
(
dbg
(
get-entity-by-unique
db
"sync"
(
dbg
(
get-current
'household
#f
))))
"name"
)))
(
household-name
(
ktv-get
(
get-entity-by-unique
db
"sync"
(
get-current
'household
#f
))
"name"
)))
(
msg
household-name
)
(
ktvlist-merge
(
ktvlist-merge
individual-ktvlist
individual-ktvlist
(
list
(
list
(
ktv
"name"
"varchar"
(
ktv
"name"
"varchar"
(
string-append
(
string-append
household-name
":"
household-name
":"
(
get-current
'user-id
"no id"
)
":"
(
number->string
photo-id
)))
(
number->string
photo-id
)))
(
ktv
"photo-id"
"varchar"
(
ktv
"photo-id"
"varchar"
(
number->string
photo-id
))
(
number->string
photo-id
))
...
@@ -1014,7 +1050,7 @@
...
@@ -1014,7 +1050,7 @@
(
mbutton-scale
'migration-button
(
lambda
()
(
list
(
start-activity
"migration"
0
""
))))
(
mbutton-scale
'migration-button
(
lambda
()
(
list
(
start-activity
"migration"
0
""
))))
(
mbutton-scale
'income-button
(
lambda
()
(
list
(
start-activity
"income"
0
""
)))))
(
mbutton-scale
'income-button
(
lambda
()
(
list
(
start-activity
"income"
0
""
)))))
(
horiz
(
horiz
(
mbutton-scale
'genea
o
logy-button
(
lambda
()
(
list
(
start-activity
"genea
o
logy"
0
""
))))
(
mbutton-scale
'genealogy-button
(
lambda
()
(
list
(
start-activity
"genealogy"
0
""
))))
(
mbutton-scale
'friendship-button
(
lambda
()
(
list
(
start-activity
"friendship"
0
""
)))))
(
mbutton-scale
'friendship-button
(
lambda
()
(
list
(
start-activity
"friendship"
0
""
)))))
(
horiz
(
horiz
(
mbutton-scale
'social-button
(
lambda
()
(
list
(
start-activity
"social"
0
""
))))
(
mbutton-scale
'social-button
(
lambda
()
(
list
(
start-activity
"social"
0
""
))))
...
@@ -1070,7 +1106,7 @@
...
@@ -1070,7 +1106,7 @@
(
mtoggle-button-scale
'literate
(
lambda
(
v
)
(
entity-set-value!
"literate"
"int"
v
)
'
()))
(
mtoggle-button-scale
'literate
(
lambda
(
v
)
(
entity-set-value!
"literate"
"int"
v
)
'
()))
(
mspinner
'education
education-list
(
lambda
(
v
)
(
entity-set-value!
"education"
"varchar"
v
)
'
())))
(
mspinner
'education
education-list
(
lambda
(
v
)
(
entity-set-value!
"education"
"varchar"
v
)
'
())))
(
mbutton
'next
(
lambda
()
(
list
(
start-activity
"family"
0
""
))))
(
mbutton
'
details-
next
(
lambda
()
(
list
(
start-activity
"family"
0
""
))))
(
spacer
20
)
(
spacer
20
)
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
...
@@ -1101,8 +1137,9 @@
...
@@ -1101,8 +1137,9 @@
;; need to do this before init is called again in on-start,
;; need to do this before init is called again in on-start,
;; which happens next
;; which happens next
(
let
((
unique-id
(
entity-get-value
"unique_id"
)))
(
let
((
unique-id
(
entity-get-value
"unique_id"
)))
(
entity-set-value!
"photo"
"file"
(
get-current
'photo-name
"error no photo name!!"
))
(
when
(
eqv?
resultcode
-1
)
;; success!
(
entity-update-values!
)
(
entity-set-value!
"photo"
"file"
(
get-current
'photo-name
"error no photo name!!"
))
(
entity-update-values!
))
;; need to reset the individual from the db now (as update reset it)
;; need to reset the individual from the db now (as update reset it)
(
entity-init!
db
"sync"
"individual"
(
get-entity-by-unique
db
"sync"
unique-id
)))
(
entity-init!
db
"sync"
"individual"
(
get-entity-by-unique
db
"sync"
unique-id
)))
(
list
(
list
...
@@ -1140,7 +1177,7 @@
...
@@ -1140,7 +1177,7 @@
(
spinner-choice
residence-list
v
))
'
()))
(
spinner-choice
residence-list
v
))
'
()))
(
medit-text
'num-siblings
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"num-siblings"
"int"
v
)
'
()))
(
medit-text
'num-siblings
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"num-siblings"
"int"
v
)
'
()))
(
medit-text
'birth-order
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"birth-order"
"int"
v
)
'
()))
(
medit-text
'birth-order
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"birth-order"
"int"
v
)
'
()))
(
mbutton
'next
(
lambda
()
(
list
(
start-activity
"migration"
0
""
))))
(
mbutton
'
family-
next
(
lambda
()
(
list
(
start-activity
"migration"
0
""
))))
(
spacer
20
)
(
spacer
20
)
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
...
@@ -1219,7 +1256,7 @@
...
@@ -1219,7 +1256,7 @@
(
medit-text
'num-residence-changes
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"num-residence-changes"
"int"
v
)
'
()))
(
medit-text
'num-residence-changes
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"num-residence-changes"
"int"
v
)
'
()))
(
medit-text
'village-visits-month
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"village-visits-month"
"int"
v
)
'
()))
(
medit-text
'village-visits-month
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"village-visits-month"
"int"
v
)
'
()))
(
medit-text
'village-visits-year
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"village-visits-year"
"int"
v
)
'
()))
(
medit-text
'village-visits-year
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"village-visits-year"
"int"
v
)
'
()))
(
mbutton
'next
(
lambda
()
(
list
(
start-activity
"income"
0
""
))))
(
mbutton
'
migration-
next
(
lambda
()
(
list
(
start-activity
"income"
0
""
))))
(
spacer
20
)
(
spacer
20
)
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
...
@@ -1277,7 +1314,7 @@
...
@@ -1277,7 +1314,7 @@
(
horiz
(
horiz
(
medit-text
'visit-market
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"visit-market"
"int"
v
)
'
()))
(
medit-text
'visit-market
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"visit-market"
"int"
v
)
'
()))
(
medit-text
'town-sell
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"town-sell"
"int"
v
)
'
())))
(
medit-text
'town-sell
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"town-sell"
"int"
v
)
'
())))
(
mbutton
'next
(
lambda
()
(
list
(
start-activity
"genea
o
logy"
0
""
))))
(
mbutton
'
income-
next
(
lambda
()
(
list
(
start-activity
"genealogy"
0
""
))))
(
spacer
20
)
(
spacer
20
)
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
...
@@ -1382,7 +1419,7 @@
...
@@ -1382,7 +1419,7 @@
(
activity
(
activity
"genea
o
logy"
"genealogy"
(
build-activity
(
build-activity
(
horiz
(
horiz
(
build-person-selector
'mother
"id-mother"
(
list
)
mother-request-code
)
(
build-person-selector
'mother
"id-mother"
(
list
)
mother-request-code
)
...
@@ -1390,13 +1427,13 @@
...
@@ -1390,13 +1427,13 @@
(
build-list-widget
(
build-list-widget
db
"sync"
'children
"child"
"child"
(
lambda
()
(
get-current
'individual
#f
))
db
"sync"
'children
"child"
"child"
(
lambda
()
(
get-current
'individual
#f
))
(
lambda
()
child-ktvlist
))
(
lambda
()
child-ktvlist
))
(
mbutton
'next
(
lambda
()
(
list
(
start-activity
"friendship"
0
""
))))
(
mbutton
'
gene-
next
(
lambda
()
(
list
(
start-activity
"friendship"
0
""
))))
(
spacer
20
))
(
spacer
20
))
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
(
activity-layout
activity
))
(
activity-layout
activity
))
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
;; reset after child entity
;; reset after child entity
(
set-current!
'activity-title
"Genea
o
logy"
)
(
set-current!
'activity-title
"Genealogy"
)
(
entity-init!
db
"sync"
"individual"
(
get-entity-by-unique
db
"sync"
(
get-current
'individual
#f
)))
(
entity-init!
db
"sync"
"individual"
(
get-entity-by-unique
db
"sync"
(
get-current
'individual
#f
)))
(
append
(
append
(
update-top-bar
)
(
update-top-bar
)
...
@@ -1431,7 +1468,7 @@
...
@@ -1431,7 +1468,7 @@
(
build-social-connection
'social-three
"social-three"
"friend"
social-request-code-three
#t
)
(
build-social-connection
'social-three
"social-three"
"friend"
social-request-code-three
#t
)
(
build-social-connection
'social-four
"social-four"
"friend"
social-request-code-four
#f
)
(
build-social-connection
'social-four
"social-four"
"friend"
social-request-code-four
#f
)
(
build-social-connection
'social-five
"social-five"
"friend"
social-request-code-five
#t
)
(
build-social-connection
'social-five
"social-five"
"friend"
social-request-code-five
#t
)
(
mbutton
'next
(
lambda
()
(
list
(
start-activity-goto
"individual"
0
(
get-current
'individual
#f
)))))
(
mbutton
'
social-
next
(
lambda
()
(
list
(
start-activity-goto
"individual"
0
(
get-current
'individual
#f
)))))
(
spacer
20
)
(
spacer
20
)
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
...
@@ -1470,7 +1507,7 @@
...
@@ -1470,7 +1507,7 @@
(
build-social-connection
'social-three
"friendship-three"
"friend"
social-request-code-three
#t
)
(
build-social-connection
'social-three
"friendship-three"
"friend"
social-request-code-three
#t
)
(
build-social-connection
'social-four
"friendship-four"
"friend"
social-request-code-four
#f
)
(
build-social-connection
'social-four
"friendship-four"
"friend"
social-request-code-four
#f
)
(
build-social-connection
'social-five
"friendship-five"
"friend"
social-request-code-five
#t
)
(
build-social-connection
'social-five
"friendship-five"
"friend"
social-request-code-five
#t
)
(
mbutton
'next
(
lambda
()
(
list
(
start-activity
"social"
0
""
))))
(
mbutton
'
friendship-
next
(
lambda
()
(
list
(
start-activity
"social"
0
""
))))
(
spacer
20
)
(
spacer
20
)
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
...
@@ -1515,7 +1552,7 @@
...
@@ -1515,7 +1552,7 @@
(
if
(
eqv?
v
1
)
(
soundfile-start-playback
"/sdcard/symbai/test.3gp"
)
(
if
(
eqv?
v
1
)
(
soundfile-start-playback
"/sdcard/symbai/test.3gp"
)
(
soundfile-stop-playback
)))))
(
soundfile-stop-playback
)))))
)
)
(
mbutton
'next
(
lambda
()
(
list
(
start-activity
"details"
0
""
))))
(
mbutton
'
agreement-
next
(
lambda
()
(
list
(
start-activity
"details"
0
""
))))
(
spacer
20
)
(
spacer
20
)
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
...
@@ -1533,6 +1570,13 @@
...
@@ -1533,6 +1570,13 @@
"individual-chooser"
"individual-chooser"
(
build-activity
(
build-activity
(
vert
(
vert
(
linear-layout
(
make-id
"choose-pics"
)
'vertical
(
layout
'fill-parent
'wrap-content
0.75
'centre
0
)
(
list
0
0
0
0
)
(
list
))
(
mtitle
'filter
)
(
mtitle
'filter
)
(
horiz
(
horiz
(
mspinner
'gender
'
(
off
female
male
)
(
mspinner
'gender
'
(
off
female
male
)
...
@@ -1541,7 +1585,8 @@
...
@@ -1541,7 +1585,8 @@
(
filter-remove!
"gender"
)
(
filter-remove!
"gender"
)
(
filter-add!
(
make-filter
"gender"
"varchar"
"="
(
filter-add!
(
make-filter
"gender"
"varchar"
"="
(
spinner-choice
'
(
off
female
male
)
v
))))
(
spinner-choice
'
(
off
female
male
)
v
))))
(
list
(
update-individual-filter
))
(
if
(
get-current
'filter-switch
#f
)
(
list
(
update-individual-filter
))
'
())
))
))
(
medit-text
(
medit-text
'name
"normal"
'name
"normal"
...
@@ -1549,15 +1594,13 @@
...
@@ -1549,15 +1594,13 @@
(
if
(
equal?
v
""
)
(
if
(
equal?
v
""
)
(
filter-remove!
"name"
)
(
filter-remove!
"name"
)
(
filter-add!
(
make-filter
"name"
"varchar"
"like"
(
string-append
v
"%"
))))
(
filter-add!
(
make-filter
"name"
"varchar"
"like"
(
string-append
v
"%"
))))
(
list
(
update-individual-filter
))
(
if
(
get-current
'filter-switch
#f
)
)))
(
list
(
update-individual-filter
))
'
()))
)
(
linear-layout
(
mtoggle-button-scale
'filter-switch
(
make-id
"choose-pics"
)
'vertical
(
lambda
(
v
)
(
layout
'fill-parent
'wrap-content
0.75
'centre
0
)
(
set-current!
'filter-switch
(
not
(
zero?
v
)))
(
list
0
0
0
0
)
'
())))
(
list
))
(
horiz
(
horiz
(
medit-text
'quick-name
"normal"
(
medit-text
'quick-name
"normal"
...
...
android/assets/translations.scm
View file @
bba05857
...
@@ -4,8 +4,16 @@
...
@@ -4,8 +4,16 @@
(
list
'test-text
(
list
"I am test text"
"I am test text"
"I am test text"
""
))
(
list
'test-text
(
list
"I am test text"
"I am test text"
"I am test text"
""
))
(
list
'one
(
list
"one"
""
))
(
list
'one
(
list
"one"
""
))
(
list
'two
(
list
"two"
""
))
(
list
'two
(
list
"two"
""
))
(
list
'start
(
list
"Symbai"
""
))
(
list
'three
(
list
"three"
""
))
(
list
'three
(
list
"three"
""
))
(
list
'next
(
list
"Next"
))
(
list
'details-next
(
list
"Next"
))
(
list
'family-next
(
list
"Next"
))
(
list
'migration-next
(
list
"Next"
))
(
list
'income-next
(
list
"Next"
))
(
list
'gene-next
(
list
"Next"
))
(
list
'social-next
(
list
"Next"
))
(
list
'friendship-next
(
list
"Next"
))
(
list
'agreement-next
(
list
"Next"
))
(
list
'village
(
list
"Village"
""
))
(
list
'village
(
list
"Village"
""
))
(
list
'household
(
list
"Household"
""
))
(
list
'household
(
list
"Household"
""
))
(
list
'households
(
list
"Households"
""
))
(
list
'households
(
list
"Households"
""
))
...
@@ -32,6 +40,7 @@
...
@@ -32,6 +40,7 @@
(
list
'quick-add
(
list
"Quick add"
""
))
(
list
'quick-add
(
list
"Quick add"
""
))
(
list
'find-individual
(
list
"Find individual"
""
))
(
list
'find-individual
(
list
"Find individual"
""
))
(
list
'filter
(
list
"Filter"
""
))
(
list
'filter
(
list
"Filter"
""
))
(
list
'filter-switch
(
list
"Run filter"
""
))
(
list
'off
(
list
"Off"
"Off"
"Off"
""
))
(
list
'off
(
list
"Off"
"Off"
"Off"
""
))
(
list
'name
(
list
"Name"
"Kyrteng"
))
(
list
'name
(
list
"Name"
"Kyrteng"
))
(
list
'sync-all
(
list
"Sync me!"
""
))
(
list
'sync-all
(
list
"Sync me!"
""
))
...
@@ -112,7 +121,7 @@
...
@@ -112,7 +121,7 @@
(
list
'migration-button
(
list
"Migration"
""
))
(
list
'migration-button
(
list
"Migration"
""
))
(
list
'friendship-button
(
list
"Friendship"
))
(
list
'friendship-button
(
list
"Friendship"
))
(
list
'income-button
(
list
"Income"
""
))
(
list
'income-button
(
list
"Income"
""
))
(
list
'genea
o
logy-button
(
list
"Genea
o
logy"
""
))
(
list
'genealogy-button
(
list
"Genealogy"
""
))
(
list
'social-button
(
list
"Social"
""
))
(
list
'social-button
(
list
"Social"
""
))
(
list
'agreement-button
(
list
"Agreement"
""
))
(
list
'agreement-button
(
list
"Agreement"
""
))
(
list
'is-a-child
(
list
"Child"
""
))
(
list
'is-a-child
(
list
"Child"
""
))
...
...
android/src/foam/symbai/GeneaologyActivity.java
deleted
100644 → 0
View file @
66988f30
// Starwisp Copyright (C) 2013 Dave Griffiths
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.