aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnarboux2008-06-03 15:42:51 +0000
committerjnarboux2008-06-03 15:42:51 +0000
commit85719a109d74e02afee43358cf5824da2b6a54a8 (patch)
tree82ff419d14b65e245c816cf7dd83fd35e8f228a6
parent51a20e2ce39a43469f86b3e8ce642f0c7687e693 (diff)
improve name, size and position of detached windows
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11044 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--ide/coqide.ml41
1 files changed, 38 insertions, 3 deletions
diff --git a/ide/coqide.ml b/ide/coqide.ml
index c8a38b7789..a0ea025239 100644
--- a/ide/coqide.ml
+++ b/ide/coqide.ml
@@ -3099,7 +3099,14 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S);
let nb = notebook () in
if nb#misc#toplevel#get_oid=w#coerce#get_oid then
begin
- let nw = GWindow.window ~show:true () in
+ let nw = GWindow.window
+ ~width:(!current.window_width*2/3)
+ ~height:(!current.window_height*2/3)
+ ~position:`CENTER
+ ~wm_name:"CoqIDE"
+ ~wm_class:"CoqIDE"
+ ~title:"Script"
+ ~show:true () in
let parent = Option.get nb#misc#parent in
ignore (nw#connect#destroy
~callback:
@@ -3109,6 +3116,33 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S);
end
)))
in
+(* let _ = configuration_factory#add_item
+ "Detach _Command Pane"
+ ~callback:
+ (do_if_not_computing "detach command pane" (sync
+ (fun () ->
+ let command_object = Command_windows.command_window() in
+ let queries_frame = command_object#frame in
+ if queries_frame#misc#toplevel#get_oid=w#coerce#get_oid then
+ begin
+ let nw = GWindow.window
+ ~width:(!current.window_width*2/3)
+ ~height:(!current.window_height*2/3)
+ ~wm_name:"CoqIDE"
+ ~wm_class:"CoqIDE"
+ ~position:`CENTER
+ ~title:"Queries"
+ ~show:true () in
+ let parent = Option.get queries_frame#misc#parent in
+ ignore (nw#connect#destroy
+ ~callback:
+ (fun () -> queries_frame#misc#reparent parent));
+ queries_frame#misc#show();
+ queries_frame#misc#reparent nw#coerce
+ end
+ )))
+ in
+*)
let _ =
configuration_factory#add_item
"Detach _View"
@@ -3118,8 +3152,9 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S);
match get_current_view () with
| {view=v;analyzed_view=Some av} ->
let w = GWindow.window ~show:true
- ~width:(!current.window_width/2)
- ~height:(!current.window_height)
+ ~width:(!current.window_width*2/3)
+ ~height:(!current.window_height*2/3)
+ ~position:`CENTER
~title:(match av#filename with
| None -> "*Unnamed*"
| Some f -> f)