Clean up Spectrograph test file.
[dictix.git] / src / dix-preferences.vala
blob71953c7bb750f9ad4ffa4d962a7f8ca67aca4d74
1 /**
2 * Dictix / DixPreferences - dix-preferences.vala
4 * Copyright (C) Martin Blanchard 2011 <tinram@gmx.fr>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 using GLib;
23 using Gtk;
24 using Dix;
26 namespace Global {
27 private const string NOTIFICATION_POLICY = "show-recording-notification";
30 namespace Dictix {
31 public class Preferences : Dialog {
32 public Preferences (Builder builder) {
33 Alignment preferences_alignment = null;
34 Box content_area = null;
36 this.set_resizable (false);
37 this.set_border_width (5);
38 this.add_button (Stock.CLOSE, ResponseType.CLOSE);
39 this.set_default_response (ResponseType.CLOSE);
40 this.delete_event.connect (hide_on_delete);
41 this.response.connect (on_response_cb);
43 content_area = this.get_content_area () as Box;
44 preferences_alignment = builder.get_object ("preferences-alignment") as Alignment;
45 content_area.add (preferences_alignment as Widget);
48 public void on_response_cb (int response) {
49 switch (response) {
50 case ResponseType.CLOSE: {
51 this.hide ();
53 break;
54 } default : {
55 break;