Commit 1717f0a4 authored by Pedro Castro's avatar Pedro Castro

File Open/Save error dialogs: set "Save" as default action

Fixes #132: File Open/Save error dialogs have wrong action set as
default
parent 651daa4e
......@@ -147,21 +147,20 @@
<Compile Include="src\GnomeSubtitles\Dialog\EncodingsDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\FilePropertiesDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\FileTranslationOpenDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\MessageDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\PreferencesDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\SearchDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\TimingsAdjustDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\TimingsShiftDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\TimingsSynchronizeDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\VideoSeekToDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\BasicErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\ErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\FileOpenErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\FileSaveErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\SaveConfirmationDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\SubtitleFileOpenErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\VideoErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Unmanaged\WarningDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\BasicErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\ErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\FileOpenErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\FileSaveErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\SaveConfirmationDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\SubtitleFileOpenErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\VideoErrorDialog.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\WarningDialog.cs" />
<Compile Include="src\GnomeSubtitles\Execution\AssemblyInfo.cs" />
<Compile Include="src\GnomeSubtitles\Execution\BugReporter.cs" />
<Compile Include="src\GnomeSubtitles\Execution\Executable.cs" />
......@@ -280,6 +279,7 @@
<Compile Include="src\GnomeSubtitles\Core\ConfigBackendUnavailableException.cs" />
<Compile Include="src\GnomeSubtitles\Core\ConfigBackendInMemory.cs" />
<Compile Include="src\External\GtkSpell\SpellChecker.cs" />
<Compile Include="src\GnomeSubtitles\Dialog\Message\MessageDialog.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
......
......@@ -18,7 +18,7 @@
// */
//using GnomeSubtitles.Dialog;
//using GnomeSubtitles.Dialog.Unmanaged;
//using GnomeSubtitles.Dialog.Message;
//using GnomeSubtitles.Ui.Edit;
//using Gtk;
//using Mono.Unix;
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2008-2009 Pedro Castro
* Copyright (C) 2008-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -18,10 +18,8 @@
*/
using Gtk;
using Mono.Unix;
using System;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public class BasicErrorDialog : ErrorDialog {
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2007-2009 Pedro Castro
* Copyright (C) 2007-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -21,7 +21,7 @@ using Gtk;
using Mono.Unix;
using System;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public abstract class ErrorDialog : MessageDialog {
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2006-2017 Pedro Castro
* Copyright (C) 2006-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,7 +22,7 @@ using Mono.Unix;
using SubLib.Util;
using System;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public abstract class FileOpenErrorDialog : ErrorDialog {
......@@ -47,6 +47,8 @@ public abstract class FileOpenErrorDialog : ErrorDialog {
Button actionButton = dialog.AddButton(actionLabel, ResponseType.Accept) as Button;
actionButton.Image = new Image(Stock.Open, IconSize.Button);
dialog.AddButton(Stock.Ok, ResponseType.Ok);
dialog.DefaultResponse = ResponseType.Accept;
}
protected virtual string GetPrimaryText (string filename) {
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2007-2017 Pedro Castro
* Copyright (C) 2007-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -19,13 +19,12 @@
using Gtk;
using Mono.Unix;
using SubLib;
using System;
using System.IO;
using System.Security;
using SubLib.Util;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public class FileSaveErrorDialog : ErrorDialog {
......@@ -47,6 +46,8 @@ public class FileSaveErrorDialog : ErrorDialog {
Button actionButton = dialog.AddButton(actionLabel, ResponseType.Accept) as Button;
actionButton.Image = new Image(Stock.Save, IconSize.Button);
dialog.AddButton(Stock.Ok, ResponseType.Ok);
dialog.DefaultResponse = ResponseType.Accept;
}
/* Private methods */
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2008-2010 Pedro Castro
* Copyright (C) 2008-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -19,9 +19,8 @@
using GnomeSubtitles.Core;
using Gtk;
using System;
namespace GnomeSubtitles.Dialog {
namespace GnomeSubtitles.Dialog.Message {
public abstract class MessageDialog : BaseDialog {
protected Gtk.MessageDialog dialog = null;
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2006-2010 Pedro Castro
* Copyright (C) 2006-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,7 +23,7 @@ using Mono.Unix;
using SubLib.Core.Domain;
using System;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public abstract class SaveConfirmationDialog : WarningDialog {
private SubtitleTextType textType;
......@@ -58,6 +58,8 @@ public abstract class SaveConfirmationDialog : WarningDialog {
dialog.AddButton(rejectLabel, ResponseType.Reject);
dialog.AddButton(Stock.Cancel, ResponseType.Cancel);
dialog.AddButton(Stock.Save, ResponseType.Accept);
dialog.DefaultResponse = ResponseType.Accept;
}
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2006-2009,2011 Pedro Castro
* Copyright (C) 2006-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,7 +23,7 @@ using System;
using System.IO;
using System.Security;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public class SubtitleFileOpenErrorDialog : FileOpenErrorDialog {
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2007-2017 Pedro Castro
* Copyright (C) 2007-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,7 +22,7 @@ using Mono.Unix;
using System;
using SubLib.Util;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public class VideoErrorDialog : FileOpenErrorDialog {
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2008-2009 Pedro Castro
* Copyright (C) 2008-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -18,10 +18,8 @@
*/
using Gtk;
using Mono.Unix;
using System;
namespace GnomeSubtitles.Dialog.Unmanaged {
namespace GnomeSubtitles.Dialog.Message {
public abstract class WarningDialog : MessageDialog {
......
......@@ -18,7 +18,7 @@
*/
using GnomeSubtitles.Core;
//using GnomeSubtitles.Dialog.Unmanaged;
//using GnomeSubtitles.Dialog.Message;
//using Mono.Unix;
using SubLib.Util;
using System;
......
/*
* This file is part of Gnome Subtitles.
* Copyright (C) 2006-2018 Pedro Castro
* Copyright (C) 2006-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -18,21 +18,18 @@
*/
using GnomeSubtitles.Core;
using GnomeSubtitles.Core.Command;
using GnomeSubtitles.Dialog;
using GnomeSubtitles.Dialog.Unmanaged;
using GnomeSubtitles.Dialog.Message;
using GnomeSubtitles.Ui.Edit;
using GnomeSubtitles.Ui.VideoPreview;
using GnomeSubtitles.Ui.View;
using Gtk;
using Mono.Unix;
using SubLib.Core.Domain;
using SubLib.Exceptions;
using SubLib.Util;
using System;
using System.IO;
using System.Text;
using System.Reflection;
namespace GnomeSubtitles.Ui {
......
......@@ -19,7 +19,7 @@
using Gdk;
using GnomeSubtitles.Core;
using GnomeSubtitles.Dialog.Unmanaged;
using GnomeSubtitles.Dialog.Message;
using Gtk;
using GStreamer;
using SubLib.Core.Domain;
......
......@@ -25,7 +25,7 @@ GSSOURCES = \
$(srcdir)/GnomeSubtitles/Core/*.cs \
$(srcdir)/GnomeSubtitles/Core/Command/*.cs \
$(srcdir)/GnomeSubtitles/Dialog/*.cs \
$(srcdir)/GnomeSubtitles/Dialog/Unmanaged/*.cs \
$(srcdir)/GnomeSubtitles/Dialog/Message/*.cs \
$(srcdir)/GnomeSubtitles/Execution/*.cs \
$(srcdir)/GnomeSubtitles/Ui/*.cs \
$(srcdir)/GnomeSubtitles/Ui/Component/*.cs \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment