[mistelix/stable] Fixes audio selection



commit 2b32232902ff3520518214eb8ed82f950b6a3ca4
Author: Jordi Mas <jmas softcatala org>
Date:   Sat Jun 27 13:58:06 2009 +0200

    Fixes audio selection

 src/dialogs/AddSlideDialog.cs |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/dialogs/AddSlideDialog.cs b/src/dialogs/AddSlideDialog.cs
index 28858ad..88b2f27 100644
--- a/src/dialogs/AddSlideDialog.cs
+++ b/src/dialogs/AddSlideDialog.cs
@@ -54,7 +54,6 @@ namespace Mistelix.Dialogs
 		TransitionPreview drawing_area;
 		bool edit_mode;
 		string audiofile;
-		bool no_audio;
 		Project project;
 		const int COL_DISPLAYNAME = 0;
 
@@ -133,13 +132,7 @@ namespace Mistelix.Dialogs
 				bool more;
 				SlideImage image;
 				more = image_view.Model.GetIterFirst (out iter);
-
-				if (no_audio)
-					slide.AudioFile = string.Empty;
-				else {
-					if (audiofile != null)
-						slide.AudioFile = audiofile;
-				}
+				slide.AudioFile = audiofile;
 				
 				while (more)
 				{
@@ -153,6 +146,7 @@ namespace Mistelix.Dialogs
 			set {
 				slide = value;
 				image_view.LoadSlideShow (value);
+				audiofile = slide.AudioFile;
 				edit_mode = true;
 			}
 		}
@@ -408,13 +402,10 @@ namespace Mistelix.Dialogs
 		void OnButtonAudio (object sender, EventArgs args)
 		{
 			AudioSelectionDialog dialog = new AudioSelectionDialog ();
-
-			if (slide != null)
-				dialog.Filename = slide.AudioFile;
+			dialog.Filename = audiofile;
 
 			if (dialog.Run () == ResponseType.Ok) {
 				audiofile = dialog.Filename;
-				no_audio = dialog.NoAudio;
 			}
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]