-open Utils
-
-(* Display state. *)
-type display_state = {
- window : GWindow.window;
- throbber_busy : unit -> unit;
- throbber_idle : unit -> unit;
-}
-
-let open_main_window () =
- let title = "Guest Filesystem Browser" in
- let window = GWindow.window ~width:800 ~height:600 ~title () in
- let vbox = GPack.vbox ~packing:window#add () in
-
- (* Do the menus. *)
- let menubar = GMenu.menu_bar ~packing:vbox#pack () in
- let factory = new GMenu.factory menubar in
- let accel_group = factory#accel_group in
- let connect_menu = factory#add_submenu "_Connect" in
-
- let factory = new GMenu.factory connect_menu ~accel_group in
- let quit_item = factory#add_item "E_xit" ~key:GdkKeysyms._Q in
-
- (* Quit. *)
- let quit _ = GMain.quit (); false in
- ignore (window#connect#destroy ~callback:GMain.quit);
- ignore (window#event#connect#delete ~callback:quit);
- ignore (quit_item#connect#activate
- ~callback:(fun () -> ignore (quit ()); ()));