You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
3.1 KiB
95 lines
3.1 KiB
From: Guillaume Brochu <guillaume.brochu@gmail.com> |
|
Date: Sat, 3 Nov 2018 07:42:06 -0400 |
|
Subject: gui-General-Improvements |
|
|
|
General improvements to gui |
|
|
|
Already in geneweb 7: |
|
https://github.com/geneweb/geneweb/commit/d39b07d805ed8bcf8149e887164055da7d0e45b6 |
|
--- |
|
gui/gui.ml | 15 +++++++-------- |
|
gui/gw/gui_lex.txt | 6 +++++- |
|
2 files changed, 12 insertions(+), 9 deletions(-) |
|
|
|
diff --git a/gui/gui.ml b/gui/gui.ml |
|
index e6c569b..254d4cb 100644 |
|
--- a/gui/gui.ml |
|
+++ b/gui/gui.ml |
|
@@ -21,6 +21,8 @@ value bin_dir = |
|
else path |
|
; |
|
|
|
+value share_dir = bin_dir; |
|
+ |
|
value trace = ref False; |
|
|
|
value default_lang = |
|
@@ -35,9 +37,6 @@ value lexicon_mtime = ref 0.0; |
|
value lexicon_file = Filename.concat bin_dir "gui_lex.txt"; |
|
|
|
value config_gui_file = Filename.concat bin_dir "config.txt"; |
|
-value config_gwd_file = Filename.concat bin_dir "gwd.arg"; |
|
-value config_only_file = Filename.concat bin_dir "only.txt"; |
|
- |
|
|
|
(**/**) (* Gestion du dictionnaire des langues pour GUI. *) |
|
|
|
@@ -218,8 +217,7 @@ value write_base_env conf bname env = |
|
; |
|
|
|
value write_config_file conf = do { |
|
- let fname = Filename.concat bin_dir "config.txt" in |
|
- match try Some (open_out fname) with [ Sys_error _ -> None] with |
|
+ match try Some (open_out config_gui_file) with [ Sys_error _ -> None] with |
|
[ Some oc -> |
|
do { |
|
List.iter (fun (k, v) -> fprintf oc "%s=%s\n" k v) conf.gui_arg; |
|
@@ -754,7 +752,7 @@ value rec show_main conf = do { |
|
in |
|
let icon name = |
|
let file = |
|
- List.fold_left Filename.concat bin_dir ["images"; name] |
|
+ List.fold_left Filename.concat share_dir ["images"; name] |
|
in |
|
let info = GDraw.pixmap_from_xpm ~file:file () in |
|
(GMisc.pixmap info ())#coerce |
|
@@ -1250,7 +1248,7 @@ and launch_server conf = do { |
|
try Sys.remove stop_server with [ Sys_error _ -> () ]; |
|
let prog = Filename.concat bin_dir "gwd" in |
|
let args = |
|
- ["-hd"; bin_dir; "-bd"; conf.bases_dir; "-p"; sprintf "%d" conf.port] |
|
+ ["-hd"; share_dir; "-bd"; conf.bases_dir; "-lang"; lang.val; "-p"; sprintf "%d" conf.port] |
|
in |
|
let server_pid = exec prog args gwd_log gwd_log in |
|
let (pid, ps) = Unix.waitpid [Unix.WNOHANG] server_pid in |
|
@@ -1364,7 +1362,8 @@ value launch_config () = |
|
assistant#set_page_complete page btn#active })) |
|
| None -> () ]; |
|
let page_4 = GMisc.label |
|
- ~text:(transl "save preferences") () |
|
+ ~text:(transl "Your configuration file is:" ^ "\n" ^ config_gui_file) |
|
+ ~line_wrap:True () |
|
in |
|
ignore |
|
(assistant#append_page |
|
diff --git a/gui/gw/gui_lex.txt b/gui/gw/gui_lex.txt |
|
index 922c678..2019eb2 100644 |
|
--- a/gui/gw/gui_lex.txt |
|
+++ b/gui/gw/gui_lex.txt |
|
@@ -123,7 +123,7 @@ fr: Configurez éventuellement le numéro de port |
|
|
|
select browser |
|
en: Select the browser you want to use |
|
-fr: Selectionnez le navigateur que vous voulez utiliser |
|
+fr: Selectionnez le navigateur à utiliser |
|
|
|
save preferences |
|
en: Save preference |
|
@@ -200,3 +200,7 @@ fr: Consang |
|
Update_nldb |
|
en: Update_nldb |
|
fr: Update_nldb |
|
+ |
|
+ Your configuration file is: |
|
+en: Your configuration file is: |
|
+fr: Votre fichier de configuration est:
|
|
|