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

improved image_test:

-show a image of text info when longDescription is available for selected test
-show chronojump_logo when change notebook
-fixed little bug in run values

-Added initially selected seconds as description on rj limited by time
-last value of RJ jumps or seconds limited, selected by default
-edit,selected,repair buttons and menuitem only shown when specific
event selected
-Added non standard (not in mono) icons: 3 bells, volume (high, muted), statistics, report_window, graphs on stats win, repair events, delete events, delete_last, repetitive conditions, eventExecute
-Now volume shows different icon if it's on or off
-Improved message on ending run interval

Bugs Fixed:
-Fixed bug on not showing correctly the personName on some parts of the code (like editing an event)
-Fixed crash on click repair pulse
-Fixed crash on expand a row on run_interval

svn path=/trunk/; revision=271
parent 4f93333d
......@@ -54,6 +54,16 @@ RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.png \
-resource:images/jump_rj_in.png,jump_rj_in.png -resource:images/mini/jump_rj_in.png,mini/jump_rj_in.png \
-resource:images/run_simple.png,run_simple.png -resource:images/mini/run_simple.png,mini/run_simple.png \
-resource:images/run_interval.png,run_interval.png -resource:images/mini/run_interval.png,mini/run_interval.png \
-resource:images/stock_bell.png,stock_bell.png \
-resource:images/stock_bell_green.png,stock_bell_green.png \
-resource:images/stock_bell_red.png,stock_bell_red.png \
-resource:images/audio-volume-high.png,audio-volume-high.png \
-resource:images/audio-volume-muted.png,audio-volume-muted.png \
-resource:images/gpm-statistics.png,gpm-statistics.png \
-resource:images/stock_task-assigned.png,stock_task-assigned.png \
-resource:images/preferences-system.png,preferences-system.png \
-resource:images/stock_delete.png,stock_delete.png \
-resource:images/delete_last.png,delete_last.png \
RESOURCES_REPORT = -resource:images/chronojump_logo.png,chronojump_logo.png \
-resource:images/report_web_style.css,report_web_style.css \
......@@ -77,7 +87,7 @@ all: $(CHRONOJUMP).exe $(CHRONOJUMP_MINI).exe
# Regla para compilar CHRONOJUMP (C#)
#-------------------------------
$(CHRONOJUMP).exe: NPlot.dll NPlot.Gtk.dll $(CHRONOJUMP_DEP) chronopic.cs glade/chronojump.glade
$(CHRONOJUMP).exe: NPlot.dll NPlot.Gtk.dll $(CHRONOJUMP_DEP) chronopic.cs glade/chronojump.glade Makefile
$(MCS) -debug $(CHRONOJUMP_DEP) $(RESOURCES_GLADE) $(RESOURCES_IMAGES) $(RESOURCES_REPORT) -unsafe chronopic.cs -r:NPlot.dll -r:NPlot.Gtk.dll -r:System.Drawing -r:Mono.Posix $(CHRONOJUMP_LIB) -nowarn:169 -out:$(CHRONOJUMP).exe
......
CHRONOJUMP DETAILED CHANGELOG:
22 aug 2007
improved image_test:
-show a image of text info when longDescription is available for selected test
-show chronojump_logo when change notebook
-fixed little bug in run values
-Added initially selected seconds as description on rj limited by time
-last value of RJ jumps or seconds limited, selected by default
-edit,selected,repair buttons and menuitem only shown when specific
event selected
-Added non standard (not in mono) icons: 3 bells, volume (high, muted),
statistics, report_window, graphs on stats win, repair events, delete
events, delete_last, repetitive conditions, eventExecute
-Now volume shows different icon if it's on or off
-Improved message on ending run interval
Bugs Fixed:
-Fixed bug on not showing correctly the personName on some parts of the code (like editing an event)
-Fixed crash on click repair pulse
-Fixed crash on expand a row on run_interval
17 aug 2007 (2)
fixed bug 447160: Round instead of only TrimDecimals
http://bugzilla.gnome.org/show_bug.cgi?id=447160
......@@ -19,7 +40,7 @@ CHRONOJUMP DETAILED CHANGELOG:
-language selector is also hidden on windows now (mono works with
locale)
-new method to connect with sqlite:
using Mono.Data.SqliteClient instead of using Mono.Data.Sqlite. Adding
using Mono.Data.Sqlite instead of using Mono.Data.SqliteClient. Adding
some dbcon.Close(); because now chrases if they are not present
PENDENT: connect fine with "data source"
......
No preview for this file type
This diff is collapsed.
......@@ -1922,11 +1922,11 @@ msgstr "TC promig"
#: ../src/execute/run.cs:112
msgid "You are IN, RUN when prepared!!"
msgstr "Sou DINS, quan estigueu preparat, SALTEU!"
msgstr "Sou DINS, quan estigueu preparat, CORREU!"
#: ../src/execute/run.cs:119
msgid "You are OUT, RUN when prepared!!"
msgstr "Sou FORA, quan estigueu preparat SALTEU!"
msgstr "Sou FORA, quan estigueu preparat CORREU!"
#: ../src/execute/run.cs:289 ../src/execute/run.cs:744
msgid "Last run"
......
This diff is collapsed.
......@@ -65,10 +65,11 @@ public class Event
{
get { return personID; }
}
public string PersonName
{
get { return personName; }
//get { return personName; }
get { return SqlitePerson.SelectJumperName(personID); }
}
~Event() {}
......
......@@ -73,5 +73,16 @@ public class EventType
{
get { return longDescription; }
}
public bool HasLongDescription
{
get {
if(longDescription != "")
return true;
else
return false;
}
}
}
......@@ -821,6 +821,7 @@ public class JumpRjExecute : JumpExecute
Console.WriteLine("----------WRITING----------");
int jumps;
string limitString = "";
string description = "";
//if user clicked in finish earlier
//or toggled with shouldFinishAtNextTime
......@@ -873,6 +874,8 @@ public class JumpRjExecute : JumpExecute
} else {
limitString = Util.GetTotalTime(tcString, tvString) + "T";
limited = limitString; //define limited because it's checked in treeviewJump, and possibly it's not the initial defined time (specially when allowFinishRjAfterTime is true)
//leave the initial selected time into description/comments:
description = string.Format(Catalog.GetString("Initially selected {0} seconds"), limitAsDouble.ToString());
}
} else {
if(jumpsLimited) {
......@@ -889,6 +892,9 @@ public class JumpRjExecute : JumpExecute
limitString = Util.GetTotalTime(tcString, tvString) + "T";
limited = limitString; //define limited because it's checked in treeviewJump, and possibly it's not the initial defined time (specially when allowFinishRjAfterTime is true)
//leave the initial selected time into description/comments:
description = string.Format(Catalog.GetString("Initially selected {0} seconds"), limitAsDouble.ToString());
string [] myStringFull = tcString.Split(new char[] {'='});
jumps = myStringFull.Length;
}
......@@ -897,7 +903,7 @@ public class JumpRjExecute : JumpExecute
if(tempTable)
SqliteJump.InsertRj("tempJumpRj", "NULL", personID, sessionID,
type, Util.GetMax(tvString), Util.GetMax(tcString),
fall, weight, "", //fall, weight, description
fall, weight, description,
Util.GetAverage(tvString), Util.GetAverage(tcString),
tvString, tcString,
jumps, Util.GetTotalTime(tcString, tvString), limitString
......@@ -905,14 +911,14 @@ public class JumpRjExecute : JumpExecute
else {
uniqueID = SqliteJump.InsertRj("jumpRj", "NULL", personID, sessionID,
type, Util.GetMax(tvString), Util.GetMax(tcString),
fall, weight, "", //fall, weight, description
fall, weight, description,
Util.GetAverage(tvString), Util.GetAverage(tcString),
tvString, tcString,
jumps, Util.GetTotalTime(tcString, tvString), limitString
);
//define the created object
eventDone = new JumpRj(uniqueID, personID, sessionID, type, tvString, tcString, fall, weight, "", jumps, Util.GetTotalTime(tcString, tvString), limitString);
eventDone = new JumpRj(uniqueID, personID, sessionID, type, tvString, tcString, fall, weight, description, jumps, Util.GetTotalTime(tcString, tvString), limitString);
//event will be raised, and managed in chronojump.cs
......
......@@ -741,8 +741,14 @@ public class RunIntervalExecute : RunExecute
eventDone = new RunInterval(uniqueID, personID, sessionID, type, distanceTotal, timeTotal, distanceInterval, intervalTimesString, tracks, "", limitString);
string myStringPush = Catalog.GetString("Last run") + ": " + RunnerName + " " +
type + " (" + limitString + ") " +
string tempValuesString = "";
if(tracksLimited)
tempValuesString = " (" + distanceInterval + "x" + tracks + "R), " + Catalog.GetString("Time") + ": " + Util.TrimDecimals( timeTotal.ToString(), pDN);
else
tempValuesString = " (" + distanceInterval + "x" + Util.TrimDecimals( timeTotal.ToString(), pDN) + "T), " + Catalog.GetString("Tracks") + ": " + tracks;
string myStringPush = Catalog.GetString("Last run") + ": " + RunnerName + ", " +
type + tempValuesString + ", " +
Catalog.GetString("AVG Speed") + ": " + Util.TrimDecimals(
Util.GetSpeed(distanceTotal.ToString(),
timeTotal.ToString(), metersSecondsPreferred )
......
......@@ -268,6 +268,23 @@ public class EventExecuteWindow
layout = new Pango.Layout (drawingarea.PangoContext);
layout.FontDescription = Pango.FontDescription.FromString ("Courier 7");
putNonStandardIcons();
}
private void putNonStandardIcons() {
Pixbuf pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell_green.png");
image_jump_reactive_tf_good.Pixbuf = pixbuf;
image_jump_reactive_tc_good.Pixbuf = pixbuf;
image_jump_reactive_tf_tc_good.Pixbuf = pixbuf;
image_run_interval_time_good.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell_red.png");
image_jump_reactive_tf_bad.Pixbuf = pixbuf;
image_jump_reactive_tc_bad.Pixbuf = pixbuf;
image_jump_reactive_tf_tc_bad.Pixbuf = pixbuf;
image_run_interval_time_bad.Pixbuf = pixbuf;
}
private void hideImages() {
......
......@@ -804,7 +804,7 @@ public class JumpExtraWindow
[Widget] Gtk.Label label_cm;
static string option = "Kg";
static double limited = 3;
static double limited = 10;
static bool jumpsLimited;
static int weight = 20;
static int fall = 20;
......@@ -838,7 +838,8 @@ public class JumpExtraWindow
if(myJumpType.FixedValue > 0) {
JumpExtraWindowBox.spinbutton_limit.Sensitive = false;
JumpExtraWindowBox.spinbutton_limit.Value = myJumpType.FixedValue;
}
} else
JumpExtraWindowBox.spinbutton_limit.Value = limited;
} else {
hideRepetitiveData();
}
......
......@@ -21,6 +21,7 @@
using System;
using Gtk;
using Gdk;
using Glade;
using Mono.Unix;
......@@ -66,6 +67,23 @@ public class RepetitiveConditionsWindow
[Widget] Gtk.Button button_test;
[Widget] Gtk.Button button_close;
//bells good (green)
[Widget] Gtk.Image image_repetitive_best_tf_tc;
[Widget] Gtk.Image image_repetitive_best_time;
[Widget] Gtk.Image image_repetitive_tf_greater;
[Widget] Gtk.Image image_repetitive_tc_lower;
[Widget] Gtk.Image image_repetitive_tf_tc_greater;
[Widget] Gtk.Image image_repetitive_time_lower;
[Widget] Gtk.Image image_repetitive_test_good;
//bells bad (red)
[Widget] Gtk.Image image_repetitive_worst_tf_tc;
[Widget] Gtk.Image image_repetitive_worst_time;
[Widget] Gtk.Image image_repetitive_tf_lower;
[Widget] Gtk.Image image_repetitive_tc_greater;
[Widget] Gtk.Image image_repetitive_tf_tc_lower;
[Widget] Gtk.Image image_repetitive_time_greater;
[Widget] Gtk.Image image_repetitive_test_bad;
//static bool volumeOn;
bool volumeOn;
......@@ -75,6 +93,8 @@ public class RepetitiveConditionsWindow
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "repetitive_conditions", null);
gladeXML.Autoconnect(this);
putNonStandardIcons();
}
static public RepetitiveConditionsWindow Create ()
......@@ -120,6 +140,26 @@ public class RepetitiveConditionsWindow
}
}
private void putNonStandardIcons() {
Pixbuf pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell_green.png");
image_repetitive_best_tf_tc.Pixbuf = pixbuf;
image_repetitive_best_time.Pixbuf = pixbuf;
image_repetitive_tf_greater.Pixbuf = pixbuf;
image_repetitive_tc_lower.Pixbuf = pixbuf;
image_repetitive_tf_tc_greater.Pixbuf = pixbuf;
image_repetitive_time_lower.Pixbuf = pixbuf;
image_repetitive_test_good.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell_red.png");
image_repetitive_worst_tf_tc.Pixbuf = pixbuf;
image_repetitive_worst_time.Pixbuf = pixbuf;
image_repetitive_tf_lower.Pixbuf = pixbuf;
image_repetitive_tc_greater.Pixbuf = pixbuf;
image_repetitive_tf_tc_lower.Pixbuf = pixbuf;
image_repetitive_time_greater.Pixbuf = pixbuf;
image_repetitive_test_bad.Pixbuf = pixbuf;
}
void on_button_test_clicked (object o, EventArgs args)
{
......
......@@ -21,6 +21,7 @@
using System;
using Gtk;
using Gdk;
using Glade;
using GLib; //for Value
using System.Collections; //ArrayList
......@@ -44,6 +45,7 @@ public class ReportWindow {
[Widget] Gtk.CheckButton cb_runs_simple;
[Widget] Gtk.CheckButton cb_runs_interval;
[Widget] Gtk.CheckButton cb_runs_interval_with_subruns;
[Widget] Gtk.Image image_report_win_report;
static ReportWindow ReportWindowBox;
......@@ -73,7 +75,11 @@ public class ReportWindow {
treeview1.Model = store;
treeview1.Selection.Changed += onSelectionEntry;
putNonStandardIcons();
}
//if it's created
static public ReportWindow Show (Gtk.Window parent, Report report)
......@@ -103,6 +109,11 @@ public class ReportWindow {
return ReportWindowBox;
}
private void putNonStandardIcons() {
Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_task-assigned.png");
image_report_win_report.Pixbuf = pixbuf;
}
protected void createTreeView (Gtk.TreeView tv) {
tv.HeadersVisible=true;
......
......@@ -122,7 +122,7 @@ public class EditRunWindow
string [] runners = SqlitePersonSession.SelectCurrentSession(myRun.SessionID, false); //not reversed
combo_runners = ComboBox.NewText();
UtilGtk.ComboUpdate(combo_runners, runners);
combo_runners.Active = UtilGtk.ComboMakeActive(runners, myRun.PersonID + ":" + myRun.RunnerName);
combo_runners.Active = UtilGtk.ComboMakeActive(runners, myRun.PersonID + ":" + myRun.PersonName);
hbox_combo_runner.PackStart(combo_runners, true, true, 0);
hbox_combo_runner.ShowAll();
......@@ -286,7 +286,7 @@ public class EditRunIntervalWindow
string [] runners = SqlitePersonSession.SelectCurrentSession(myRun.SessionID, false); //not reversed
combo_runners = ComboBox.NewText();
UtilGtk.ComboUpdate(combo_runners, runners);
combo_runners.Active = UtilGtk.ComboMakeActive(runners, myRun.PersonID + ":" + myRun.RunnerName);
combo_runners.Active = UtilGtk.ComboMakeActive(runners, myRun.PersonID + ":" + myRun.PersonName);
hbox_combo_runner.PackStart(combo_runners, true, true, 0);
hbox_combo_runner.ShowAll();
......
......@@ -21,6 +21,7 @@
using System;
using Gtk;
using Gdk;
using Glade;
using GLib; //for Value
using System.Text; //StringBuilder
......@@ -68,6 +69,9 @@ public class StatsWindow {
[Widget] Gtk.Box hbox_combo_select_checkboxes;
[Widget] Gtk.ComboBox combo_select_checkboxes;
[Widget] Gtk.Image image_stats_win_graph;
[Widget] Gtk.Image image_stats_win_report;
int prefsDigitsNumber;
bool heightPreferred;
......@@ -154,6 +158,8 @@ public class StatsWindow {
//in all the combos that are going to be created
blockFillingTreeview = true;
putNonStandardIcons();
createComboSelectCheckboxes();
createComboStatsType();
......@@ -185,6 +191,7 @@ public class StatsWindow {
prefsDigitsNumber, heightPreferred,
report, reportWin);
}
StatsWindowBox.stats_window.Show ();
return StatsWindowBox;
......@@ -195,6 +202,14 @@ public class StatsWindow {
StatsWindowBox.stats_window.Hide ();
}
private void putNonStandardIcons() {
Pixbuf pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "gpm-statistics.png");
image_stats_win_graph.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_task-assigned.png");
image_stats_win_report.Pixbuf = pixbuf;
}
public void InitializeSession(Session newCurrentSession)
{
currentSession = newCurrentSession;
......
......@@ -129,7 +129,6 @@ public class JumpRj : Jump
this.limited = limited;
}
public string Limited
{
get { return limited; }
......
......@@ -118,8 +118,9 @@ public class JumpType : EventType
jumpsLimited = true;
fixedValue = 0;
isPredefined = true;
description = Catalog.GetString("Reactive Jump limited by Jumps");
imageFileName = "jump_rj.png";
description = Catalog.GetString("Reactive Jump limited by Jumps");
longDescription = "Testing long description here";
} else if(name == "RJ(t)") {
startIn = false;
hasWeight = false;
......
......@@ -42,7 +42,6 @@ public class Pulse : Event
int totalPulsesNum, string timesString, string description)
{
this.uniqueID = uniqueID;
this.personName = SqlitePerson.SelectJumperName(personID);
this.personID = personID;
this.sessionID = sessionID;
this.type = type;
......
......@@ -86,11 +86,6 @@ public class Run : Event
set { time = value; }
}
public string RunnerName
{
get { return SqlitePerson.SelectJumperName(personID); }
}
public bool MetersSecondsPreferred {
set { metersSecondsPreferred = value; }
}
......
......@@ -194,7 +194,6 @@ class SqlitePersonSession : Sqlite
count = 0;
while(reader.Read()) {
//myArray.Add (reader[0].ToString() + ": " + reader[1].ToString() );
myArray.Add (reader[0].ToString() + ":" + reader[1].ToString() );
count ++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment