[chronojump] Removed Encoder gtk bars graph (1423 lines deleted)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Removed Encoder gtk bars graph (1423 lines deleted)
- Date: Fri, 8 Apr 2022 17:17:09 +0000 (UTC)
commit 6456621fd21a59d7ddc335870a1bf653c56f21a6
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Apr 8 19:16:15 2022 +0200
Removed Encoder gtk bars graph (1423 lines deleted)
glade/app1.glade | 53 +-
src/Makefile.am | 1 -
src/gui/app1/chronojump.cs | 24 +-
src/gui/app1/encoder.cs | 152 +----
src/gui/encoderGraphObjects.cs | 1223 ----------------------------------------
src/gui/networks.cs | 3 +-
6 files changed, 33 insertions(+), 1423 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index e189086f2..d1a46a51c 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -26248,6 +26248,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -32656,6 +32659,18 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -32692,18 +32707,6 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -32997,11 +33000,11 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkDrawingArea"
id="encoder_capture_curves_bars_drawingarea">
+ <widget class="GtkDrawingArea"
id="encoder_capture_curves_bars_drawingarea_cairo">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <signal name="button_press_event"
handler="on_encoder_capture_curves_bars_drawingarea_button_press_event" swapped="no"/>
- <signal name="expose_event"
handler="on_encoder_capture_curves_bars_drawingarea_expose_event" swapped="no"/>
+ <signal name="expose_event"
handler="on_encoder_capture_curves_bars_drawingarea_cairo_expose_event" swapped="no"/>
+ <signal name="button_press_event"
handler="on_encoder_capture_curves_bars_drawingarea_cairo_button_press_event" swapped="no"/>
</widget>
<packing>
<property name="expand">True</property>
@@ -33711,19 +33714,6 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkDrawingArea"
id="encoder_capture_curves_bars_drawingarea_cairo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <signal name="expose_event"
handler="on_encoder_capture_curves_bars_drawingarea_cairo_expose_event" swapped="no"/>
- <signal name="button_press_event"
handler="on_encoder_capture_curves_bars_drawingarea_cairo_button_press_event" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox" id="hbox156">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -33746,7 +33736,7 @@ Concentric</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -33845,7 +33835,7 @@ Concentric</property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -42375,6 +42365,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/Makefile.am b/src/Makefile.am
index 8f68ec945..29fe193c5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -53,7 +53,6 @@ SOURCES = \
gui/chronopicRegister.cs\
gui/confirm.cs\
gui/cjCombo.cs\
- gui/encoderGraphObjects.cs\
gui/encoderTreeviews.cs\
gui/encoderConfiguration.cs\
gui/encoderSelectRepetitions.cs\
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 5ee51a761..d23330082 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -7796,24 +7796,6 @@ LogB.Debug("mc finished 5");
double mainVariableLower =
feedbackWin.GetMainVariableLower(mainVariableStr);
//plotCurvesGraphDoPlot(mainVariableStr, mainVariableHigher,
mainVariableLower,
- if(encoderGraphDoPlot != null)
- {
- encoderGraphDoPlot.NewPreferences(preferences);
- encoderGraphDoPlot.Start(
- mainVariableStr, mainVariableHigher,
mainVariableLower,
- secondaryVariableStr,
preferences.encoderCaptureShowLoss,
- false,
- findEccon(true),
- feedbackWin,
- encoderConfigurationCurrent.has_inertia,
- configChronojump.PlaySoundsFromFile,
- captureCurvesBarsData,
- encoderCaptureListStore,
-
preferences.encoderCaptureMainVariableThisSetOrHistorical,
-
sendMaxPowerSpeedForceIntersession(mainVariable),
-
sendMaxPowerSpeedForceIntersessionDate(mainVariable));
- }
-
//Cairo
prepareEventGraphBarplotEncoder = new PrepareEventGraphBarplotEncoder
(
mainVariableStr, mainVariableHigher,
mainVariableLower,
@@ -7833,8 +7815,10 @@ LogB.Debug("mc finished 5");
preferences.volumeOn,
preferences.gstreamer);
prepareEncoderBarplotCairo (true);
- } else
- UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea,
encoder_capture_curves_bars_pixmap);
+ } else {
+ //UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea,
encoder_capture_curves_bars_pixmap);
+ //TODO: do it on Cairo
+ }
}
//rhythm
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 1663426f5..7cf5480d5 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -342,9 +342,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.TreeView treeview_encoder_analyze_curves;
[Widget] Gtk.DrawingArea encoder_capture_signal_drawingarea_cairo;
- [Widget] Gtk.DrawingArea encoder_capture_curves_bars_drawingarea;
[Widget] Gtk.DrawingArea encoder_capture_curves_bars_drawingarea_cairo;
- Gdk.Pixmap encoder_capture_curves_bars_pixmap = null;
ArrayList encoderCaptureCurves;
Gtk.ListStore encoderCaptureListStore;
@@ -531,8 +529,6 @@ public partial class ChronoJumpWindow
showEncoderAnalyzeTriggerTab(false);
LogB.Information("after play 6");
- encoderGraphDoPlot = null; //initialize
-
vbox_encoder_signal_comment.SetSizeRequest
(button_encoder_signal_save_comment.SizeRequest().Width, -1);
notebook_encoder_signal_comment_rhythm_and_triggers.SetSizeRequest
(button_encoder_signal_save_comment.SizeRequest().Width, -1);
@@ -2829,7 +2825,8 @@ public partial class ChronoJumpWindow
image_encoder_capture.Sensitive = false;
treeviewEncoderCaptureRemoveColumns();
updateEncoderAnalyzeExercisesPre();
- UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea,
encoder_capture_curves_bars_pixmap);
+ //UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea,
encoder_capture_curves_bars_pixmap);
+ //TODO: do it for cairo
encoderButtonsSensitive(encoderSensEnum.DONENOSIGNAL);
@@ -5683,8 +5680,6 @@ public partial class ChronoJumpWindow
//initialize new captureCurvesBarsData to not having the barplot updated on CONFIGURE or
EXPOSE after being painted white
captureCurvesBarsData = new ArrayList();
- if(encoder_capture_curves_bars_pixmap != null)
- UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea,
encoder_capture_curves_bars_pixmap);
//erase cairo barplot
cairoPaintBarsPre = new CairoPaintBarplotPreEncoder (
@@ -5905,21 +5900,6 @@ public partial class ChronoJumpWindow
double mainVariableHigher = feedbackWin.GetMainVariableHigher(mainVariable);
double mainVariableLower = feedbackWin.GetMainVariableLower(mainVariable);
- if(encoderGraphDoPlot != null)
- encoderGraphDoPlot.Start(
- mainVariable, mainVariableHigher, mainVariableLower,
- secondaryVariable, preferences.encoderCaptureShowLoss,
- false, //not capturing
- findEccon(true),
- feedbackWin,
- encoderConfigurationCurrent.has_inertia,
- configChronojump.PlaySoundsFromFile,
- captureCurvesBarsData,
- encoderCaptureListStore,
- preferences.encoderCaptureMainVariableThisSetOrHistorical,
-
sendMaxPowerSpeedForceIntersession(preferences.encoderCaptureMainVariable),
-
sendMaxPowerSpeedForceIntersessionDate(preferences.encoderCaptureMainVariable));
-
//Cairo
prepareEventGraphBarplotEncoder = new PrepareEventGraphBarplotEncoder (
mainVariable, mainVariableHigher, mainVariableLower,
@@ -5942,89 +5922,6 @@ public partial class ChronoJumpWindow
}
}
- int encoder_capture_curves_allocationXOld;
- int encoder_capture_curves_allocationYOld;
- bool encoder_capture_curves_sizeChanged;
- /*
- * unused
- public void on_encoder_capture_curves_bars_drawingarea_configure_event(object o, ExposeEventArgs args)
- {
- }
- */
- public void on_encoder_capture_curves_bars_drawingarea_expose_event(object o, ExposeEventArgs args)
- {
- /* in some mono installations, configure_event is not called, but expose_event yes.
- * Do here the initialization
- */
- LogB.Debug("EXPOSE");
- bool encoderGraphDoPlotJustCreated = false;
-
- //needed to have mouse clicks button_press_event ()
-// encoder_capture_curves_bars_drawingarea.AddEvents((int) (Gdk.EventMask.ButtonPressMask |
Gdk.EventMask.ButtonReleaseMask));
- encoder_capture_curves_bars_drawingarea.AddEvents((int) Gdk.EventMask.ButtonPressMask);
- encoder_capture_curves_bars_drawingarea_cairo.AddEvents((int) Gdk.EventMask.ButtonPressMask);
-
- Gdk.Rectangle allocation = encoder_capture_curves_bars_drawingarea.Allocation;
- if(encoder_capture_curves_bars_pixmap == null || encoder_capture_curves_sizeChanged ||
- allocation.Width != encoder_capture_curves_allocationXOld ||
- allocation.Height != encoder_capture_curves_allocationYOld)
- {
- encoder_capture_curves_bars_pixmap = new Gdk.Pixmap
(encoder_capture_curves_bars_drawingarea.GdkWindow, allocation.Width, allocation.Height, -1);
- if(encoder_capture_curves_bars_pixmap == null || ! preferences.encoderCaptureInfinite
|| firstSetOfCont ||
- encoderGraphDoPlot == null || ! encoderGraphDoPlot.GraphPrepared)
- {
- if(encoderGraphDoPlot == null || ! encoderGraphDoPlot.GraphPrepared)
- {
- encoderGraphDoPlot = new EncoderGraphDoPlot(preferences,
encoder_capture_curves_bars_drawingarea, encoder_capture_curves_bars_pixmap);
- encoderGraphDoPlotJustCreated = true;
- }
- }
-
- if(! encoderGraphDoPlotJustCreated)
- {
- encoderGraphDoPlot.NewPreferences(preferences);
- encoderGraphDoPlot.NewGraphicObjects(encoder_capture_curves_bars_drawingarea,
encoder_capture_curves_bars_pixmap); //sense això no xuta
- }
-
- encoderGraphDoPlot.Erase();
- callPlotCurvesGraphDoPlot();
- encoder_capture_curves_sizeChanged = false;
- }
-
- Gdk.Rectangle area = args.Event.Area;
-
- //sometimes this is called when paint is finished
- //don't let this erase win
- if(encoder_capture_curves_bars_pixmap != null) {
- args.Event.Window.DrawDrawable(encoder_capture_curves_bars_drawingarea.Style.WhiteGC,
- encoder_capture_curves_bars_pixmap,
- area.X, area.Y,
- area.X, area.Y,
- area.Width, area.Height);
- }
-
- encoder_capture_curves_allocationXOld = allocation.Width;
- encoder_capture_curves_allocationYOld = allocation.Height;
- }
-
- public void on_encoder_capture_curves_bars_drawingarea_button_press_event (object o,
ButtonPressEventArgs args)
- {
- //LogB.Information(string.Format("Mouse X: {0}; Mouse Y: {1}", args.Event.X, args.Event.Y));
-
- //if list exists, select the repetition
- if(encoderGraphDoPlot != null)
- {
- int repetition = encoderGraphDoPlot.FindBarInPixel(args.Event.X);
- //LogB.Information("Repetition: " + repetition.ToString());
- if(repetition >= 0)
- {
- //this will be managed by: EncoderCaptureItemToggled()
- encoderCaptureItemToggledArgsPath = repetition.ToString();
- EncoderCaptureItemToggled(new object (), new ToggledArgs());
- encoderCaptureItemToggledArgsPath = "";
- }
- }
- }
public void on_encoder_capture_curves_bars_drawingarea_cairo_button_press_event (object o,
ButtonPressEventArgs args)
{
LogB.Information("on_encoder_capture_curves_bars_drawingarea_cairo_button_press_event 0");
@@ -6047,6 +5944,8 @@ public partial class ChronoJumpWindow
public void on_encoder_capture_curves_bars_drawingarea_cairo_expose_event (object o, ExposeEventArgs
args)
{
LogB.Information("on_encoder_capture_curves_bars_drawingarea_cairo_expose_event A");
+ encoder_capture_curves_bars_drawingarea_cairo.AddEvents((int) Gdk.EventMask.ButtonPressMask);
+
//if object not defined or not defined fo this mode, return
//TODO: is fist check really needed?
// if(cairoPaintBarsPre == null || ! cairoPaintBarsPre.ModeMatches (current_mode))
@@ -6121,7 +6020,6 @@ public partial class ChronoJumpWindow
/* thread stuff */
- private static EncoderGraphDoPlot encoderGraphDoPlot;
private void encoderThreadStart(encoderActions action)
{
@@ -6206,16 +6104,10 @@ public partial class ChronoJumpWindow
if( ! preferences.encoderCaptureInfinite || firstSetOfCont )
treeviewEncoderCaptureRemoveColumns();
- if(encoder_capture_curves_bars_pixmap != null)
- UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea,
encoder_capture_curves_bars_pixmap);
-
cairoPaintBarsPre = new CairoPaintBarplotPreEncoder (
encoder_capture_curves_bars_drawingarea_cairo,
preferences.fontType.ToString());//, "--capturing--");
- if(encoderGraphDoPlot != null)
- encoderGraphDoPlot.ShowMessage(Catalog.GetString("Capturing") + " …",
false, true);
-
cairoPaintBarsPre.ShowMessage (
encoder_capture_curves_bars_drawingarea_cairo,
preferences.fontType.ToString(),
@@ -6813,24 +6705,6 @@ public partial class ChronoJumpWindow
//captureCurvesBarsData.Add(new EncoderBarsData(meanSpeed, maxSpeed,
meanPower, peakPower));
//captureCurvesBarsData.Add(new EncoderBarsData(20, 39, 10, 40));
- if(encoderGraphDoPlot != null)
- {
- encoderGraphDoPlot.NewPreferences(preferences);
- encoderGraphDoPlot.Start(
- mainVariable, mainVariableHigher, mainVariableLower,
- secondaryVariable, preferences.encoderCaptureShowLoss,
- true, //capturing
- findEccon(true),
- feedbackWin,
- encoderConfigurationCurrent.has_inertia,
- configChronojump.PlaySoundsFromFile,
- captureCurvesBarsData,
- encoderCaptureListStore,
-
preferences.encoderCaptureMainVariableThisSetOrHistorical,
-
sendMaxPowerSpeedForceIntersession(preferences.encoderCaptureMainVariable),
-
sendMaxPowerSpeedForceIntersessionDate(preferences.encoderCaptureMainVariable));
- }
-
//Cairo
prepareEventGraphBarplotEncoder = new PrepareEventGraphBarplotEncoder (
mainVariable, mainVariableHigher, mainVariableLower,
@@ -7414,24 +7288,6 @@ public partial class ChronoJumpWindow
findMaxPowerSpeedForceIntersession();
- if(encoderGraphDoPlot != null)
- {
- encoderGraphDoPlot.NewPreferences(preferences);
- encoderGraphDoPlot.Start(
- mainVariable, mainVariableHigher, mainVariableLower,
- secondaryVariable, preferences.encoderCaptureShowLoss,
- false, //not capturing
- findEccon(true),
- feedbackWin,
- encoderConfigurationCurrent.has_inertia,
- configChronojump.PlaySoundsFromFile,
- captureCurvesBarsData,
- encoderCaptureListStore,
-
preferences.encoderCaptureMainVariableThisSetOrHistorical,
-
sendMaxPowerSpeedForceIntersession(preferences.encoderCaptureMainVariable),
-
sendMaxPowerSpeedForceIntersessionDate(preferences.encoderCaptureMainVariable));
- }
-
//Cairo
prepareEventGraphBarplotEncoder = new PrepareEventGraphBarplotEncoder (
mainVariable, mainVariableHigher, mainVariableLower,
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 031b7435c..5bf8a2256 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -745,7 +745,8 @@ public partial class ChronoJumpWindow
//select person by RFID
Person pLocal = SqlitePerson.SelectByRFID(capturedRFID);
- Person pServer = json.GetPersonByRFID(capturedRFID);
+ //Person pServer = json.GetPersonByRFID(capturedRFID);
+ Person pServer = json.GetPersonByRFID("198,99,164,42,43"); //TODO: change this again
if(pLocal.UniqueID == -1)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]