* MidiEventProvider.cs: Pas de canal non paginé par défaut

* GestionMidiUI.cs:
* DMX2.GestionMidiUI.cs: Interface plus claire pour la gestion du
  canal non paginé

* gui.stetic:
* DMX2.MainWindow.cs: Modifs sur l'interface (le bouton param midi
  passe a gauche, vu que les params font désormais partie de la
  conduite)
This commit is contained in:
tzim 2014-05-23 08:44:13 +00:00
parent 8e1ad807b7
commit 49162860fe
5 changed files with 64 additions and 45 deletions

View file

@ -47,10 +47,15 @@ namespace DMX2
spinNbPage.Value = Conduite.Courante.Midi.Maxpage;
if(Conduite.Courante.Midi.UnpaginatedChannels.Count==0)
spinUPCh.Value = 0;
else
if (Conduite.Courante.Midi.UnpaginatedChannels.Count == 0) {
spinUPCh.Sensitive = false;
chkPg.Active = false;
} else {
spinUPCh.Sensitive = true;
spinUPCh.Value = Conduite.Courante.Midi.UnpaginatedChannels [0] + 1;
chkPg.Active = true;
}
}
@ -164,9 +169,20 @@ namespace DMX2
Conduite.Courante.Midi.UnpaginatedChannels.Clear();
if (spinUPCh.ValueAsInt == 0) return;
Conduite.Courante.Midi.UnpaginatedChannels.Add((byte)(spinUPCh.ValueAsInt-1));
}
protected void OnChkPgToggled (object sender, EventArgs e)
{
Conduite.Courante.Midi.UnpaginatedChannels.Clear ();
if (!chkPg.Active) {
spinUPCh.Sensitive=false;
return;
}
spinUPCh.Sensitive=true;
Conduite.Courante.Midi.UnpaginatedChannels.Add((byte)(spinUPCh.ValueAsInt-1));
}
}

View file

@ -305,8 +305,6 @@ namespace DMX2
AlsaSeqLib.ConnectFrom(AlsaSeqLib.SND_SEQ_CLIENT_SYSTEM, AlsaSeqLib.SND_SEQ_PORT_SYSTEM_ANNOUNCE);
AutoConnect();
unpaginatedchannels.Add((byte)0);
}
void AutoConnect ()

View file

@ -12,7 +12,7 @@ namespace DMX2
private global::Gtk.Label label3;
private global::Gtk.SpinButton spinNbPage;
private global::Gtk.HBox hbox2;
private global::Gtk.Label label4;
private global::Gtk.CheckButton chkPg;
private global::Gtk.SpinButton spinUPCh;
private global::Gtk.Label GtkLabel5;
private global::Gtk.Frame frame3;
@ -99,22 +99,23 @@ namespace DMX2
this.hbox2.Name = "hbox2";
this.hbox2.Spacing = 6;
// Container child hbox2.Gtk.Box+BoxChild
this.label4 = new global::Gtk.Label ();
this.label4.Name = "label4";
this.label4.Xalign = 0F;
this.label4.LabelProp = "Ne pas paginer\nce canal :";
this.hbox2.Add (this.label4);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label4]));
this.chkPg = new global::Gtk.CheckButton ();
this.chkPg.CanFocus = true;
this.chkPg.Name = "chkPg";
this.chkPg.Label = "ne pas paginer ce canal :";
this.chkPg.DrawIndicator = true;
this.chkPg.UseUnderline = true;
this.hbox2.Add (this.chkPg);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.chkPg]));
w5.Position = 0;
w5.Expand = false;
w5.Fill = false;
// Container child hbox2.Gtk.Box+BoxChild
this.spinUPCh = new global::Gtk.SpinButton (0, 16, 1);
this.spinUPCh = new global::Gtk.SpinButton (1, 16, 1);
this.spinUPCh.CanFocus = true;
this.spinUPCh.Name = "spinUPCh";
this.spinUPCh.Adjustment.PageIncrement = 10;
this.spinUPCh.Adjustment.PageIncrement = 1;
this.spinUPCh.ClimbRate = 1;
this.spinUPCh.Numeric = true;
this.spinUPCh.Value = 1;
this.hbox2.Add (this.spinUPCh);
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.spinUPCh]));
w6.PackType = ((global::Gtk.PackType)(1));
@ -336,6 +337,7 @@ namespace DMX2
this.btnDesactiv.Clicked += new global::System.EventHandler (this.OnBtnDesactivClicked);
this.chkFB.Toggled += new global::System.EventHandler (this.OnChkFBToggled);
this.spinNbPage.ValueChanged += new global::System.EventHandler (this.OnSpinNbPageValueChanged);
this.chkPg.Toggled += new global::System.EventHandler (this.OnChkPgToggled);
this.spinUPCh.ValueChanged += new global::System.EventHandler (this.OnSpinUPChValueChanged);
this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked);
}

View file

@ -448,7 +448,7 @@ namespace DMX2
this.hbox4.Name = "hbox4";
this.hbox4.Spacing = 6;
// Container child hbox4.Gtk.Box+BoxChild
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar7'><toolitem name='circAction' action='circAction'/><toolitem name='seqLinAction' action='seqLinAction'/><toolitem name='seqMacroAction' action='seqMacroAction'/><separator/><toolitem name='showAllAction' action='showAllAction'/><toolitem name='fullscreenAction1' action='fullscreenAction1'/><toolitem name='universAction' action='universAction'/><toolitem name='connectAction' action='connectAction'/></toolbar></ui>");
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar7'><toolitem name='circAction' action='circAction'/><toolitem name='seqLinAction' action='seqLinAction'/><toolitem name='seqMacroAction' action='seqMacroAction'/><separator/><toolitem name='showAllAction' action='showAllAction'/><toolitem name='fullscreenAction1' action='fullscreenAction1'/><toolitem name='universAction' action='universAction'/><toolitem name='midiAction' action='midiAction'/><toolitem name='connectAction' action='connectAction'/></toolbar></ui>");
this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar7")));
this.toolbar7.Name = "toolbar7";
this.toolbar7.ShowArrow = false;
@ -469,7 +469,7 @@ namespace DMX2
global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo]));
w78.Position = 1;
// Container child hbox4.Gtk.Box+BoxChild
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='midiAction' action='midiAction'/><toolitem name='aboutAction' action='aboutAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>");
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='aboutAction' action='aboutAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>");
this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8")));
this.toolbar8.Name = "toolbar8";
this.toolbar8.ShowArrow = false;

View file

@ -573,6 +573,7 @@ page</property>
<node type="Toolitem" action="showAllAction" />
<node type="Toolitem" action="fullscreenAction1" />
<node type="Toolitem" action="universAction" />
<node type="Toolitem" action="midiAction" />
<node type="Toolitem" action="connectAction" />
</node>
</widget>
@ -609,7 +610,6 @@ page</property>
<node type="Toolitem" action="saveAction" />
<node type="Toolitem" action="saveAsAction" />
<node type="Toolitem" action="closeAction" />
<node type="Toolitem" action="midiAction" />
<node type="Toolitem" action="aboutAction" />
<node type="Toolitem" action="quitAction" />
</node>
@ -3213,28 +3213,31 @@ trames DMX (ms)</property>
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
<widget class="Gtk.Label" id="label4">
<widget class="Gtk.CheckButton" id="chkPg">
<property name="MemberName" />
<property name="Xalign">0</property>
<property name="LabelProp" translatable="yes">Ne pas paginer
ce canal :</property>
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">ne pas paginer ce canal :</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<signal name="Toggled" handler="OnChkPgToggled" />
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.SpinButton" id="spinUPCh">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Lower">1</property>
<property name="Upper">16</property>
<property name="PageIncrement">10</property>
<property name="PageIncrement">1</property>
<property name="StepIncrement">1</property>
<property name="ClimbRate">1</property>
<property name="Numeric">True</property>
<property name="Value">1</property>
<signal name="ValueChanged" handler="OnSpinUPChValueChanged" />
</widget>
<packing>