[chronojump] Removed <= 1.62 chronopic (autodetect, wizard) code
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Removed <= 1.62 chronopic (autodetect, wizard) code
- Date: Fri, 6 Jan 2017 00:25:37 +0000 (UTC)
commit f363f3ef6ffbdf707459e39d87e6ce6e17bfd00f
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jan 6 01:17:06 2017 +0100
Removed <= 1.62 chronopic (autodetect, wizard) code
glade/app1.glade | 319 ++++------------------------------
src/Makefile.am | 1 -
src/gui/chronojump.cs | 96 ----------
src/gui/networks.cs | 45 -----
src/gui/{ => old}/chronopicWizard.cs | 0
5 files changed, 34 insertions(+), 427 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index ba89e19..d87f4cc 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1497,6 +1497,31 @@
</packing>
</child>
<child>
+ <widget class="GtkButton" id="button_selector_start_other">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip" translatable="yes">Or press '4'</property>
+ <signal name="clicked" handler="on_button_selector_start_other_clicked"
swapped="no"/>
+ <accelerator key="4" signal="clicked"/>
+ <child>
+ <widget class="GtkLabel" id="label51">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ <property name="label" translatable="yes">Other tests</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox" id="hbox_gui_tests">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -1560,20 +1585,6 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_crash">
- <property name="label">CRASH_ME
-(debug purposes)</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_debug_crash_activate" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
@@ -1588,286 +1599,21 @@ Carles</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_selector_start_other">
- <property name="visible">True</property>
+ <widget class="GtkButton" id="button_crash">
+ <property name="label">CRASH_ME
+(debug purposes)</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip" translatable="yes">Or press '4'</property>
- <signal name="clicked" handler="on_button_selector_start_other_clicked"
swapped="no"/>
- <accelerator key="4" signal="clicked"/>
- <child>
- <widget class="GtkLabel" id="label51">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xpad">8</property>
- <property name="ypad">8</property>
- <property name="label" translatable="yes">Other tests</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox62">
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkHBox" id="hbox44">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">20</property>
- <child>
- <widget class="GtkLabel" id="label_autodetect">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Auto-detect
hardware</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_autodetect_help">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_autodetect_help_clicked"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_chronopic_wizard">
- <property name="label">Wizard!</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_chronopic_wizard_clicked" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox73">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkRadioButton" id="radio_autodetect_active">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled"
handler="on_radio_autodetect_active_toggled" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox85">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label137">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Active</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox167">
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkLabel" id="label132">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">(</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label136">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">default</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label135">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">)</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="radio_autodetect_discard_first">
- <property name="label" translatable="yes">Active, discarding
first port</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radio_autodetect_active</property>
- <signal name="toggled"
handler="on_radio_autodetect_discard_first_toggled" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="radio_autodetect_inactive">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radio_autodetect_active</property>
- <signal name="toggled"
handler="on_radio_autodetect_inactive_toggled" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox190">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label138">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Inactive</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox191">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkLabel" id="label139">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">(</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label140">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">safer</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label141">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">)</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <signal name="clicked" handler="on_debug_crash_activate" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</widget>
@@ -18625,6 +18371,9 @@ Concentric</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 d76bddb..99be950 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,7 +8,6 @@ SOURCES = \
gui/chronojump.cs\
gui/chronopic.cs\
gui/chronopicRegister.cs\
- gui/chronopicWizard.cs\
gui/confirm.cs\
gui/cjCombo.cs\
gui/encoder.cs\
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index d440cfe..6fb2135 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -442,25 +442,8 @@ public partial class ChronoJumpWindow
ExecuteAutoWindow executeAutoWin;
EncoderOverviewWindow encoderOverviewWindow;
- //ChronopicWindow chronopicWin;
- //ChronopicWizardWindow chronopicWizardWin;
- //string wizardPortContacts;
- //string wizardPortEncoder;
-
static Thread pingThread;
-
- /*
- * useful to not check for Chronopic if changing select_menuitem_mode_toggled from a 50 to a 50
- * great for 1.6.3 where people change from simple jumps to reactive jumps and Chronopic don't need
to change
- *
- * maybe it will be replaced by chronopic_wizard_window
-
- private enum chronopicTypes { CONTACTS50, CONTACTS10, ENCODER }
- private chronopicTypes lastChronopicType;
- */
-
-
private bool createdStatsWin;
private string progVersion;
@@ -584,10 +567,6 @@ public partial class ChronoJumpWindow
repetitiveConditionsWin = RepetitiveConditionsWindow.Create();
repetitiveConditionsWin.FakeButtonClose.Clicked += new
EventHandler(on_repetitive_conditions_closed);
- //createChronopicWindow(false, "");
- //wizardPortContacts = "";
- //wizardPortEncoder = "";
-
on_extra_window_multichronopic_test_changed(new object(), new EventArgs());
on_extra_window_pulses_test_changed(new object(), new EventArgs());
on_extra_window_reaction_times_test_changed(new object(), new EventArgs());
@@ -3614,8 +3593,6 @@ public partial class ChronoJumpWindow
showUpdateStatsAndHideData(true);
}
- //mark to only get inside on_multi_chronopic_finished one time
- //static bool multiFinishingByClickFinish;
private void on_finish_multi_clicked (object o, EventArgs args)
{
event_execute_ButtonFinish.Clicked -= new EventHandler(on_finish_multi_clicked);
@@ -6696,79 +6673,6 @@ LogB.Debug("X");
* sensitive GUI on executeAuto methods
*/
- private void on_autodetect_help_clicked (object o, EventArgs args) {
- new DialogMessage(
- Catalog.GetString("Help on auto-detect"),
- Constants.MessageTypes.INFO,
- Catalog.GetString("Modes:") + "\n\n" +
- "- <b>" + Catalog.GetString("Active") + "</b>: " +
- Catalog.GetString("Auto-detection on hardware is active.") + " " +
Catalog.GetString("Default mode") + ".\n\n" +
- "- <b>" + Catalog.GetString("Active, discarding first port") + "</b>: " +
- Catalog.GetString("Use this option on computers where first port
fails.") + "\n\n" +
- "- <b>" + Catalog.GetString("Inactive") + "</b>: " +
- Catalog.GetString("Auto-detection on hardware is inactive.") + " " +
Catalog.GetString("Use it if you have problems at start or at capture.")
- );
- }
-
- private void on_button_chronopic_wizard_clicked (object o, EventArgs args)
- {
- /*
- chronopicWizardWin = ChronopicWizardWindow.Show();
-
- chronopicWizardWin.FakeButtonChronopicWizardFinished.Clicked -=
- new EventHandler(chronopic_wizard_finished);
- chronopicWizardWin.FakeButtonChronopicWizardFinished.Clicked += new
- EventHandler(chronopic_wizard_finished);
- */
- }
- /*
- private void chronopic_wizard_finished (object o, EventArgs args)
- {
- chronopicWizardWin.FakeButtonChronopicWizardFinished.Clicked -=
- new EventHandler(chronopic_wizard_finished);
-
- wizardPortContacts = chronopicWizardWin.PortContacts;
- wizardPortEncoder = chronopicWizardWin.PortEncoder;
-
- LogB.Information("wizardPortContacts: " + wizardPortContacts);
- LogB.Information("wizardPortEncoder: " + wizardPortEncoder);
-
- //
- // createChronopicWindow (pass cp,...)
- // recreate is true because it has been created on first ChronojumpWindow call
- //
- //contacts and encoder
- if(wizardPortContacts != "")
- {
- Chronopic cpW; //cp Wizard
- chronopicWin.CreateSPifNeeded(wizardPortContacts);
- cpW = new Chronopic(chronopicWin.SP);
- ChronopicPortData cpdata = new ChronopicPortData(1, wizardPortContacts, true);
- ArrayList cpd = new ArrayList();
- cpd.Add(cpdata);
-
- if(wizardPortEncoder == "") //no encoder
- createChronopicWindow(cpW, cpd, true, "");
- else
- createChronopicWindow(cpW, cpd, true, wizardPortEncoder);
- }
- else { //only encoder
- createChronopicWindow(true, wizardPortEncoder);
- }
-
- //need to do this because createChronopicWindow does it but relying on menuitem_mode, and now
we are on start page
- if(wizardPortEncoder != "")
- chronopicEncoderLabels(true);
-
- //all the needed info is take. Can destroy wizard window
- chronopicWizardWin.HideAndNull();
- }
- */
-
- private void on_button_chronopic_register_clicked (object o, EventArgs args)
- {
- //chronopicRegisterUpdate(true);
- }
private void chronopicRegisterUpdate(bool openWindow)
{
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 7806949..ccc92e9 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -33,11 +33,6 @@ public partial class ChronoJumpWindow
//custom buttons
[Widget] Gtk.HBox hbox_encoder_analyze_signal_or_curves;
- //Auto-detect
- [Widget] Gtk.RadioButton radio_autodetect_active;
- [Widget] Gtk.RadioButton radio_autodetect_inactive;
- [Widget] Gtk.RadioButton radio_autodetect_discard_first;
-
//RFID
[Widget] Gtk.Label label_rfid;
@@ -67,9 +62,6 @@ public partial class ChronoJumpWindow
private bool encoderConfigurationDefinedFromFile = false;
private bool encoderUpdateTreeViewWhileCapturing = true;
- private bool autodetectSignalEnabled = true;
-
-
private void configInit()
{
//trying new Config class
@@ -114,18 +106,6 @@ public partial class ChronoJumpWindow
//Auto-detect stuff
configAutodetectPort = config.AutodetectPort;
- autodetectSignalEnabled = false; //do not raise signals that could rewrite the config file
(loop)
-
- if(configAutodetectPort == Config.AutodetectPortEnum.ACTIVE)
- radio_autodetect_active.Active = true;
- else if(configAutodetectPort == Config.AutodetectPortEnum.INACTIVE)
- radio_autodetect_inactive.Active = true;
- else // (configAutodetectPort == Config.AutodetectPortEnum.DISCARDFIRST)
- radio_autodetect_discard_first.Active = true;
-
- autodetectSignalEnabled = true; //activate signals again
-
-
//show only power
if(config.OnlyEncoderGravitatory)
select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERGRAVITATORY);
@@ -217,31 +197,6 @@ public partial class ChronoJumpWindow
*/
}
- public void on_radio_autodetect_active_toggled (object obj, EventArgs args)
- {
- if(autodetectSignalEnabled && radio_autodetect_active.Active)
- {
- configAutodetectPort = Config.AutodetectPortEnum.ACTIVE;
- Config.UpdateField("AutodetectPort", configAutodetectPort.ToString());
- }
- }
- public void on_radio_autodetect_inactive_toggled (object obj, EventArgs args)
- {
- if(autodetectSignalEnabled && radio_autodetect_inactive.Active)
- {
- configAutodetectPort = Config.AutodetectPortEnum.INACTIVE;
- Config.UpdateField("AutodetectPort", configAutodetectPort.ToString());
- }
- }
- public void on_radio_autodetect_discard_first_toggled (object obj, EventArgs args)
- {
- if(autodetectSignalEnabled && radio_autodetect_discard_first.Active)
- {
- configAutodetectPort = Config.AutodetectPortEnum.DISCARDFIRST;
- Config.UpdateField("AutodetectPort", configAutodetectPort.ToString());
- }
- }
-
//rfid
private void rfid_test() {
Networks networks = new Networks();
diff --git a/src/gui/chronopicWizard.cs b/src/gui/old/chronopicWizard.cs
similarity index 100%
rename from src/gui/chronopicWizard.cs
rename to src/gui/old/chronopicWizard.cs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]