diff options
author | glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2007-04-16 12:12:39 +0000 |
---|---|---|
committer | glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2007-04-16 12:12:39 +0000 |
commit | ed4fc9fbbf6b0bc2e43d8116e19e563741464dca (patch) | |
tree | 3517f33a35c2c6fb23e9eada786360b31b5ba6ec /ide/coqide.ml | |
parent | 490fcaab846dc926c0945df6b0f8fb18c5bb0dd9 (diff) |
Add the possibility to change the position of tabs in main window (from r9717).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9774 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide/coqide.ml')
-rw-r--r-- | ide/coqide.ml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ide/coqide.ml b/ide/coqide.ml index a303ec6c4..25af11363 100644 --- a/ide/coqide.ml +++ b/ide/coqide.ml @@ -25,6 +25,16 @@ let (proof_view:GText.view option ref) = ref None let (_notebook:GPack.notebook option ref) = ref None let notebook () = out_some !_notebook + +let update_notebook_pos () = + let pos = + match !current.vertical_tabs, !current.opposite_tabs with + | false, false -> `TOP + | false, true -> `BOTTOM + | true , false -> `LEFT + | true , true -> `RIGHT + in + (notebook ())#set_tab_pos pos (* Tabs contain the name of the edited file and 2 status informations: Saved state + Focused proof buffer *) @@ -2453,7 +2463,7 @@ let main files = let _ = edit_f#add_item "_Preferences" - ~callback:(fun () -> configure ();reset_revert_timer ()) + ~callback:(fun () -> configure ~apply:update_notebook_pos (); reset_revert_timer ()) in (* let save_prefs_m = @@ -3051,6 +3061,7 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); _notebook := Some (GPack.notebook ~border_width:2 ~show_border:false ~scrollable:true ~packing:fr_notebook#add ()); + update_notebook_pos (); let nb = notebook () in let hb2 = GPack.paned `VERTICAL ~packing:hb#add2 () in let fr_a = GBin.frame ~shadow_type:`IN ~packing:hb2#add () in |