1
(**************************************************************************)
3
(* This file is part of Frama-C. *)
5
(* Copyright (C) 2007-2008 *)
6
(* CEA (Commissariat � l'�nergie Atomique) *)
8
(* you can redistribute it and/or modify it under the terms of the GNU *)
9
(* Lesser General Public License as published by the Free Software *)
10
(* Foundation, version 2.1. *)
12
(* It is distributed in the hope that it will be useful, *)
13
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
14
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
15
(* GNU Lesser General Public License for more details. *)
17
(* See the GNU Lesser General Public License version 2.1 *)
18
(* for more details (enclosed in the file licenses/LGPLv2.1). *)
20
(**************************************************************************)
26
~authors:["Patrick Baudin" ;
28
"Jean-Christophe Filliâtre";
36
~copyright:"Copyright: CEA for value analysis plugin and GUI\n\tCEA/INRIA for the Frama-C kernel\n\tINRIA for the Jessie plugin"
37
~license:"Frama-C kernel is under LGPL v2
39
Ocamlgraph is under LGPL v2
40
Analysis plugins are LGPL v2.1"
41
~website:"http://frama-c.cea.fr/"
42
~website_label:"Questions and support"
43
(* [JS 6 October 2008] the following line breaks compilation, of course.
45
~version:(Version.version^" compiled on "^Version.date)
48
(* Buggy labgtk2 prevents this from working...*)
50
(dialog#connect#response
51
~callback:(fun _ -> try
52
dialog#coerce#destroy ()
53
with Not_found -> ()));
55
ignore (dialog#run ())
56
with Not_found | Failure "dialog destroyed" -> (* raised because of a buggy lablgtk2 *)
59
(** Register this dialog in main window menu bar *)
61
Design.register_extension
63
GAction.add_actions window#actions
64
[GAction.add_action "About" ~stock:`ABOUT ~accel:"<control>A"
66
~callback:(fun _-> show ());
67
GAction.add_action "HelpMenu" ~label:"_Help";];
69
"<ui><menubar name='MenuBar'>
70
<menu action='HelpMenu'>
71
<menuitem action='About'/>
75
let _ = window#ui_manager#add_ui_from_string location in
76
let help_item = window#ui_manager#get_widget "/MenuBar/HelpMenu" in
77
let help_item = GtkMenu.MenuItem.cast help_item#as_widget in
78
GtkMenu.MenuItem.set_right_justified help_item true)