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
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
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.
20 public class YesNoCancelDialog : Hildon.Dialog {
22 public YesNoCancelDialog(Gtk.Widget parent, string title, string message, Gtk.ResponseType default_response) {
23 this.set_title(title);
24 this.set_parent(parent);
25 this.set_default_response(default_response);
26 construct_interface(message);
29 private void construct_interface(string message) {
30 this.add_button(Gtk.STOCK_YES, Gtk.ResponseType.YES);
31 this.add_button(Gtk.STOCK_NO, Gtk.ResponseType.NO);
32 this.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL);
34 Gtk.VBox control_area = (Gtk.VBox)this.get_content_area();
36 control_area.pack_start(new Gtk.Label(message), true, true, 4);