[longomatch] Fix exception when no output files are selected
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix exception when no output files are selected
- Date: Wed, 5 Nov 2014 19:00:29 +0000 (UTC)
commit daa924cddc80ef53192bc814dd2e6b3b8951c6fa
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Oct 29 20:11:53 2014 +0100
Fix exception when no output files are selected
.../Gui/Dialog/VideoEditionProperties.cs | 13 +++++++------
...LongoMatch.Gui.Dialog.VideoEditionProperties.cs | 3 +--
LongoMatch.GUI/gtk-gui/gui.stetic | 3 +--
3 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
index 6126821..e35d70f 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
@@ -103,12 +103,13 @@ namespace LongoMatch.Gui.Dialog
encSettings.EnableAudio = audiocheckbutton.Active;
encSettings.EnableTitle = descriptioncheckbutton.Active;
- Hide ();
- }
-
- protected virtual void OnButtonCancelClicked (object sender, System.EventArgs e)
- {
- this.Destroy ();
+ if (!SplitFiles && String.IsNullOrEmpty (EncodingSettings.OutputFile)) {
+ Config.GUIToolkit.WarningMessage (Catalog.GetString ("Please, select a video
file."));
+ } else if (SplitFiles && String.IsNullOrEmpty (OutputDir)) {
+ Config.GUIToolkit.WarningMessage (Catalog.GetString ("Please, select an
output directory."));
+ } else {
+ Respond (ResponseType.Ok);
+ }
}
protected void OnSplitfilesbuttonClicked (object sender, System.EventArgs e)
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs
index 7191f53..e1c88af 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs
@@ -241,7 +241,7 @@ namespace LongoMatch.Gui.Dialog
this.buttonOk.UseStock = true;
this.buttonOk.UseUnderline = true;
this.buttonOk.Label = "gtk-ok";
- this.AddActionWidget (this.buttonOk, -5);
+ w22.Add (this.buttonOk);
global::Gtk.ButtonBox.ButtonBoxChild w24 =
((global::Gtk.ButtonBox.ButtonBoxChild)(w22 [this.buttonOk]));
w24.Position = 1;
w24.Expand = false;
@@ -254,7 +254,6 @@ namespace LongoMatch.Gui.Dialog
this.dirbox.Hide ();
this.Show ();
this.splitfilesbutton.Clicked += new global::System.EventHandler
(this.OnSplitfilesbuttonClicked);
- this.buttonCancel.Clicked += new global::System.EventHandler
(this.OnButtonCancelClicked);
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
}
}
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index cc7d094..9f400cb 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -2428,7 +2428,6 @@ Away</property>
<property name="Type">StockItem</property>
<property name="StockId">gtk-cancel</property>
<property name="ResponseId">-6</property>
- <signal name="Clicked" handler="OnButtonCancelClicked" />
<property name="label">gtk-cancel</property>
</widget>
<packing>
@@ -2444,7 +2443,7 @@ Away</property>
<property name="UseStock">True</property>
<property name="Type">StockItem</property>
<property name="StockId">gtk-ok</property>
- <property name="ResponseId">-5</property>
+ <property name="ResponseId">-1</property>
<signal name="Clicked" handler="OnButtonOkClicked" />
<property name="label">gtk-ok</property>
</widget>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]