[longomatch] Dont allow editing the hotkey with a project loaded



commit 5fc771d9829ff9f9e7032a1a724367de4ccfc34f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Jan 27 21:17:26 2012 +0100

    Dont allow editing the hotkey with a project loaded

 LongoMatch.GUI/Gui/Component/CategoryProperties.cs |    7 +++++++
 LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs    |    1 +
 .../LongoMatch.Gui.Component.CategoryProperties.cs |    1 +
 LongoMatch.GUI/gtk-gui/gui.stetic                  |    1 +
 4 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index 38c2976..7f4c914 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -56,6 +56,13 @@ namespace LongoMatch.Gui.Component
 			lagtimebutton.ValueChanged += OnLagTimeChanged;
 		}
 		
+		public bool CanChangeHotkey {
+			set {
+				if (value == true)
+					changebuton.Sensitive = true;
+			}
+		}
+		
 		public void LoadSubcategories(ITemplatesService ts) {
 			subcategoriesProvider = ts.SubCategoriesTemplateProvider;
 			LoadSubcategories(ts.PlayerSubcategories);
diff --git a/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs b/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
index f2f296b..d8dfdaa 100644
--- a/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
@@ -59,6 +59,7 @@ namespace LongoMatch.Gui.Dialog
 		public List<HotKey> HotKeysList {
 			set {
 				hkList = value;
+				timenodeproperties2.CanChangeHotkey = hkList != null;
 			}
 		}
 
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index 08c045d..3883825 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -89,6 +89,7 @@ namespace LongoMatch.Gui.Component
 			w2.Fill = false;
 			// Container child hbox5.Gtk.Box+BoxChild
 			this.changebuton = new global::Gtk.Button ();
+			this.changebuton.Sensitive = false;
 			this.changebuton.CanFocus = true;
 			this.changebuton.Name = "changebuton";
 			this.changebuton.UseUnderline = true;
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 723880c..9aadca6 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -2185,6 +2185,7 @@
                         <child>
                           <widget class="Gtk.Button" id="changebuton">
                             <property name="MemberName" />
+                            <property name="Sensitive">False</property>
                             <property name="CanFocus">True</property>
                             <property name="Type">TextOnly</property>
                             <property name="Label" translatable="yes">Change</property>



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