Correction Style GTK et sequenceur Son

This commit is contained in:
manu 2018-10-28 18:52:53 +01:00
parent a21b917e94
commit bf09b34093
5 changed files with 28 additions and 20 deletions

View file

@ -53,7 +53,11 @@ namespace DMX2
Build (); Build ();
MajWidgets(); MajWidgets();
ContextMenuHelper ctxHelper = new ContextMenuHelper(); #if DEBUG
// selectColorAction2.Visible = true;
#endif
ContextMenuHelper ctxHelper = new ContextMenuHelper();
ctxHelper.ContextMenu += EventPopup; ctxHelper.ContextMenu += EventPopup;
ctxHelper.AttachToWidget(btnGo); ctxHelper.AttachToWidget(btnGo);
ctxHelper.AttachToWidget(btnGoBack); ctxHelper.AttachToWidget(btnGoBack);

View file

@ -133,16 +133,24 @@ namespace DMX2
get{ return volume;} get{ return volume;}
set { set {
volume=value; volume=value;
mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume); if (mplayerProcess != null && !mplayerProcess.HasExited)
{
if (!Paused)
mplayerProcess.StandardInput.WriteLine("volume {0} 1", volume);
}
volumeEventTarget.FeedBack (); volumeEventTarget.FeedBack ();
} }
} }
public TimeSpan PlayTime { public TimeSpan PlayTime {
get{ get{
if(mplayerProcess!=null && !mplayerProcess.HasExited) if (mplayerProcess != null && !mplayerProcess.HasExited)
mplayerProcess.StandardInput.WriteLine ("get_time_pos"); {
return position; if (!Paused)
mplayerProcess.StandardInput.WriteLine("get_time_pos");
}
return position;
} }
set{ set{
if (CheckMplayer ()) { if (CheckMplayer ()) {
@ -171,13 +179,14 @@ namespace DMX2
curfile = files[pos]; curfile = files[pos];
Stop(); Stop();
mplayerProcess.StandardInput.WriteLine ("volume 0 1"); //mplayerProcess.StandardInput.WriteLine ("volume 0 1");
mplayerProcess.StandardInput.WriteLine ("loadfile \"{0}\" 0", curfile); mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume);
mplayerProcess.StandardInput.WriteLine ("get_time_length"); mplayerProcess.StandardInput.WriteLine ("pausing loadfile \"{0}\"", curfile);
mplayerProcess.StandardInput.WriteLine ("pausing get_time_length");
//mplayerProcess.StandardInput.WriteLine ("pausing seek 0 2"); //mplayerProcess.StandardInput.WriteLine ("pausing seek 0 2");
mplayerProcess.StandardInput.WriteLine ("pause"); //mplayerProcess.StandardInput.WriteLine ("pause");
mplayerProcess.StandardInput.WriteLine ("seek 0 2"); //mplayerProcess.StandardInput.WriteLine ("seek 0 2");
mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume); //mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume);
Paused = true; Paused = true;
} }
@ -187,8 +196,9 @@ namespace DMX2
return; return;
if (!CheckMplayer ()) if (!CheckMplayer ())
return; return;
mplayerProcess.StandardInput.WriteLine ("pause"); mplayerProcess.StandardInput.WriteLine ("pause");
Paused = false; mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume);
Paused = false;
} }
public void Pause () public void Pause ()

View file

@ -198,9 +198,6 @@ namespace DMX2
w1.Add(this.seqSonAction, null); w1.Add(this.seqSonAction, null);
this.selectColorAction2 = new global::Gtk.Action("selectColorAction2", null, null, "gtk-select-color"); this.selectColorAction2 = new global::Gtk.Action("selectColorAction2", null, null, "gtk-select-color");
this.selectColorAction2.Visible = false; this.selectColorAction2.Visible = false;
this.selectColorAction2.VisibleHorizontal = false;
this.selectColorAction2.VisibleVertical = false;
this.selectColorAction2.VisibleOverflown = false;
w1.Add(this.selectColorAction2, null); w1.Add(this.selectColorAction2, null);
this.seqMidiAction = new global::Gtk.Action("seqMidiAction", null, null, "MidiSeq"); this.seqMidiAction = new global::Gtk.Action("seqMidiAction", null, null, "MidiSeq");
this.seqMidiAction.Sensitive = false; this.seqMidiAction.Sensitive = false;

View file

@ -238,9 +238,6 @@
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="StockId">gtk-select-color</property> <property name="StockId">gtk-select-color</property>
<property name="Visible">False</property> <property name="Visible">False</property>
<property name="VisibleHorizontal">False</property>
<property name="VisibleVertical">False</property>
<property name="VisibleOverflown">False</property>
<signal name="Activated" handler="OnSelectColorActionActivated" /> <signal name="Activated" handler="OnSelectColorActionActivated" />
</action> </action>
<action id="seqMidiAction"> <action id="seqMidiAction">

View file

@ -45,7 +45,7 @@ style "sombre"
} }
GtkTreeView::odd-row-color = "#66666F" GtkTreeView::odd-row-color = "#66666F"
#GtkTreeView::even-row-color = "#595959" GtkTreeView::even-row-color = "#595959"
} }
style "scale-s" = "sombre" { style "scale-s" = "sombre" {