aboutsummaryrefslogtreecommitdiff
path: root/inst
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-10-10 22:41:34 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-10-10 22:41:34 +0200
commit99f93922f42af6cadd5c7ff4b0f1a96c830f9fb7 (patch)
tree00e2a6fc4e0c301721bc8307097a2b76917c9a57 /inst
parent813b2bba907bf2a62e1d5d58e9f362c09da7dfc1 (diff)
Added a manual, small GUI improvements
Diffstat (limited to 'inst')
-rw-r--r--inst/GUI/gmkin.R19
1 files changed, 12 insertions, 7 deletions
diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R
index af54cc8..9ffe1c7 100644
--- a/inst/GUI/gmkin.R
+++ b/inst/GUI/gmkin.R
@@ -561,7 +561,7 @@ add_observed_handler <- function(h, ...) {
m.e.rows[[obs.i]] <<- ggroup(cont = m.editor, horizontal = TRUE)
m.e.obs[[obs.i]] <<- gcombobox(observed.all, selected = obs.i,
cont = m.e.rows[[obs.i]])
- m.e.type[[obs.i]] <<- gcombobox(c("SFO", "FOMC", "DFOP", "HS", "SFORB"),
+ m.e.type[[obs.i]] <<- gcombobox(c("SFO", "SFORB"),
cont = m.e.rows[[obs.i]])
svalue(m.e.type[[obs.i]]) <- "SFO"
glabel("to", cont = m.e.rows[[obs.i]])
@@ -570,11 +570,11 @@ add_observed_handler <- function(h, ...) {
width = 40, cont = m.e.rows[[obs.i]])
m.e.sink[[obs.i]] <<- gcheckbox("Path to sink",
checked = TRUE, cont = m.e.rows[[obs.i]])
- gbutton("Remove compound", handler = remove_compound_handler,
+ gbutton("Remove compound", handler = remove_observed_handler,
action = obs.i, cont = m.e.rows[[obs.i]])
}
-remove_compound_handler <- function(h, ...) {
+remove_observed_handler <- function(h, ...) {
m[[m.cur]]$spec[[h$action]] <<- NULL
update_m_editor()
}
@@ -609,7 +609,7 @@ svalue(m.ff.gc) <- m[[m.cur]]$use_of_ff
m.e.b <- ggroup(cont = m.editor, horizontal = TRUE)
gbutton("Copy model", cont = m.e.b, handler = copy_model_handler)
gbutton("Delete model", cont = m.e.b, handler = delete_model_handler)
-gbutton("Add transformation product", cont = m.e.b,
+gbutton("Add observed variable", cont = m.e.b,
handler = add_observed_handler)
gbutton("Keep changes", cont = m.e.b, handler = keep_m_changes_handler)
@@ -626,8 +626,13 @@ show_m_spec <- function() {
m.e.obs[[obs.i]] <<- gcombobox(observed.all, selected = 0,
cont = m.e.rows[[obs.i]])
svalue(m.e.obs[[obs.i]]) <<- obs.name
- m.e.type[[obs.i]] <<- gcombobox(c("SFO", "FOMC", "DFOP", "HS", "SFORB"),
- cont = m.e.rows[[obs.i]])
+ if (obs.i == 1) {
+ m.e.type[[obs.i]] <<- gcombobox(c("SFO", "FOMC", "DFOP", "HS", "SFORB"),
+ cont = m.e.rows[[obs.i]])
+ } else {
+ m.e.type[[obs.i]] <<- gcombobox(c("SFO", "SFORB"),
+ cont = m.e.rows[[obs.i]])
+ }
svalue(m.e.type[[obs.i]]) <<- m[[m.cur]]$spec[[obs.i]]$type
glabel("to", cont = m.e.rows[[obs.i]])
obs.to <<- ifelse(is.null(m[[m.cur]]$spec[[obs.i]]$to), "",
@@ -638,7 +643,7 @@ show_m_spec <- function() {
m.e.sink[[obs.i]] <<- gcheckbox("Path to sink", checked = m[[m.cur]]$spec[[obs.i]]$sink,
cont = m.e.rows[[obs.i]])
if (obs.i > 1) {
- gbutton("Remove compound", handler = remove_compound_handler,
+ gbutton("Remove observed variable", handler = remove_observed_handler,
action = obs.i, cont = m.e.rows[[obs.i]])
}
}

Contact - Imprint