Commit 59230985 authored by Xavier de Blas's avatar Xavier de Blas

0.6-svn8 -Done 494250 Potency formulas can be applied to any simple jump

0.6-svn8
-Done 494250 Potency formulas can be applied to any simple jump without TC. By default
selected CMJ or SJ depending on formula
-Image test icon on bottom left now shows only a zoom icon (with or
without text). With text is a newly created icon. For this reason 4 zoom icons where added
to svn and Makefile
-Lewis formula is ok? found a 2nd Lewis formula

svn path=/trunk/; revision=322
parent 5e97c989
......@@ -79,6 +79,10 @@ RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.png \
-resource:images/stock_delete.png,stock_delete.png \
-resource:images/delete_last.png,delete_last.png \
-resource:images/chronojump_icon.png,chronojump_icon.png \
-resource:images/gtk-zoom-fit.png,gtk-zoom-fit.png \
-resource:images/gtk-zoom-out.png,gtk-zoom-out.png \
-resource:images/gtk-zoom-in.png,gtk-zoom-in.png \
-resource:images/gtk-zoom-in-with-text.png,gtk-zoom-in-with-text.png \
RESOURCES_REPORT = -resource:images/chronojump_logo.png,chronojump_logo.png \
-resource:images/report_web_style.css,report_web_style.css \
......
CHRONOJUMP DETAILED CHANGELOG:
8 nov 2007
0.6-svn8
-Done 494250 Potency formulas can be applied to any simple jump without TC. By default
selected CMJ or SJ depending on formula
-Image test icon on bottom left now shows only a zoom icon (with or
without text). With text is a newly created icon. For this reason 4 zoom icons where added
to svn and Makefile
-Lewis formula is ok? found a 2nd Lewis formula
6 nov 2007 (2)
Fixed sayers potency
version is now in version file
6 nov 2007
0.6-svn7
Potency sayers now is correct (adds extra weight)
Updated spanish translation
......
......@@ -10101,19 +10101,17 @@ If you need more, just repeat the operation later.</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkButton" id="button_image_test">
<widget class="GtkButton" id="button_image_test_zoom">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Expand image and show description</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_image_test_clicked" last_modification_time="Mon, 23 Apr 2007 00:33:41 GMT"/>
<signal name="clicked" handler="on_button_image_test_zoom_clicked" last_modification_time="Wed, 07 Nov 2007 23:48:45 GMT"/>
<child>
<widget class="GtkImage" id="image2211">
<widget class="GtkImage" id="image_test_zoom">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -10130,24 +10128,6 @@ If you need more, just repeat the operation later.</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkImage" id="image_test_text_available">
<property name="visible">True</property>
<property name="stock">gtk-yes</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
......@@ -10543,10 +10523,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_expand_clicked" last_modification_time="Sun, 13 Feb 2005 16:00:22 GMT"/>
<child>
<widget class="GtkImage" id="image333">
<widget class="GtkImage" id="image_tv_expand">
<property name="visible">True</property>
<property name="stock">gtk-zoom-in</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -10572,10 +10550,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_collapse_clicked" last_modification_time="Sun, 13 Feb 2005 15:56:05 GMT"/>
<child>
<widget class="GtkImage" id="image330">
<widget class="GtkImage" id="image_tv_collapse">
<property name="visible">True</property>
<property name="stock">gtk-zoom-out</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -11111,10 +11087,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_rj_expand_clicked" last_modification_time="Sun, 13 Feb 2005 16:02:37 GMT"/>
<child>
<widget class="GtkImage" id="image334">
<widget class="GtkImage" id="image_tv_rj_expand">
<property name="visible">True</property>
<property name="stock">gtk-zoom-in</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -11140,10 +11114,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_rj_optimal_clicked" last_modification_time="Sun, 13 Feb 2005 16:03:48 GMT"/>
<child>
<widget class="GtkImage" id="image335">
<widget class="GtkImage" id="image_tv_rj_fit">
<property name="visible">True</property>
<property name="stock">gtk-zoom-fit</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -11169,10 +11141,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_rj_collapse_clicked" last_modification_time="Sun, 13 Feb 2005 16:01:36 GMT"/>
<child>
<widget class="GtkImage" id="image332">
<widget class="GtkImage" id="image_tv_rj_collapse">
<property name="visible">True</property>
<property name="stock">gtk-zoom-out</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -11853,10 +11823,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_run_expand_clicked" last_modification_time="Thu, 21 Apr 2005 14:00:22 GMT"/>
<child>
<widget class="GtkImage" id="image442">
<widget class="GtkImage" id="image_tv_run_expand">
<property name="visible">True</property>
<property name="stock">gtk-zoom-in</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -11882,10 +11850,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_run_collapse_clicked" last_modification_time="Thu, 21 Apr 2005 14:00:12 GMT"/>
<child>
<widget class="GtkImage" id="image443">
<widget class="GtkImage" id="image_tv_run_collapse">
<property name="visible">True</property>
<property name="stock">gtk-zoom-out</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -12420,10 +12386,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_run_interval_expand_clicked" last_modification_time="Wed, 03 May 2006 15:08:15 GMT"/>
<child>
<widget class="GtkImage" id="image544">
<widget class="GtkImage" id="image_tv_run_interval_expand">
<property name="visible">True</property>
<property name="stock">gtk-zoom-in</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -12449,10 +12413,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_run_interval_optimal_clicked" last_modification_time="Wed, 03 May 2006 15:08:05 GMT"/>
<child>
<widget class="GtkImage" id="image548">
<widget class="GtkImage" id="image_tv_run_interval_fit">
<property name="visible">True</property>
<property name="stock">gtk-zoom-fit</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -12478,10 +12440,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_tv_run_interval_collapse_clicked" last_modification_time="Wed, 03 May 2006 15:07:55 GMT"/>
<child>
<widget class="GtkImage" id="image545">
<widget class="GtkImage" id="image_tv_run_interval_collapse">
<property name="visible">True</property>
<property name="stock">gtk-zoom-out</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -12746,10 +12706,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_reaction_time_expand_clicked" last_modification_time="Sun, 04 Mar 2007 19:11:43 GMT"/>
<child>
<widget class="GtkImage" id="image1966">
<widget class="GtkImage" id="image_reaction_time_expand">
<property name="visible">True</property>
<property name="stock">gtk-zoom-in</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -12775,10 +12733,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_reaction_time_collapse_clicked" last_modification_time="Sun, 04 Mar 2007 19:11:30 GMT"/>
<child>
<widget class="GtkImage" id="image1967">
<widget class="GtkImage" id="image_reaction_time_collapse">
<property name="visible">True</property>
<property name="stock">gtk-zoom-out</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -13176,10 +13132,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_pulse_expand_clicked" last_modification_time="Tue, 21 Aug 2007 07:55:14 GMT"/>
<child>
<widget class="GtkImage" id="image1475">
<widget class="GtkImage" id="image_pulse_expand">
<property name="visible">True</property>
<property name="stock">gtk-zoom-in</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -13205,10 +13159,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_pulse_optimal_clicked" last_modification_time="Tue, 21 Aug 2007 07:55:00 GMT"/>
<child>
<widget class="GtkImage" id="image1476">
<widget class="GtkImage" id="image_pulse_fit">
<property name="visible">True</property>
<property name="stock">gtk-zoom-fit</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......@@ -13234,10 +13186,8 @@ If you need more, just repeat the operation later.</property>
<signal name="clicked" handler="on_button_pulse_collapse_clicked" last_modification_time="Tue, 21 Aug 2007 07:55:07 GMT"/>
<child>
<widget class="GtkImage" id="image1477">
<widget class="GtkImage" id="image_pulse_collapse">
<property name="visible">True</property>
<property name="stock">gtk-zoom-out</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
......
......@@ -33,15 +33,15 @@ public class Constants
public const string IeIndexFormula = "IE (cmj-sj)/sj *100";
public const string IubIndexFormula = "IUB (abk-cmj)/cmj *100";
public static string PotencyLewisCMJlFormula = Catalog.GetString("Potency")+ " CMJl (Lewis) " +
public static string PotencyLewisCMJFormula = Catalog.GetString("Potency")+ " CMJ (Lewis) " +
"(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") + ")*9.81*" +
"SQRT(2*9,81* " + Catalog.GetString("height") + "(m))";
public static string PotencySayersSJlFormula = Catalog.GetString("Potency") + " SJl (Sayers) " +
public static string PotencySayersSJFormula = Catalog.GetString("Potency") + " SJ (Sayers) " +
"(60.7*" + Catalog.GetString("height") + "(cm))" +
"+ (45.3*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") + ")) -2055";
public static string PotencySayersCMJlFormula = Catalog.GetString("Potency") + " CMJl (Sayers) " +
public static string PotencySayersCMJFormula = Catalog.GetString("Potency") + " CMJ (Sayers) " +
"(51.9*" + Catalog.GetString("height") + "(cm))" +
"+ (48.9*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") + ")) -2007";
......@@ -62,6 +62,11 @@ public class Constants
public static string FileNameCSS = "report_web_style.css";
public static string FileNameIcon = "chronojump_icon.png";
public static string FileNameVersion = "version.txt";
public static string FileNameZoomFitIcon = "gtk-zoom-fit.png";
public static string FileNameZoomOutIcon = "gtk-zoom-out.png";
public static string FileNameZoomInIcon = "gtk-zoom-in.png";
public static string FileNameZoomInWithTextIcon = "gtk-zoom-in-with-text.png";
//30 colors defined
public static string [] Colors = {
......
......@@ -183,9 +183,10 @@ public class ChronoJumpWindow
[Widget] Gtk.Notebook notebook;
[Widget] Gtk.Box vbox_image_test;
[Widget] Gtk.Image image_test_text_available;
// [Widget] Gtk.Image image_test_text_available;
[Widget] Gtk.Image image_test;
[Widget] Gtk.Button button_image_test;
[Widget] Gtk.Button button_image_test_zoom;
[Widget] Gtk.Image image_test_zoom;
[Widget] Gtk.Label label_image_test;
//non standard icons
......@@ -203,6 +204,21 @@ public class ChronoJumpWindow
[Widget] Gtk.Image image_pulse_delete;
[Widget] Gtk.Image image_delete_last;
[Widget] Gtk.Image image_tv_collapse;
[Widget] Gtk.Image image_tv_rj_collapse;
[Widget] Gtk.Image image_tv_run_collapse;
[Widget] Gtk.Image image_tv_run_interval_collapse;
[Widget] Gtk.Image image_reaction_time_collapse;
[Widget] Gtk.Image image_pulse_collapse;
[Widget] Gtk.Image image_tv_expand;
[Widget] Gtk.Image image_tv_rj_expand;
[Widget] Gtk.Image image_tv_run_expand;
[Widget] Gtk.Image image_tv_run_interval_expand;
[Widget] Gtk.Image image_reaction_time_expand;
[Widget] Gtk.Image image_pulse_expand;
[Widget] Gtk.Image image_tv_rj_fit;
[Widget] Gtk.Image image_tv_run_interval_fit;
[Widget] Gtk.Image image_pulse_fit;
Random rand;
bool volumeOn;
......@@ -353,7 +369,7 @@ public class ChronoJumpWindow
//createMainWindow("");
}
private void on_button_image_test_clicked(object o, EventArgs args) {
private void on_button_image_test_zoom_clicked(object o, EventArgs args) {
new DialogImageTest(currentEventType);
}
......@@ -491,6 +507,30 @@ public class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "delete_last.png");
image_delete_last.Pixbuf = pixbuf;
//zoom icons, done like this because there's one zoom icon created ad-hoc,
//and is not nice that the other are different for an user theme change
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameZoomOutIcon);
image_tv_collapse.Pixbuf = pixbuf;
image_tv_rj_collapse.Pixbuf = pixbuf;
image_tv_run_collapse.Pixbuf = pixbuf;
image_tv_run_interval_collapse.Pixbuf = pixbuf;
image_reaction_time_collapse.Pixbuf = pixbuf;
image_pulse_collapse.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameZoomInIcon);
image_tv_expand.Pixbuf = pixbuf;
image_tv_rj_expand.Pixbuf = pixbuf;
image_tv_run_expand.Pixbuf = pixbuf;
image_tv_run_interval_expand.Pixbuf = pixbuf;
image_reaction_time_expand.Pixbuf = pixbuf;
image_pulse_expand.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameZoomFitIcon);
image_tv_rj_fit.Pixbuf = pixbuf;
image_tv_run_interval_fit.Pixbuf = pixbuf;
image_pulse_fit.Pixbuf = pixbuf;
//menuitems (done differently)
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "gpm-statistics.png");
menuitem_view_stats.Image = new Gtk.Image(pixbuf);
......@@ -1303,7 +1343,7 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
*/
private void createComboJumps() {
combo_jumps = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_jumps, SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_jumps, SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true), ""); //without filter, only select name
combo_jumps.Active = 0;
combo_jumps.Changed += new EventHandler (on_combo_jumps_changed);
......@@ -1315,7 +1355,7 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
private void createComboJumpsRj() {
combo_jumps_rj = ComboBox.NewText();
UtilGtk.ComboUpdate(combo_jumps_rj, SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true)); //only select name
UtilGtk.ComboUpdate(combo_jumps_rj, SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true), ""); //only select name
combo_jumps_rj.Active = 0;
combo_jumps_rj.Changed += new EventHandler (on_combo_jumps_rj_changed);
......@@ -1327,7 +1367,7 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
private void createComboRuns() {
combo_runs = ComboBox.NewText();
UtilGtk.ComboUpdate(combo_runs, SqliteRunType.SelectRunTypes(Constants.AllRunsName, true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_runs, SqliteRunType.SelectRunTypes(Constants.AllRunsName, true), ""); //without filter, only select name
combo_runs.Active = 0;
combo_runs.Changed += new EventHandler (on_combo_runs_changed);
......@@ -1339,7 +1379,7 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
private void createComboRunsInterval() {
combo_runs_interval = ComboBox.NewText();
UtilGtk.ComboUpdate(combo_runs_interval, SqliteRunType.SelectRunIntervalTypes(Constants.AllRunsName, true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_runs_interval, SqliteRunType.SelectRunIntervalTypes(Constants.AllRunsName, true), ""); //without filter, only select name
combo_runs_interval.Active = 0;
combo_runs_interval.Changed += new EventHandler (on_combo_runs_interval_changed);
......@@ -1353,7 +1393,7 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
private void createComboPulses() {
combo_pulses = ComboBox.NewText();
UtilGtk.ComboUpdate(combo_pulses, SqlitePulseType.SelectPulseTypes(Constants.AllPulsesName, true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_pulses, SqlitePulseType.SelectPulseTypes(Constants.AllPulsesName, true), ""); //without filter, only select name
combo_pulses.Active = 0;
combo_pulses.Changed += new EventHandler (on_combo_pulses_changed);
......@@ -2179,31 +2219,36 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
//changes the image about the text on the bottom left of main screen
private void changeTestImage(string eventTypeString, string eventName, string fileNameString) {
Pixbuf pixbuf;
label_image_test.Text = "<b>" + eventName + "</b>";
label_image_test.UseMarkup = true;
Pixbuf pixbuf; //main image
Pixbuf pixbufZoom; //icon of zoom image (if shown can have two different images)
switch (fileNameString) {
case "LOGO":
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameLogo);
button_image_test.Sensitive=false;
button_image_test_zoom.Hide();
break;
case "":
pixbuf = new Pixbuf (null, Util.GetImagePath(true) + "no_image.png");
button_image_test.Sensitive=false;
button_image_test_zoom.Hide();
break;
default:
pixbuf = new Pixbuf (null, Util.GetImagePath(true) + fileNameString);
button_image_test.Sensitive=true;
//button image test zoom will have a different image depending on if there's text
//future: change tooltip also
if(eventTypeString != "" && eventName != "" && eventTypeHasLongDescription (eventTypeString, eventName))
pixbufZoom = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameZoomInWithTextIcon);
else
pixbufZoom = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameZoomInIcon);
image_test_zoom.Pixbuf = pixbufZoom;
button_image_test_zoom.Show();
break;
}
label_image_test.Text = "<b>" + eventName + "</b>";
label_image_test.UseMarkup = true;
image_test.Pixbuf = pixbuf;
//show or hide the icon "text available"
if(eventTypeString != "" && eventName != "" && eventTypeHasLongDescription (eventTypeString, eventName))
image_test_text_available.Show();
else
image_test_text_available.Hide();
}
private bool eventTypeHasLongDescription (string eventTypeString, string eventName) {
......@@ -3854,8 +3899,8 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
private void on_jump_type_add_accepted (object o, EventArgs args) {
Console.WriteLine("ACCEPTED Add new jump type");
UtilGtk.ComboUpdate(combo_jumps, SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_jumps_rj, SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_jumps, SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true), ""); //without filter, only select name
UtilGtk.ComboUpdate(combo_jumps_rj, SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true), ""); //without filter, only select name
}
private void on_run_type_add_activate (object o, EventArgs args) {
......@@ -3867,8 +3912,8 @@ Console.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
private void on_run_type_add_accepted (object o, EventArgs args) {
Console.WriteLine("ACCEPTED Add new run type");
UtilGtk.ComboUpdate(combo_runs, SqliteRunType.SelectRunTypes(Constants.AllRunsName, true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_runs_interval, SqliteRunType.SelectRunIntervalTypes(Constants.AllRunsName, true)); //without filter, only select name
UtilGtk.ComboUpdate(combo_runs, SqliteRunType.SelectRunTypes(Constants.AllRunsName, true), ""); //without filter, only select name
UtilGtk.ComboUpdate(combo_runs_interval, SqliteRunType.SelectRunIntervalTypes(Constants.AllRunsName, true), ""); //without filter, only select name
}
//reactiontime has no types
......
......@@ -200,7 +200,7 @@ public class EditEventWindow
string [] persons = SqlitePersonSession.SelectCurrentSession(myEvent.SessionID, true, false); //onlyIDAndName, not reversed
combo_persons = ComboBox.NewText();
UtilGtk.ComboUpdate(combo_persons, persons);
UtilGtk.ComboUpdate(combo_persons, persons, "");
combo_persons.Active = UtilGtk.ComboMakeActive(persons, myEvent.PersonID + ":" + myEvent.PersonName);
oldPersonID = myEvent.PersonID;
......@@ -222,7 +222,7 @@ public class EditEventWindow
{
combo_eventType = ComboBox.NewText ();
string [] myTypes = findTypes(myEvent);
UtilGtk.ComboUpdate(combo_eventType, myTypes);
UtilGtk.ComboUpdate(combo_eventType, myTypes, "");
combo_eventType.Active = UtilGtk.ComboMakeActive(myTypes, myEvent.Type);
hbox_combo_eventType.PackStart(combo_eventType, true, true, 0);
hbox_combo_eventType.ShowAll();
......
......@@ -68,7 +68,7 @@ public class LanguageWindow
//private void createComboLanguage(string myLanguage) {
private void createComboLanguage() {
combo_language = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_language, Util.GetLanguagesNames());
UtilGtk.ComboUpdate(combo_language, Util.GetLanguagesNames(), "");
hbox_combo_language.PackStart(combo_language, false, false, 0);
......
......@@ -303,7 +303,7 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
bool commentsDisable = true;
int sessionIdDisable = sessionID; //for not showing current session on the list
UtilGtk.ComboUpdate(combo_sessions, SqliteSession.SelectAllSessionsSimple(commentsDisable, sessionIdDisable));
UtilGtk.ComboUpdate(combo_sessions, SqliteSession.SelectAllSessionsSimple(commentsDisable, sessionIdDisable), "");
combo_sessions.Changed += new EventHandler (on_combo_sessions_changed);
......@@ -1201,7 +1201,7 @@ public class PersonShowAllEventsWindow {
string [] myStr = person.Split(new char[] {':'});
myPersons2[count++] = myStr[0] + ":" + myStr[1];
}
UtilGtk.ComboUpdate(combo_persons, myPersons2);
UtilGtk.ComboUpdate(combo_persons, myPersons2, "");
combo_persons.Active = UtilGtk.ComboMakeActive(myPersons2, personID + ":" + personName);
combo_persons.Changed += new EventHandler (on_combo_persons_changed);
......
......@@ -163,7 +163,7 @@ public class PreferencesWindow {
private void createComboLanguage(string myLanguageCode) {
combo_language = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_language, Util.GetLanguagesNames());
UtilGtk.ComboUpdate(combo_language, Util.GetLanguagesNames(), "");
//combo_language.Entry.Changed += new EventHandler (on_combo_language_changed);
......
......@@ -117,9 +117,9 @@ public class StatsWindow {
Constants.FvIndexFormula,
Constants.IeIndexFormula,
Constants.IubIndexFormula,
Constants.PotencyLewisCMJlFormula,
Constants.PotencySayersSJlFormula,
Constants.PotencySayersCMJlFormula
Constants.PotencyLewisCMJFormula,
Constants.PotencySayersSJFormula,
Constants.PotencySayersCMJFormula
};
......@@ -244,7 +244,7 @@ public class StatsWindow {
private void createComboStatsType() {
combo_stats_stat_type = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_stats_stat_type, comboStatsTypeOptions);
UtilGtk.ComboUpdate(combo_stats_stat_type, comboStatsTypeOptions, "");
combo_stats_stat_type.Active = 0;
combo_stats_stat_type.Changed += new EventHandler (on_combo_stats_stat_type_changed);
......@@ -276,7 +276,7 @@ public class StatsWindow {
private void createComboSelectCheckboxes() {
combo_select_checkboxes = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_select_checkboxes, comboCheckboxesOptions);
UtilGtk.ComboUpdate(combo_select_checkboxes, comboCheckboxesOptions, "");
//combo_select_checkboxes.DisableActivate ();
combo_select_checkboxes.Changed += new EventHandler (on_combo_select_checkboxes_changed);
......@@ -320,54 +320,54 @@ public class StatsWindow {
string [] nullOptions = { "-" };
if(UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeSessionSummary )
{
UtilGtk.ComboUpdate(combo_stats_stat_subtype, nullOptions);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, nullOptions, "");
combo_stats_stat_subtype.Sensitive = false;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, nullOptions);
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, nullOptions, "");
combo_stats_stat_apply_to.Sensitive = false;
}
else if(UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumperSummary )
{
UtilGtk.ComboUpdate(combo_stats_stat_subtype, nullOptions);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, nullOptions, "");
combo_stats_stat_subtype.Sensitive = false;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqlitePersonSession.SelectCurrentSession(currentSession.UniqueID, true, false)); //onlyIDAndName, not reversed
SqlitePersonSession.SelectCurrentSession(currentSession.UniqueID, true, false), ""); //onlyIDAndName, not reversed
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimple )
{
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeSimpleOptions);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeSimpleOptions, "");
combo_stats_stat_subtype.Sensitive = true;
combo_stats_stat_subtype.Active = 0;
//by default show all simple nonTC jumps, but if combo_stats_subtype changed
//updateComboStatsSubType() will do the work
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "nonTC", true)); //only select name
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "nonTC", true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimpleWithTC )
{
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeWithTCOptions);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeWithTCOptions, "");
combo_stats_stat_subtype.Sensitive = true;
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "TC", true)); //only select name
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "TC", true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsReactive )
{
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeReactiveOptions);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeReactiveOptions, "");
combo_stats_stat_subtype.Sensitive = true;
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true)); //only select name
SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
......@@ -380,7 +380,7 @@ public class StatsWindow {
{
if(UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Catalog.GetString("No indexes")) {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "nonTC", true)); //only select name
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "nonTC", true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.IeIndexFormula) {
......@@ -396,24 +396,30 @@ public class StatsWindow {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "SJl(100%), SJ");
combo_stats_stat_apply_to.Active = 0;
combo_stats_stat_apply_to.Sensitive = false;
} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.PotencyLewisCMJlFormula) {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "CMJl");
combo_stats_stat_apply_to.Active = 0;
combo_stats_stat_apply_to.Sensitive = false;
} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.PotencySayersSJlFormula) {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "SJl");
combo_stats_stat_apply_to.Active = 0;
combo_stats_stat_apply_to.Sensitive = false;
//} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.PotencySayersCMJlFormula) {
} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.PotencyLewisCMJFormula) {
combo_stats_stat_apply_to.Active =
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes("", "nonTC", true), //only select name
"CMJ"); //default value
combo_stats_stat_apply_to.Sensitive = true;
} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.PotencySayersSJFormula) {
combo_stats_stat_apply_to.Active =
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes("", "nonTC", true), //only select name
"SJ"); //default value
combo_stats_stat_apply_to.Sensitive = true;
//} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.PotencySayersCMJFormula) {
} else {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "CMJl");
combo_stats_stat_apply_to.Active = 0;
combo_stats_stat_apply_to.Sensitive = false;
combo_stats_stat_apply_to.Active =
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes("", "nonTC", true), //only select name
"CMJ"); //default value
combo_stats_stat_apply_to.Sensitive = true;
}
} else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimpleWithTC )
{
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "TC", true)); //only select name
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "TC", true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
......@@ -567,7 +573,7 @@ public class StatsWindow {
else
comboCheckboxesOptions = comboCheckboxesOptionsWithoutPersons;
UtilGtk.ComboUpdate(combo_select_checkboxes, comboCheckboxesOptions);
UtilGtk.ComboUpdate(combo_select_checkboxes, comboCheckboxesOptions, "");
//every time a stat is created, all rows should be checked (except AVG & SD)
//but not if we clicked graph
......@@ -720,9 +726,9 @@ public class StatsWindow {
}
//in PotencyLewis and Sayers show only "all jumps" radiobutton
else if(statisticType == Constants.TypeJumpsSimple && (
statisticSubType == Constants.PotencyLewisCMJlFormula ||
statisticSubType == Constants.PotencySayersSJlFormula ||
statisticSubType == Constants.PotencySayersCMJlFormula
statisticSubType == Constants.PotencyLewisCMJFormula ||
statisticSubType == Constants.PotencySayersSJFormula ||
statisticSubType == Constants.PotencySayersCMJFormula
) ) {
//change the radiobutton value
if(radiobutton_stats_jumps_limit.Active || radiobutton_stats_jumps_person_average.Active ||
......