]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaGtkMisc.ml
version 0.7.1
[helm.git] / helm / matita / matitaGtkMisc.ml
index b0624241a8f140c11732a911cc2e960e8d508eb0..8a7048bbdf4cd7557213d78a064c9d2ee34385a2 100644 (file)
@@ -29,13 +29,6 @@ open Printf
 open MatitaTypes
 
 let wrap_callback f = f
-(*
-let wrap_callback f () =
-  try
-    f ()
-  with exn ->
-    MatitaLog.error (sprintf "Uncaught exception: %s" (Printexc.to_string exn))
-*)
 
 let connect_button (button: #GButton.button) callback =
   ignore (button#connect#clicked (wrap_callback callback))
@@ -202,7 +195,7 @@ let popup_message_lowlevel
       ?parent ~destroy_with_parent 
       ~title ~allow_grow ~allow_shrink ?icon ~modal ~resizable ?screen 
       ?type_hint ~position ?wm_name ?wm_class ?border_width ?width ?height 
-      ~show () 
+      ~show:false () 
   in
   let stock = 
     match message_type with
@@ -213,6 +206,7 @@ let popup_message_lowlevel
   in
   let image = GMisc.image ~stock ~icon_size:`DIALOG () in
   let label = GMisc.label ~markup:message () in
+  label#set_line_wrap true;
   let hbox = GPack.hbox ~spacing:10 () in
   hbox#pack ~from:`START ~expand:true ~fill:true (image:>GObj.widget);
   hbox#pack ~from:`START ~expand:true ~fill:true (label:>GObj.widget);
@@ -227,6 +221,8 @@ let popup_message_lowlevel
     ~callback:(fun a ->  GMain.Main.quit ();callback a));
   ignore(m#connect#close 
     ~callback:(fun _ -> GMain.Main.quit ();callback `POPUPCLOSED));
+  if show = true then 
+      m#show ();
   GtkThread.main ();
   m#destroy ()