Manage dialogs according to their scope.
[gn-sub.git] / src / GnomeSubtitles / Dialog / Unmanaged / ErrorDialog.cs
blobea3f500dfb87c8019f0e4d5cbfa297d50f95f5cb
1 /*
2 * This file is part of Gnome Subtitles.
3 * Copyright (C) 2007-2009 Pedro Castro
5 * Gnome Subtitles is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * Gnome Subtitles is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 using Gtk;
21 using Mono.Unix;
22 using System;
24 namespace GnomeSubtitles.Dialog.Unmanaged {
26 public abstract class ErrorDialog : MessageDialog {
28 /// <summary>Creates a new instance of the <see cref="ErrorDialog" /> class.</summary>
29 /// <remarks><see cref="SetText" /> can be used to set the dialog text, and <see cref="AddButtons" /> overriden to add buttons.</remarks>
30 public ErrorDialog () : base(MessageType.Error) {
33 public ErrorDialog (string primary, string secondary) : base(MessageType.Error, primary, secondary) {
37 #region Protected methods
39 protected string GetGeneralExceptionErrorMessage (Exception exception) {
40 return Catalog.GetString("An unknown error has occured. Please report a bug and include this error name:") + " \"" + exception.GetType() + "\".";
43 #endregion