summaryrefslogtreecommitdiffstats
path: root/virt-ctrl/vc_mainwindow.ml
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2008-02-16 19:16:50 +0000
committerRichard W.M. Jones <rjones@redhat.com>2008-02-16 19:16:50 +0000
commit430d646f23385cff10f3cfe359f27226f42cf01a (patch)
tree8b9ec70e4e99c2489bfb9afc6fbd0130c6e2e061 /virt-ctrl/vc_mainwindow.ml
parent41f706134365c43ab79dc0383965df267eece0e2 (diff)
downloadvirt-top-430d646f23385cff10f3cfe359f27226f42cf01a.tar.gz
virt-top-430d646f23385cff10f3cfe359f27226f42cf01a.tar.xz
virt-top-430d646f23385cff10f3cfe359f27226f42cf01a.zip
Combine historical data, provide accessor functions.
- Historical data combined into a single array of dhentrys. - Provide accessor functions. - Clamp %CPU to 0..100.
Diffstat (limited to 'virt-ctrl/vc_mainwindow.ml')
-rw-r--r--virt-ctrl/vc_mainwindow.ml13
1 files changed, 11 insertions, 2 deletions
diff --git a/virt-ctrl/vc_mainwindow.ml b/virt-ctrl/vc_mainwindow.ml
index 4fd82c9..b8ec4db 100644
--- a/virt-ctrl/vc_mainwindow.ml
+++ b/virt-ctrl/vc_mainwindow.ml
@@ -61,7 +61,8 @@ let () =
GToolbox.message_box ~title ~icon label
let make ~open_connection
- ~start_domain ~pause_domain ~resume_domain ~shutdown_domain =
+ ~start_domain ~pause_domain ~resume_domain ~shutdown_domain
+ ~open_domain_details =
(* Create the main window. *)
let window = GWindow.window ~width:800 ~height:600 ~title () in
let vbox = GPack.vbox ~packing:window#add () in
@@ -94,6 +95,11 @@ let make ~open_connection
let connect_button =
GButton.tool_button ~label:"Connect ..." ~stock:`CONNECT
~packing:toolbar#insert () in
+ ignore (GButton.separator_tool_item ~packing:toolbar#insert ());
+ let open_button =
+ GButton.tool_button ~label:"Details" ~stock:`OPEN
+ ~packing:toolbar#insert () in
+ ignore (GButton.separator_tool_item ~packing:toolbar#insert ());
let start_button =
GButton.tool_button ~label:"Start" ~stock:`ADD
~packing:toolbar#insert () in
@@ -106,13 +112,16 @@ let make ~open_connection
let shutdown_button =
GButton.tool_button ~label:"Shutdown" ~stock:`STOP
~packing:toolbar#insert () in
- ignore (connect_button#connect#clicked ~callback:open_connection);
(* The treeview. *)
let (tree, model, columns, initial_state) =
Vc_connections.make_treeview
~packing:(vbox#pack ~expand:true ~fill:true) () in
+ (* Set callbacks for the buttons. *)
+ ignore (connect_button#connect#clicked ~callback:open_connection);
+ ignore (open_button#connect#clicked
+ ~callback:(open_domain_details tree model columns));
ignore (start_button#connect#clicked
~callback:(start_domain tree model columns));
ignore (pause_button#connect#clicked