lablgtk2 | | | | R | O
| | | | |
ocaml-dbus | | | | O |
+ | | | | >= 0.04 |
--------------+----------+---------+---------+----------+---------
NSIS | | | | | O
--------------+----------+---------+---------+----------+---------
vc_domain_ops.cmi: vc_connections.cmi
vc_helpers.cmi: ../libvirt/libvirt.cmi
vc_mainwindow.cmi: vc_domain_ops.cmi
+vc_connection_dlg.cmo: vc_connections.cmi vc_connection_dlg.cmi
+vc_connection_dlg.cmx: vc_connections.cmx vc_connection_dlg.cmi
vc_connections.cmo: vc_helpers.cmi ../libvirt/libvirt.cmi vc_connections.cmi
vc_connections.cmx: vc_helpers.cmx ../libvirt/libvirt.cmx vc_connections.cmi
vc_domain_ops.cmo: vc_connections.cmi ../libvirt/libvirt.cmi \
vc_domain_ops.cmi
vc_helpers.cmo: ../libvirt/libvirt.cmi vc_helpers.cmi
vc_helpers.cmx: ../libvirt/libvirt.cmx vc_helpers.cmi
-vc_mainwindow.cmo: vc_connections.cmi ../libvirt/libvirt.cmi \
- vc_mainwindow.cmi
-vc_mainwindow.cmx: vc_connections.cmx ../libvirt/libvirt.cmx \
- vc_mainwindow.cmi
+vc_mainwindow.cmo: vc_connections.cmi vc_connection_dlg.cmi \
+ ../libvirt/libvirt.cmi vc_mainwindow.cmi
+vc_mainwindow.cmx: vc_connections.cmx vc_connection_dlg.cmx \
+ ../libvirt/libvirt.cmx vc_mainwindow.cmi
virt_ctrl.cmo: vc_mainwindow.cmi vc_domain_ops.cmi
virt_ctrl.cmx: vc_mainwindow.cmx vc_domain_ops.cmx
vc_helpers.cmo \
vc_connections.cmo \
vc_domain_ops.cmo \
+ vc_connection_dlg.cmo \
vc_mainwindow.cmo
ifneq ($(OCAMLFIND),)
--- /dev/null
+(* virt-ctrl: A graphical management tool.
+ (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc.
+ http://libvirt.org/
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*)
+
+(* Open connection dialog.
+ * This should be a lot more sophisticated. XXX
+ *)
+let open_connection () =
+ let title = "Open connection to hypervisor" in
+ let uri =
+ GToolbox.input_string ~title ~text:"xen:///" ~ok:"Open" "Connection:" in
+ match uri with
+ | None -> ()
+ | Some uri -> Vc_connections.open_connection uri
--- /dev/null
+(* virt-ctrl: A graphical management tool.
+ (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc.
+ http://libvirt.org/
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ Make the main window.
+*)
+
+(** The connection dialog. *)
+val open_connection : unit -> unit
icon#set_icon_size `DIALOG;
GToolbox.message_box ~title ~icon label
-(* Open connection dialog.
- * This should be a lot more sophisticated. XXX
- *)
-let open_connection () =
- let title = "Open connection to hypervisor" in
- let uri =
- GToolbox.input_string ~title ~text:"xen:///" ~ok:"Open" "Connection:" in
- match uri with
- | None -> ()
- | Some uri -> Vc_connections.open_connection uri
-
let make
~start_domain ~pause_domain ~resume_domain ~shutdown_domain
~open_domain_details =
ignore (factory#add_separator ());
let quit_item = factory#add_item "Quit" ~key:GdkKeysyms._Q in
- ignore (open_item#connect#activate ~callback:open_connection);
+ ignore (open_item#connect#activate
+ ~callback:Vc_connection_dlg.open_connection);
(* Help menu. *)
let factory = new GMenu.factory help_menu ~accel_group in
~packing:(vbox#pack ~expand:true ~fill:true) () in
(* Set callbacks for the buttons. *)
- ignore (connect_button#connect#clicked ~callback:open_connection);
+ ignore (connect_button#connect#clicked
+ ~callback:Vc_connection_dlg.open_connection);
ignore (open_button#connect#clicked
~callback:(open_domain_details tree model columns));
ignore (start_button#connect#clicked