+(* Guestfs Browser.
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+open Utils
+
+open Printf
+
+let license =
+ "\
+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.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
+
+let authors = [
+ "Richard W.M. Jones"
+]
+
+let logo =
+ let rec loop = function
+ | [] -> None
+ | filename :: rest ->
+ try Some (GdkPixbuf.from_file_at_size ~width:100 ~height:100 filename)
+ with _ -> loop rest
+ in
+ loop [Config.icondir ^ "/guestfs-browser.svg";
+ "guestfs-browser.svg"]
+
+let open_about_dialog w () =
+ let d = GWindow.about_dialog
+ ~name:"Guest filesystem browser"
+ ~version:Config.version
+ ?logo
+ ~authors
+ ~copyright:(utf8_copyright ^ " 2010-2011 Red Hat Inc.")
+ ~license
+ ~website:"http://people.redhat.com/~rjones/guestfs-browser/"
+ ~website_label:"Visit the guestfs-browser website"
+ ~modal:true
+ () in
+
+ ignore (d#run ());
+ d#destroy ()