aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authormonate2003-03-14 17:51:28 +0000
committermonate2003-03-14 17:51:28 +0000
commit01c3ff920c1273958dc8a1f3b6e09ca3a5c75a3a (patch)
tree3e7a529fd1402a60ca21d7a4b432e7714825685f /ide
parentacfd166ef3d3b9773220ab1188397c9a5a730889 (diff)
coqide: maj preferences du wizzard
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3774 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide')
-rw-r--r--ide/preferences.ml14
-rw-r--r--ide/utils/editable_cells.ml36
2 files changed, 45 insertions, 5 deletions
diff --git a/ide/preferences.ml b/ide/preferences.ml
index 51c7a025cc..c78cf32140 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -294,11 +294,15 @@ let configure () =
string ~f:(fun s -> !current.library_url <- s) "Library URL" !current.library_url in
let automatic_tactics =
- list
- ~titles:["Coq Command to try";"Coq Command to insert in script"]
- "Wizzard tactics to apply"
- (fun (c,i) -> [c;i])
- !current.automatic_tactics
+ let box = GPack.hbox () in
+ let w = Editable_cells.create !current.automatic_tactics in
+ box#pack w#coerce;
+ custom
+ ~label:"Wizzard tactics to try in order (WORK IN PROGRESS)"
+ box
+ (fun () -> ())
+ true
+
in
let cmds =
[Section("Commands",
diff --git a/ide/utils/editable_cells.ml b/ide/utils/editable_cells.ml
new file mode 100644
index 0000000000..edc9d2b065
--- /dev/null
+++ b/ide/utils/editable_cells.ml
@@ -0,0 +1,36 @@
+let create l =
+ let hbox = GPack.hbox () in
+ let columns = new GTree.column_list in
+ let command_col = columns#add GTree.Data.string in
+ let coq_col = columns#add GTree.Data.string in
+ let store = GTree.list_store columns
+ in
+(* populate the store *)
+ let _ = List.iter (fun (x,y) ->
+ let row = store#append () in
+ store#set ~row ~column:command_col x;
+ store#set ~row ~column:coq_col y)
+ l
+ in
+ let view = GTree.view ~model:store ~packing:hbox#pack () in
+
+ let renderer = GTree.cell_renderer_text () in
+ GtkText.Tag.set_property renderer (`EDITABLE true);
+ let first =
+ GTree.view_column ~title:"Coq Command to try"
+ ~renderer:(renderer,["text",command_col])
+ ()
+ in ignore (view#append_column first);
+ let second =
+ GTree.view_column ~title:"Coq Command to insert"
+ ~renderer:(renderer,["text",coq_col])
+ ()
+ in ignore (view#append_column second);
+
+ let vbox = GPack.button_box `VERTICAL ~packing:hbox#pack () in
+ let up = GButton.button ~label:"Up" ~packing:(vbox#pack ~expand:true ~fill:false) () in
+ let down = GButton.button ~label:"Down" ~packing:(vbox#pack ~expand:true ~fill:false) () in
+ let add = GButton.button ~label:"Add" ~packing:(vbox#pack ~expand:true ~fill:false) () in
+ let remove = GButton.button ~label:"Remove" ~packing:(vbox#pack ~expand:true ~fill:false) () in
+ hbox
+