[mistelix] Fixes issue #582345, description of the extensions, and non-existing filter



commit 17d9612526dc3229aeaef16d4917034406fd81de
Author: Jordi Mas <jmas softcatala org>
Date:   Thu May 14 19:17:45 2009 +0200

    Fixes issue #582345, description of the extensions, and non-existing filter
---
 .../SlideTransitions/BarWipe/BarWipe.addin.xml     |    4 ++--
 extensions/SlideTransitions/Fade/Fade.addin.xml    |    2 +-
 src/dialogs/AddVideoDialog.cs                      |    9 +++++++++
 src/mistelix.glade                                 |    2 +-
 src/widgets/BrowseFile.cs                          |    8 +++++---
 5 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/extensions/SlideTransitions/BarWipe/BarWipe.addin.xml b/extensions/SlideTransitions/BarWipe/BarWipe.addin.xml
index a049483..46188d3 100644
--- a/extensions/SlideTransitions/BarWipe/BarWipe.addin.xml
+++ b/extensions/SlideTransitions/BarWipe/BarWipe.addin.xml
@@ -1,7 +1,7 @@
 <Addin namespace="Mistelix"
 	version="0.10"
-	name="Opaque Lines"
-	description="Opaque Lines SlideShow"
+	name="BarWipe"
+	description="BarWipe slideshow transitions"
 	author="Jordi Mas"
 	url=""
 	defaultEnabled="true"
diff --git a/extensions/SlideTransitions/Fade/Fade.addin.xml b/extensions/SlideTransitions/Fade/Fade.addin.xml
index 9247818..c8cb120 100644
--- a/extensions/SlideTransitions/Fade/Fade.addin.xml
+++ b/extensions/SlideTransitions/Fade/Fade.addin.xml
@@ -1,7 +1,7 @@
 <Addin namespace="Mistelix"
 	version="0.10"
 	name="Fade"
-	description="Fade SlideShow"
+	description="Fade slideshow transition"
 	author="Jordi Mas"
 	url=""
 	defaultEnabled="true"
diff --git a/src/dialogs/AddVideoDialog.cs b/src/dialogs/AddVideoDialog.cs
index b1c2d6c..ebf0b36 100644
--- a/src/dialogs/AddVideoDialog.cs
+++ b/src/dialogs/AddVideoDialog.cs
@@ -41,6 +41,7 @@ namespace Mistelix.Dialogs
 		[Glade.Widget ("scrolledwindow_files")] Gtk.ScrolledWindow scrolledwin_files;
 		[Glade.Widget ("vpaned_horizontal")] Gtk.VPaned hpaned;
 		[Glade.Widget] Gtk.VBox vbox_dir;
+		[Glade.Widget] Gtk.Button ok_button;
 		List <VideoProjectElement> videos;
 		
 		public AddVideoDialog () : base ("addvideo")
@@ -51,6 +52,9 @@ namespace Mistelix.Dialogs
 
 			scrolledwin_files.Add (file_view);
 			videos = new List <VideoProjectElement> ();
+	
+			file_view.SelectionChanged += OnCursorChanged;
+			ok_button.Sensitive = false;
 
 			file_view.ShowAll ();
 			hpaned.Position = 300; // H (right)
@@ -89,5 +93,10 @@ namespace Mistelix.Dialogs
 		{
 			file_view.OnDirChanged (args.Directory);
 		}
+  
+		void OnCursorChanged (object obj, EventArgs e)
+		{
+			ok_button.Sensitive = (file_view.SelectedFiles.Count > 0);
+		} 
 	}
 }
diff --git a/src/mistelix.glade b/src/mistelix.glade
index 9f55756..cb4803f 100644
--- a/src/mistelix.glade
+++ b/src/mistelix.glade
@@ -1068,7 +1068,7 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkButton" id="ok">
+	    <widget class="GtkButton" id="ok_button">
 	      <property name="visible">True</property>
 	      <property name="can_default">True</property>
 	      <property name="can_focus">True</property>
diff --git a/src/widgets/BrowseFile.cs b/src/widgets/BrowseFile.cs
index 6322413..ed0ce6f 100644
--- a/src/widgets/BrowseFile.cs
+++ b/src/widgets/BrowseFile.cs
@@ -100,9 +100,11 @@ namespace Mistelix.Widgets
 			chooser_dialog.AddButton (Stock.Open, ResponseType.Ok);
 			chooser_dialog.DefaultResponse = ResponseType.Ok;
 			chooser_dialog.LocalOnly = false;
-	
-			foreach (Gtk.FileFilter filter in filters)
-				chooser_dialog.AddFilter (filter);
+
+			if (filters != null) {
+				foreach (Gtk.FileFilter filter in filters)
+					chooser_dialog.AddFilter (filter);
+			}
 
 			if (chooser_dialog.Run () == (int) ResponseType.Ok) {
 				filename.Text = chooser_dialog.Filename;



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