[longomatch] Fix coding widget active widget selection



commit 1df557dd9c9863ba9f717d4dd735af875e62f663
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Oct 24 19:55:04 2014 +0200

    Fix coding widget active widget selection

 LongoMatch.GUI/Gui/Component/CodingWidget.cs |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/CodingWidget.cs b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
index 7b45949..d7a2337 100644
--- a/LongoMatch.GUI/Gui/Component/CodingWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
@@ -121,12 +121,15 @@ namespace LongoMatch.Gui.Component
                }
                
                public void ShowDashboard () {
+                       SelectPage (dashboardhpaned);
                }
 
                public void ShowTimeline () {
+                       SelectPage (timeline);
                }
                
                public void ShowZonalTags () {
+                       SelectPage (playspositionviewer1);
                }
 
                public void ClickButton (DashboardButton button)
@@ -186,6 +189,16 @@ namespace LongoMatch.Gui.Component
                        posAtiveIco = Helpers.Misc.LoadIcon ("longomatch-tab-active-position", s, f);
                }
 
+               void SelectPage (Widget widget)
+               {
+                       for (int i=0; i < notebook.NPages; i++) {
+                               if (notebook.GetNthPage (i) == widget) {
+                                       notebook.Page = i;
+                                       break;
+                               }
+                       }
+               }
+
                void SetTabProps (Widget widget, bool active)
                {
                        Gdk.Pixbuf icon;


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