Added About Dialog
[demorecorder] / src / AboutDialog.vala
1 /*  Demo Recorder for MAEMO 5
2 *   Copyright (C) 2010 Dru Moore <usr@dru-id.co.uk>
3 *   This program is free software; you can redistribute it and/or modify
4 *   it under the terms of the GNU General Public License version 2,
5 *   or (at your option) any later version, as published by the Free
6 *   Software Foundation
7 *
8 *   This program is distributed in the hope that it will be useful,
9 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
10 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 *   GNU General Public License for more details
12 *
13 *   You should have received a copy of the GNU General Public
14 *   License along with this program; if not, write to the
15 *   Free Software Foundation, Inc.,
16 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 */
18 namespace IdWorks {
19
20 public class AboutDialog : Hildon.Dialog {
21
22   public AboutDialog(Gtk.Widget parent) {
23     this.set_title("Demo Recorder");
24     this.set_parent(parent);
25     this.set_default_response(Gtk.ResponseType.OK);
26     construct_interface();
27   }
28   
29   private void construct_interface() {
30     this.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK);
31     
32     Gtk.VBox control_area = (Gtk.VBox)this.get_content_area();
33     string text = "Demo Recorder, (c)2010 Dru Moore usr@dru-id.co.uk\n\nhttp://demorecorder.garage.maemo.org/\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, or (at your option) any later version, as published by the Free Software Foundation";
34     Gtk.Label aboutText = new Gtk.Label(text);
35     aboutText.set_line_wrap(true);
36     
37     control_area.pack_start(aboutText, true, true, 4);
38     
39     this.show_all();
40   }
41
42 }
43
44 }