[longomatch] Enable shortcuts for the playlist too



commit a9e19a4e4b64dd857311d2ba0be97894a152c70a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Oct 29 20:07:15 2010 +0200

    Enable shortcuts for the playlist too

 CesarPlayer/Gui/PlayerBin.cs                |    4 ++++
 LongoMatch/Gui/Component/PlayListWidget.cs  |    6 ++++++
 LongoMatch/Gui/MainWindow.cs                |    5 +++--
 LongoMatch/Gui/TreeView/PlayListTreeView.cs |    5 +++++
 4 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/CesarPlayer/Gui/PlayerBin.cs b/CesarPlayer/Gui/PlayerBin.cs
index 60f2425..7a99fc7 100644
--- a/CesarPlayer/Gui/PlayerBin.cs
+++ b/CesarPlayer/Gui/PlayerBin.cs
@@ -152,6 +152,10 @@ namespace LongoMatch.Gui
 			set{player.ExpandLogo = value;}
 		}
 		
+		public bool Opened {
+		    get{return filename != null;}
+		}
+			
 		public Widget VideoWidget{
 			get{return ((Gtk.EventBox)player);}
 		}
diff --git a/LongoMatch/Gui/Component/PlayListWidget.cs b/LongoMatch/Gui/Component/PlayListWidget.cs
index 43d41ad..e19927f 100644
--- a/LongoMatch/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch/Gui/Component/PlayListWidget.cs
@@ -65,6 +65,12 @@ namespace LongoMatch.Gui.Component
 			playlisttreeview1.RowActivated += OnPlaylisttreeview1RowActivated;
 			playlisttreeview1.ApplyCurrentRate += OnApplyRate;
 			savebutton.Sensitive = false;
+			
+			newbutton.CanFocus = false;
+			openbutton.CanFocus = false;
+			savebutton.CanFocus = false;
+			newvideobutton.CanFocus = false;
+			closebutton.CanFocus = false;
 		}
 
 		public void SetPlayer(PlayerBin player) {
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 1889cf4..5fb850f 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -544,10 +544,11 @@ namespace LongoMatch.Gui
 			
 			ret = base.OnKeyPressEvent(evnt);
 
-			if (openedProject == null)
+			if (openedProject == null && !playerbin1.Opened)
 				return ret;
 			
-			if (projectType == ProjectType.FileProject){
+			if (projectType != ProjectType.CaptureProject &&
+			    projectType != ProjectType.FakeCaptureProject){
 				switch (key){
 					case Constants.SEEK_FORWARD:
 						if (modifier == Constants.STEP)
diff --git a/LongoMatch/Gui/TreeView/PlayListTreeView.cs b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
index a9c2b55..824d248 100644
--- a/LongoMatch/Gui/TreeView/PlayListTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
@@ -149,5 +149,10 @@ namespace LongoMatch.Gui.Component
 				(cell as Gtk.CellRendererText).Foreground = "black";
 
 		}
+
+		protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
+		{
+			return false;
+		}		
 	}
 }



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