From 2c8264f866529efb2b1c3b5bae535766d81e0dbf Mon Sep 17 00:00:00 2001 From: tzim Date: Sun, 12 Apr 2015 11:54:00 +0000 Subject: [PATCH] Ajout ligne info next seqmaster --- DMX-2.0/MainWindow.cs | 12 +++- DMX-2.0/gtk-gui/DMX2.MainWindow.cs | 103 ++++++++++++++++++----------- DMX-2.0/gtk-gui/gui.stetic | 37 +++++++++-- DMX-2.0/style.gtkrc | 6 +- 4 files changed, 110 insertions(+), 48 deletions(-) diff --git a/DMX-2.0/MainWindow.cs b/DMX-2.0/MainWindow.cs index 3abca64..54e4616 100644 --- a/DMX-2.0/MainWindow.cs +++ b/DMX-2.0/MainWindow.cs @@ -32,6 +32,7 @@ namespace DMX2 ListStore lsMatrice = null; FileInfo conduiteFile=null; int lastSaveHash=0; + bool nextChange=false; public string CurFolder{ get; @@ -294,6 +295,7 @@ namespace DMX2 if (MatriceUI.Columns [0] == col) { Conduite.Courante.SequenceurMaitre.IndexLigneaSuivre = IndexEffetSelectionne(); + nextChange = true; } } @@ -598,14 +600,20 @@ namespace DMX2 lblPage.LabelProp = Conduite.Courante.Midi.CurrentPage.ToString(); if(fullUpdateFlag) ConstruitMatriceSeqColumns(); - if (Conduite.Courante.SequenceurMaitre.EffetChange ()) { + if (Conduite.Courante.SequenceurMaitre.EffetChange () || nextChange) { + nextChange=false; MatriceUI.QueueDraw (); int l = Conduite.Courante.SequenceurMaitre.IndexLigneEnCours; + int ln = Conduite.Courante.SequenceurMaitre.IndexLigneaSuivre; + if (ln == -1) ln = l + 1; if (l < Conduite.Courante.SequenceurMaitre.Lignes.Count && l >= 0) { - labelMasterPos.LabelProp = + labelMasterPos.LabelProp = (l + 1).ToString () + " - " + Conduite.Courante.SequenceurMaitre.Lignes[l].Nom; } + if (ln < Conduite.Courante.SequenceurMaitre.Lignes.Count && ln >= 0) { + labelMasterNext.LabelProp= (ln+1).ToString() + " - " + Conduite.Courante.SequenceurMaitre.Lignes [ln].Nom ; + } } fullUpdateFlag=false; masterScale.Value = Conduite.Courante.Master; diff --git a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs index 4a1d428..ce45230 100644 --- a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs +++ b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs @@ -50,7 +50,9 @@ namespace DMX2 private global::Gtk.HPaned hpaned2; private global::Gtk.VBox vbox4; private global::Gtk.EventBox evBBox2; + private global::Gtk.VBox vbox5; private global::Gtk.Label labelMasterPos; + private global::Gtk.Label labelMasterNext; private global::Gtk.ScrolledWindow GtkScrolledWindow2; private global::Gtk.NodeView MatriceUI; private global::Gtk.ScrolledWindow scrolledwindow2; @@ -402,17 +404,38 @@ namespace DMX2 this.evBBox2 = new global::Gtk.EventBox (); this.evBBox2.Name = "evBBox2"; // Container child evBBox2.Gtk.Container+ContainerChild + this.vbox5 = new global::Gtk.VBox (); + this.vbox5.Name = "vbox5"; + this.vbox5.Spacing = 6; + // Container child vbox5.Gtk.Box+BoxChild this.labelMasterPos = new global::Gtk.Label (); this.labelMasterPos.Name = "labelMasterPos"; this.labelMasterPos.Xpad = 4; - this.labelMasterPos.Ypad = 4; + this.labelMasterPos.Ypad = 1; this.labelMasterPos.Xalign = 0F; - this.evBBox2.Add (this.labelMasterPos); - this.vbox4.Add (this.evBBox2); - global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.evBBox2])); - w66.Position = 0; + this.labelMasterPos.LabelProp = "\t"; + this.vbox5.Add (this.labelMasterPos); + global::Gtk.Box.BoxChild w65 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.labelMasterPos])); + w65.Position = 0; + w65.Expand = false; + w65.Fill = false; + // Container child vbox5.Gtk.Box+BoxChild + this.labelMasterNext = new global::Gtk.Label (); + this.labelMasterNext.Name = "labelMasterNext"; + this.labelMasterNext.Xpad = 20; + this.labelMasterNext.Xalign = 0F; + this.labelMasterNext.LabelProp = "\t"; + this.vbox5.Add (this.labelMasterNext); + global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.labelMasterNext])); + w66.Position = 1; w66.Expand = false; w66.Fill = false; + this.evBBox2.Add (this.vbox5); + this.vbox4.Add (this.evBBox2); + global::Gtk.Box.BoxChild w68 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.evBBox2])); + w68.Position = 0; + w68.Expand = false; + w68.Fill = false; // Container child vbox4.Gtk.Box+BoxChild this.GtkScrolledWindow2 = new global::Gtk.ScrolledWindow (); this.GtkScrolledWindow2.Name = "GtkScrolledWindow2"; @@ -424,14 +447,14 @@ namespace DMX2 this.MatriceUI.RulesHint = true; this.GtkScrolledWindow2.Add (this.MatriceUI); this.vbox4.Add (this.GtkScrolledWindow2); - global::Gtk.Box.BoxChild w68 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.GtkScrolledWindow2])); - w68.Position = 1; + global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.GtkScrolledWindow2])); + w70.Position = 1; this.hpaned2.Add (this.vbox4); - global::Gtk.Paned.PanedChild w69 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.vbox4])); - w69.Resize = false; + global::Gtk.Paned.PanedChild w71 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.vbox4])); + w71.Resize = false; this.hpaned1.Add (this.hpaned2); - global::Gtk.Paned.PanedChild w70 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); - w70.Resize = false; + global::Gtk.Paned.PanedChild w72 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); + w72.Resize = false; // Container child hpaned1.Gtk.Paned+PanedChild this.scrolledwindow2 = new global::Gtk.ScrolledWindow (); this.scrolledwindow2.WidthRequest = 150; @@ -439,32 +462,32 @@ namespace DMX2 this.scrolledwindow2.Name = "scrolledwindow2"; this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child scrolledwindow2.Gtk.Container+ContainerChild - global::Gtk.Viewport w71 = new global::Gtk.Viewport (); - w71.ShadowType = ((global::Gtk.ShadowType)(0)); + global::Gtk.Viewport w73 = new global::Gtk.Viewport (); + w73.ShadowType = ((global::Gtk.ShadowType)(0)); // Container child GtkViewport1.Gtk.Container+ContainerChild this.vboxCircuits = new global::Gtk.VBox (); this.vboxCircuits.Name = "vboxCircuits"; this.vboxCircuits.Spacing = 2; - w71.Add (this.vboxCircuits); - this.scrolledwindow2.Add (w71); + w73.Add (this.vboxCircuits); + this.scrolledwindow2.Add (w73); this.hpaned1.Add (this.scrolledwindow2); - global::Gtk.Paned.PanedChild w74 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); - w74.Resize = false; - w74.Shrink = false; + global::Gtk.Paned.PanedChild w76 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); + w76.Resize = false; + w76.Shrink = false; this.hbox1.Add (this.hpaned1); - global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); - w75.Position = 2; + global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); + w77.Position = 2; this.vbox1.Add (this.hbox1); - global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); - w76.Position = 0; + global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); + w78.Position = 0; // Container child vbox1.Gtk.Box+BoxChild this.hseparator1 = new global::Gtk.HSeparator (); this.hseparator1.Name = "hseparator1"; this.vbox1.Add (this.hseparator1); - global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); - w77.Position = 1; - w77.Expand = false; - w77.Fill = false; + global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); + w79.Position = 1; + w79.Expand = false; + w79.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox4 = new global::Gtk.HBox (); this.hbox4.Name = "hbox4"; @@ -475,10 +498,10 @@ namespace DMX2 this.toolbar7.Name = "toolbar7"; this.toolbar7.ShowArrow = false; this.hbox4.Add (this.toolbar7); - global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); - w78.Position = 0; - w78.Expand = false; - w78.Fill = false; + global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); + w80.Position = 0; + w80.Expand = false; + w80.Fill = false; // Container child hbox4.Gtk.Box+BoxChild this.evInfo = new global::Gtk.EventBox (); this.evInfo.Name = "evInfo"; @@ -488,8 +511,8 @@ namespace DMX2 this.lblInfo.LabelProp = "info"; this.evInfo.Add (this.lblInfo); this.hbox4.Add (this.evInfo); - global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); - w80.Position = 1; + global::Gtk.Box.BoxChild w82 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); + w82.Position = 1; // Container child hbox4.Gtk.Box+BoxChild this.UIManager.AddUiFromString (""); this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8"))); @@ -497,15 +520,15 @@ namespace DMX2 this.toolbar8.ShowArrow = false; this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.hbox4.Add (this.toolbar8); - global::Gtk.Box.BoxChild w81 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); - w81.Position = 2; - w81.Expand = false; - w81.Fill = false; + global::Gtk.Box.BoxChild w83 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); + w83.Position = 2; + w83.Expand = false; + w83.Fill = false; this.vbox1.Add (this.hbox4); - global::Gtk.Box.BoxChild w82 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); - w82.Position = 2; - w82.Expand = false; - w82.Fill = false; + global::Gtk.Box.BoxChild w84 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); + w84.Position = 2; + w84.Expand = false; + w84.Fill = false; this.Add (this.vbox1); if ((this.Child != null)) { this.Child.ShowAll (); diff --git a/DMX-2.0/gtk-gui/gui.stetic b/DMX-2.0/gtk-gui/gui.stetic index 2c80ee1..e5bd2b8 100644 --- a/DMX-2.0/gtk-gui/gui.stetic +++ b/DMX-2.0/gtk-gui/gui.stetic @@ -485,17 +485,44 @@ page - + - 4 - 4 - 0 + 6 + + + + 4 + 1 + 0 + + + + 0 + True + False + False + + + + + + 20 + 0 + + + + 1 + True + False + False + + 0 - True + False False False diff --git a/DMX-2.0/style.gtkrc b/DMX-2.0/style.gtkrc index 380110b..e32ecd7 100644 --- a/DMX-2.0/style.gtkrc +++ b/DMX-2.0/style.gtkrc @@ -127,7 +127,10 @@ style "masterpos" = "counter" { font_name = "DejaVu Sans Mono Bold 10" } - +style "masternext" = "counter" +{ + font_name = "DejaVu Sans Mono Bold 7" +} style "page" = "sombre" { fg[NORMAL] = "#FFFF00" @@ -236,6 +239,7 @@ widget "gtk-tooltip*" style "tooltips-s" widget "*.evBBox" style "counter" widget "*.evBBox*" style "counter" widget "*.labelMasterPos" style "masterpos" +widget "*.labelMasterNext" style "masternext" widget "*.pb" style "circuitspb" widget "*.posLabel" style "counter" widget "*.timeLabel" style "counter"