X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=main.ml;h=82e4603fc2f91a142cf9ba0faee04f2e1017993e;hb=3b2348f5f4b770e3e7f886d851eeadc59bbd2357;hp=9a72113f8b660e53f94ebdc91918b2e60e90d400;hpb=b07102fda0034da5840a9f33bd6d404a195b8cc9;p=guestfs-browser.git diff --git a/main.ml b/main.ml index 9a72113..82e4603 100644 --- a/main.ml +++ b/main.ml @@ -20,8 +20,6 @@ open Printf open Utils -module G = Guestfs - (* Main. *) let () = let cli_request = Cmdline.command_line () in @@ -31,23 +29,19 @@ let () = *) if verbose () then ( debug "%s %s" Config.package Config.version; - let v = fst (Libvirt.get_version ()) in - debug "libvirt %d.%d.%d" - (v / 1_000_000) ((v / 1_000) mod 1_000) (v mod 1_000); - let g = G.create () in - let v = G.version g in - debug "libguestfs %Ld.%Ld.%Ld%s" - v.G.major v.G.minor v.G.release v.G.extra; - G.close g; + debug "libguestfs %s" (libguestfs_version_string ()); + debug "libvirt %s" (libvirt_version_string ()); ); - let ds = Window.open_main_window () in - Slave.set_failure_hook (Window.failure ds); - Slave.set_busy_hook ds.Window.throbber_busy; - Slave.set_idle_hook ds.Window.throbber_idle; + let ws = Window.open_main_window () in + Slave.set_failure_hook (Window.failure ws); + Slave.set_busy_hook (Window.throbber_busy ws); + Slave.set_idle_hook (Window.throbber_idle ws); + Slave.set_status_hook (Window.set_statusbar ws); + Slave.set_progress_hook (Window.progress ws); (* What did the user request on the command line? *) - Window.run_cli_request ds cli_request; + Window.run_cli_request ws cli_request; (* Run the main display thread. When this returns, the application * has been closed.