summaryrefslogtreecommitdiff
path: root/ide/utils
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <gareuselesinge@debian.org>2015-01-25 14:42:51 +0100
committerGravatar Enrico Tassi <gareuselesinge@debian.org>2015-01-25 14:42:51 +0100
commit7cfc4e5146be5666419451bdd516f1f3f264d24a (patch)
treee4197645da03dc3c7cc84e434cc31d0a0cca7056 /ide/utils
parent420f78b2caeaaddc6fe484565b2d0e49c66888e5 (diff)
Imported Upstream version 8.5~beta1+dfsg
Diffstat (limited to 'ide/utils')
-rw-r--r--ide/utils/config_file.ml4
-rw-r--r--ide/utils/config_file.mli4
-rw-r--r--ide/utils/configwin_ihm.ml14
-rw-r--r--ide/utils/configwin_messages.ml2
-rw-r--r--ide/utils/configwin_types.ml6
-rw-r--r--ide/utils/editable_cells.ml1
-rw-r--r--ide/utils/okey.ml2
7 files changed, 16 insertions, 17 deletions
diff --git a/ide/utils/config_file.ml b/ide/utils/config_file.ml
index 921d3d9c..4d0aabeb 100644
--- a/ide/utils/config_file.ml
+++ b/ide/utils/config_file.ml
@@ -128,8 +128,8 @@ Could be one day rewritten with ocamllex/yacc to be more robust, efficient, allo
open Format
(* formating convention: the caller has to open the box, close it and flush the output *)
(* remarks on Format:
- set_margin impose un appel à set_max_indent
- sprintf et bprintf sont flushées à chaque appel*)
+ set_margin forces a call to set_max_indent
+ sprintf et bprintf are flushed at each call*)
(* pretty print a Raw.cp *)
let rec save formatter = function
diff --git a/ide/utils/config_file.mli b/ide/utils/config_file.mli
index b9c77682..22328e7f 100644
--- a/ide/utils/config_file.mli
+++ b/ide/utils/config_file.mli
@@ -141,8 +141,8 @@ exception Missing_cp of groupable_cp
or used to generate command line arguments.
The basic usage is to have only one group and one configuration file,
-but this mechanism allows to have more,
-for instance to have another smaller group for the options to pass on the command line.
+but this mechanism allows having more,
+for instance having another smaller group for the options to pass on the command line.
*)
class group : object
(** Adds a cp to the group.
diff --git a/ide/utils/configwin_ihm.ml b/ide/utils/configwin_ihm.ml
index 7dbd0452..c1062a9d 100644
--- a/ide/utils/configwin_ihm.ml
+++ b/ide/utils/configwin_ihm.ml
@@ -38,7 +38,7 @@ class type widget =
let file_html_config = Filename.concat Configwin_messages.home ".configwin_html"
let debug = false
-let dbg = if debug then prerr_endline else (fun _ -> ())
+let dbg s = if debug then Minilib.log s else ()
(** Return the config group for the html config file,
and the option for bindings. *)
@@ -67,7 +67,7 @@ let html_config_file_and_option () =
let last_dir = ref "";;
(** This function allows the user to select a file and returns the
- selected file name. An optional function allows to change the
+ selected file name. An optional function allows changing the
behaviour of the ok button.
A VOIR : mutli-selection ? *)
let select_files ?dir
@@ -1015,7 +1015,7 @@ class configuration_box (tt : GData.tooltips) conf_struct =
let set_icon iter = function
| None -> ()
- | Some icon -> tree#set iter icon_col icon
+ | Some icon -> tree#set ~row:iter ~column:icon_col icon
in
(* Populate the tree *)
@@ -1036,9 +1036,9 @@ class configuration_box (tt : GData.tooltips) conf_struct =
method apply () = List.iter (fun param -> param#apply) params
end
in
- let () = tree#set new_iter label_col label in
+ let () = tree#set ~row:new_iter ~column:label_col label in
let () = set_icon new_iter icon in
- let () = tree#set new_iter box_col widget in
+ let () = tree#set ~row:new_iter ~column:box_col widget in
()
| Section_list (label, icon, struct_list) ->
let widget =
@@ -1049,9 +1049,9 @@ class configuration_box (tt : GData.tooltips) conf_struct =
method box = box#coerce
end
in
- let () = tree#set new_iter label_col label in
+ let () = tree#set ~row:new_iter ~column:label_col label in
let () = set_icon new_iter icon in
- let () = tree#set new_iter box_col widget in
+ let () = tree#set ~row:new_iter ~column:box_col widget in
List.iter (make_tree (Some new_iter)) struct_list
in
diff --git a/ide/utils/configwin_messages.ml b/ide/utils/configwin_messages.ml
index de292431..de1b4721 100644
--- a/ide/utils/configwin_messages.ml
+++ b/ide/utils/configwin_messages.ml
@@ -30,7 +30,7 @@ let version = "1.2";;
let html_config = "Configwin bindings configurator for html parameters"
-let home = Minilib.home
+let home = Option.default "" (Glib.get_home_dir ())
let mCapture = "Capture";;
let mType_key = "Type key" ;;
diff --git a/ide/utils/configwin_types.ml b/ide/utils/configwin_types.ml
index 5e2b1e7c..ace751c6 100644
--- a/ide/utils/configwin_types.ml
+++ b/ide/utils/configwin_types.ml
@@ -52,7 +52,7 @@ let string_to_key s =
| '4' -> `MOD4
| '5' -> `MOD5
| _ ->
- prerr_endline s;
+ Minilib.log s;
raise Not_found
in
mask := m :: !mask
@@ -65,7 +65,7 @@ let string_to_key s =
!mask, List.assoc key name_to_keysym
with
e ->
- prerr_endline s;
+ Minilib.log s;
raise e
let key_to_string (m, k) =
@@ -116,7 +116,7 @@ let value_to_key v =
match v with
Raw.String s -> string_to_key s
| _ ->
- prerr_endline "value_to_key";
+ Minilib.log "value_to_key";
raise Not_found
let key_to_value k =
diff --git a/ide/utils/editable_cells.ml b/ide/utils/editable_cells.ml
index 1ab107c7..33968b8d 100644
--- a/ide/utils/editable_cells.ml
+++ b/ide/utils/editable_cells.ml
@@ -1,4 +1,3 @@
-open GTree
open Gobject
let create l =
diff --git a/ide/utils/okey.ml b/ide/utils/okey.ml
index 905c3485..580f1fbc 100644
--- a/ide/utils/okey.ml
+++ b/ide/utils/okey.ml
@@ -115,7 +115,7 @@ let key_press w ev =
(fun h ->
if h.cond () then
try h.cback ()
- with e -> prerr_endline (Printexc.to_string e)
+ with e -> Minilib.log (Printexc.to_string e)
else ()
)
l;