From: <jb...@us...> - 2009-12-14 10:16:47
|
Revision: 433 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=433&view=rev Author: jblance Date: 2009-12-14 10:16:39 +0000 (Mon, 14 Dec 2009) Log Message: ----------- Added 'proper' lap support to GPX+ for tcxv2 and garmintools file imports (--gmaps3 to see lap info) Modified Paths: -------------- pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl pytrainer/trunk/plugins/garmintools/garmintools.py pytrainer/trunk/plugins/garmintools/translate.xsl pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl 2009-12-14 07:40:08 UTC (rev 432) +++ pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl 2009-12-14 10:16:39 UTC (rev 433) @@ -58,6 +58,38 @@ </trkseg><xsl:value-of select="$newline"/> </xsl:for-each> </trk><xsl:value-of select="$newline"/> +<!-- Lap Data --> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <xsl:for-each select="t:TrainingCenterDatabase/t:Activities/t:Activity/t:Lap"> + <xsl:variable name="vIndex"> + <xsl:number count="t:Lap"/> + </xsl:variable> + <gpxdata:lap><xsl:value-of select="$newline"/> + <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> + <xsl:variable name="stlat"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LongitudeDegrees"/></xsl:variable> + <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> + <xsl:variable name="cnt"><xsl:value-of select="count(t:Track/t:Trackpoint/t:Position)"/></xsl:variable> + <xsl:variable name="endlat"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="endlon"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LongitudeDegrees"/></xsl:variable> + <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> + <gpxdata:startTime><xsl:value-of select="@StartTime"/></gpxdata:startTime><xsl:value-of select="$newline"/> + <gpxdata:elapsedTime><xsl:value-of select="t:TotalTimeSeconds"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> + <gpxdata:calories><xsl:value-of select="t:Calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + <gpxdata:distance><xsl:value-of select="t:DistanceMeters"/></gpxdata:distance><xsl:value-of select="$newline"/> + <!-- <gpxdata:trackReference>Reference information for the track which corresponds to this lap type="trackReferenceType"</gpxdata:trackReference><xsl:value-of select="$newline"/> --> + <gpxdata:summary><xsl:value-of select="$newline"/> + <MaximumSpeed kind="max"><xsl:value-of select="t:MaximumSpeed"/></MaximumSpeed><xsl:value-of select="$newline"/> + <AverageHeartRateBpm kind="avg"><xsl:value-of select="t:AverageHeartRateBpm/t:Value"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> + <MaximumHeartRateBpm kind="max"><xsl:value-of select="t:MaximumHeartRateBpm/t:Value"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> + </gpxdata:summary><xsl:value-of select="$newline"/> + <gpxdata:trigger><xsl:value-of select="t:TriggerMethod"/></gpxdata:trigger><xsl:value-of select="$newline"/> + <gpxdata:intensity><xsl:value-of select="t:Intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> + </gpxdata:lap><xsl:value-of select="$newline"/> + </xsl:for-each> + </extensions><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet> Modified: pytrainer/trunk/plugins/garmintools/garmintools.py =================================================================== --- pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-14 07:40:08 UTC (rev 432) +++ pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-14 10:16:39 UTC (rev 433) @@ -106,7 +106,6 @@ sport = sport.capitalize() except: sport = "import" - print sport return sport def detailsFromFile(self, tree): @@ -116,7 +115,7 @@ if pointElement is not None: #Try to get time from point time = pointElement.get("time") - print "TODO first time is different from time used by gpsbabel and has locale embedded" + time + print "#TODO first time is different from time used by gpsbabel and has locale embedded: " + time return time return None Modified: pytrainer/trunk/plugins/garmintools/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmintools/translate.xsl 2009-12-14 07:40:08 UTC (rev 432) +++ pytrainer/trunk/plugins/garmintools/translate.xsl 2009-12-14 10:16:39 UTC (rev 433) @@ -46,6 +46,37 @@ <xsl:value-of select="$newline"/> </trkseg><xsl:value-of select="$newline"/> </trk><xsl:value-of select="$newline"/> + +<!-- Lap Data --> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <xsl:for-each select="root/lap"> + <xsl:variable name="vIndex"> + <xsl:number count="lap"/> + </xsl:variable> + <gpxdata:lap><xsl:value-of select="$newline"/> + <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> + <xsl:variable name="stlat"><xsl:value-of select="begin_pos/@lat"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="begin_pos/@lon"/></xsl:variable> + <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> + <xsl:variable name="endlat"><xsl:value-of select="end_pos/@lat"/></xsl:variable> + <xsl:variable name="endlon"><xsl:value-of select="end_pos/@lon"/></xsl:variable> + <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> + <gpxdata:startTime><xsl:value-of select="@start"/></gpxdata:startTime><xsl:value-of select="$newline"/> + <gpxdata:elapsedTime><xsl:value-of select="@duration"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> <!-- Needs converting to seconds --> + <gpxdata:calories><xsl:value-of select="calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + <gpxdata:distance><xsl:value-of select="@distance"/></gpxdata:distance><xsl:value-of select="$newline"/> + <gpxdata:summary><xsl:value-of select="$newline"/> + <MaximumSpeed kind="max"><xsl:value-of select="max_speed"/></MaximumSpeed><xsl:value-of select="$newline"/> + <AverageHeartRateBpm kind="avg"><xsl:value-of select="avg_hr"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> + <MaximumHeartRateBpm kind="max"><xsl:value-of select="max_hr"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> + </gpxdata:summary><xsl:value-of select="$newline"/> + <gpxdata:trigger><xsl:value-of select="@trigger"/></gpxdata:trigger><xsl:value-of select="$newline"/> + <gpxdata:intensity><xsl:value-of select="intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> + </gpxdata:lap><xsl:value-of select="$newline"/> + </xsl:for-each> + </extensions><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet> Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-14 07:40:08 UTC (rev 432) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-14 10:16:39 UTC (rev 433) @@ -81,7 +81,7 @@ points = points.replace("\\","\\\\") if self.useGM3: logging.debug("Using Google Maps version 3 API") - laps = gpx.getLaps() # [](elapsedTime, lat, lon) + laps = gpx.getLaps() # [](elapsedTime, lat, lon, calories, distance) #"sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats" info = self.record.getrecordInfo(id_record) timeHours = int(info[0][3]) / 3600 @@ -191,7 +191,7 @@ for lap in laps: lapNumber = laps.index(lap)+1 content += "var lap%dmarker = new google.maps.Marker({position: new google.maps.LatLng(%f, %f), icon: lapimage, map: map, title:\"Lap%d\"}); \n " % (lapNumber, float(lap[1]), float(lap[2]), lapNumber) - content += "var lap%d = new google.maps.InfoWindow({content: \"End of lap:%s<br>Elapsed time:%s\" });\n" % (lapNumber, lapNumber, lap[0]) + content += "var lap%d = new google.maps.InfoWindow({content: \"End of lap:%s<br>Elapsed time:%s<br>Distance:%s<br>Calories:%s\" });\n" % (lapNumber, lapNumber, lap[0], lap[4], lap[3]) content += "google.maps.event.addListener(lap%dmarker, 'click', function() { lap%d.open(map,lap%dmarker); });\n" % (lapNumber,lapNumber,lapNumber) content += ''' Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-14 07:40:08 UTC (rev 432) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-14 10:16:39 UTC (rev 433) @@ -43,6 +43,10 @@ calorieTag = gpxdataNS.substitute(tag="calories") hrTag = gpxdataNS.substitute(tag="hr") cadTag = gpxdataNS.substitute(tag="cadence") +lapTag = gpxdataNS.substitute(tag="lap") +endPointTag = gpxdataNS.substitute(tag="endPoint") +elapsedTimeTag = gpxdataNS.substitute(tag="elapsedTime") +distanceTag = gpxdataNS.substitute(tag="distance") class Gpx: def __init__(self, data_path = None, filename = None, trkname = None): @@ -130,19 +134,18 @@ logging.debug(">>") lapInfo = [] tree = self.tree - date = tree.findtext(timeTag) - startTime = self.getDateTime(date) - trksegs = tree.findall(trackSegTag) - for trkseg in trksegs: - trkpts = trkseg.findall(trackPointTag) - trkpt = trkpts[-1] - lat = trkpt.get("lat") - lon = trkpt.get("lon") - temp = trkpt.findtext(timeTag) - time = self.getDateTime(temp) - elapsedTime = time - startTime - #print "Found time: %s, lat: %s lon: %s" % (elapsedTime, lat, lon) - lapInfo.append((elapsedTime, lat, lon)) + #date = tree.findtext(timeTag) + #startTime = self.getDateTime(date) + laps = tree.findall(lapTag) + for lap in laps: + endPoint = lap.find(endPointTag) + lat = endPoint.get("lat") + lon = endPoint.get("lon") + elapsedTime = lap.findtext(elapsedTimeTag) + calories = lap.findtext(calorieTag) + distance = lap.findtext(distanceTag) + #print "Found time: %s, lat: %s lon: %s cal: %s dist: %s " % (elapsedTime, lat, lon, calories, distance) + lapInfo.append((elapsedTime, lat, lon, calories, distance)) return lapInfo def _getValues(self): @@ -189,7 +192,6 @@ else: hr = 0 #get the cadence (if present) - #TODO cadResult = trkpoint.find(cadTag) if cadResult is not None: cadence = int(cadResult.text) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-14 07:40:08 UTC (rev 432) +++ pytrainer/trunk/pytrainer/main.py 2009-12-14 10:16:39 UTC (rev 433) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#432" + self.version ="1.7.0_svn#433" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-17 09:20:48
|
Revision: 434 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=434&view=rev Author: jblance Date: 2009-12-17 09:20:40 +0000 (Thu, 17 Dec 2009) Log Message: ----------- Some local date work - added display of date time to record, moved to dateutils parsing in gpx Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-12-14 10:16:39 UTC (rev 433) +++ pytrainer/trunk/glade/pytrainer.glade 2009-12-17 09:20:40 UTC (rev 434) @@ -459,7 +459,7 @@ <child> <widget class="GtkTable" id="table13"> <property name="visible">True</property> - <property name="n_rows">9</property> + <property name="n_rows">10</property> <property name="n_columns">6</property> <property name="homogeneous">False</property> <property name="row_spacing">6</property> @@ -522,6 +522,34 @@ </child> <child> + <widget class="GtkLabel" id="record_calories"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> <widget class="GtkLabel" id="ddsddsdsdsds"> <property name="visible">True</property> <property name="label" translatable="yes"><b>Sport:</b></property> @@ -663,9 +691,9 @@ </child> <child> - <widget class="GtkLabel" id="label11140"> + <widget class="GtkLabel" id="label11144"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Comments:</b></property> + <property name="label" translatable="yes"><b>Calories:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -689,6 +717,33 @@ <property name="y_options"></property> </packing> </child> + <child> + <widget class="GtkLabel" id="label11140"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Comments:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> <child> <widget class="GtkLabel" id="r_maxspeed_unit"> @@ -1056,6 +1111,90 @@ </child> <child> + <widget class="GtkLabel" id="label11145"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Date Time:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="record_datetime"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="record_datetime_offset"> + <property name="visible">True</property> + <property name="label" translatable="yes">m</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> <widget class="GtkLabel" id="record_pace"> <property name="visible">True</property> <property name="label" translatable="yes"> </property> @@ -1168,6 +1307,34 @@ </child> <child> + <widget class="GtkLabel" id="r_calories_unit"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cal</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> <widget class="GtkScrolledWindow" id="scrolledwindow6"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -1200,8 +1367,8 @@ <packing> <property name="left_attach">0</property> <property name="right_attach">6</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> </packing> </child> @@ -2093,7 +2260,7 @@ </child> <child> - <widget class="GtkLabel" id="record_calories"> + <widget class="GtkLabel" id="record_calories2"> <!-- not sure what this one is/... --> <property name="visible">True</property> <property name="label" translatable="yes"> </property> <property name="use_underline">False</property> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-14 10:16:39 UTC (rev 433) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-17 09:20:40 UTC (rev 434) @@ -21,6 +21,9 @@ import datetime import matplotlib +import dateutil.parser +from dateutil.tz import * # for tzutc() + from SimpleGladeApp import * from popupmenu import PopupMenu from aboutdialog import About @@ -188,6 +191,17 @@ pace = self.parseFloat(record_list[14]) #to review maxspeed = self.parseFloat(record_list[12]) #to review maxpace = self.parseFloat(record_list[13]) + + #Get datetime from date_time_utc and create a local datetime... + #TODO get data from date_time_local and parse + dateTime = dateutil.parser.parse(record_list[16]) + timezone = dateTime.tzname() + if timezone == 'UTC': #got a zulu time + local_dateTime = dateTime.astimezone(tzlocal()) #datetime with localtime offset (from OS) + else: + local_dateTime = dateTime #use datetime as supplied + recordDateTime = local_dateTime.strftime("%Y-%m-%d %H:%M:%S") + recordDateTimeOffset = local_dateTime.strftime("%z") if configuration.getValue("pytraining","prf_us_system") == "True": self.record_distance.set_text("%0.2f" %km2miles(distance)) @@ -214,6 +228,8 @@ self.record_minute.set_text("%02d" %min) self.record_second.set_text("%02d" %sec) self.record_calories.set_text("%0.0f" %calories) + self.record_datetime.set_text(recordDateTime) + self.record_datetime_offset.set_text(recordDateTimeOffset) self.record_title.set_text(title) buffer = self.record_comments.get_buffer() start,end = buffer.get_bounds() Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-14 10:16:39 UTC (rev 433) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-17 09:20:40 UTC (rev 434) @@ -28,6 +28,8 @@ import logging from xmlUtils import XMLParser from lxml import etree +import dateutil.parser +from dateutil.tz import * # for tzutc() # use of namespaces is mandatory if defined mainNS = string.Template(".//{http://www.topografix.com/GPX/1/1}$tag") @@ -92,7 +94,7 @@ timeResult = trk.find(timeTag) if timeResult is not None: time_ = timeResult.text # check timezone - mk_time = self.geDatetTime(time_) + mk_time = self.getDateTime(time_)[0] time_ = time.strftime("%Y-%m-%d", mk_time) else: time_ = _("No Data") @@ -101,22 +103,18 @@ return tracks def getDateTime(self, time_): - try: - theTime = datetime.strptime(time_, "%Y-%m-%dT%H:%M:%SZ") - return theTime - except: - pass - try: - #Time includes UTC offset... - #2009-12-02T12:58:55+01:00 - #TODO Need to sort time offset etc.... - offset = time_[-6:] - time_ = time_[:-6] #remove last 6 chars - ie UTC offset eg +01:00 - theTime = datetime.strptime(time_, "%Y-%m-%dT%H:%M:%S") - return theTime - except: - pass - return None + # Time can be in multiple formats + # - zulu 2009-12-15T09:00Z + # - local ISO8601 2009-12-15T10:00+01:00 + dateTime = dateutil.parser.parse(time_) + timezone = dateTime.tzname() + if timezone == 'UTC': #got a zulu time + local_dateTime = dateTime.astimezone(tzlocal()) #datetime with localtime offset (from OS) + else: + local_dateTime = dateTime #use datetime as supplied + utc_dateTime = dateTime.astimezone(tzutc()) #datetime with 00:00 offset + #print utc_dateTime, local_dateTime + return (utc_dateTime,local_dateTime) def getUnevenness(self): return self.upositive,self.unegative @@ -176,7 +174,7 @@ return retorno date_ = tree.find(timeTag).text - mk_time = self.getDateTime(date_) + mk_time = self.getDateTime(date_)[0] self.date = mk_time.strftime("%Y-%m-%d") for trkpoint in trkpoints: @@ -201,7 +199,7 @@ timeResult = trkpoint.find(timeTag) if timeResult is not None: date_ = timeResult.text - mk_time = self.getDateTime(date_) + mk_time = self.getDateTime(date_)[0] time_ = time.mktime(mk_time.timetuple()) #Convert date to seconds else: time_ = 1 @@ -286,14 +284,17 @@ Retrieves start time from a given gpx file args: - gpxFile: path to xml file (gpx format) - returns: string with start time - 2008-03-22T12:17:43Z or 2009-12-02T12:58:55+01:00 + returns: string with start time - 2008-03-22T12:17:43Z """ logging.debug(">>") date_time = self.tree.find(timeTag) #returns first instance found if date_time is None: print "Problems when retrieving start time from "+gpxFile+". Please check data integrity" return 0 - logging.debug(gpxFile+" | "+ date_time.text) + zuluDateTime = self.getDateTime(date_time.text)[0].strftime("%Y-%m-%dT%H:%M:%SZ") + logging.debug(gpxFile+" | "+ date_time.text +" | " + zuluDateTime) + print zuluDateTime + #return date_time.text logging.debug("<<") - return date_time.text + return zuluDateTime Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-14 10:16:39 UTC (rev 433) +++ pytrainer/trunk/pytrainer/main.py 2009-12-17 09:20:40 UTC (rev 434) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#433" + self.version ="1.7.0_svn#434" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2009-12-14 10:16:39 UTC (rev 433) +++ pytrainer/trunk/pytrainer/record.py 2009-12-17 09:20:40 UTC (rev 434) @@ -244,13 +244,13 @@ def getrecordInfo(self,id_record): logging.debug('--') return self.ddbb.select("records,sports", - "sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats", + "sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats,date_time_utc", "id_record=\"%s\" and records.sport=sports.id_sports" %id_record) def getrecordList(self,date): logging.debug('--') return self.ddbb.select("records,sports", - "sports.name,date,distance,time,beats,comments,average,calories,id_record,maxspeed,maxbeats", + "sports.name,date,distance,time,beats,comments,average,calories,id_record,maxspeed,maxbeats,date_time_utc", "date=\"%s\" and records.sport=sports.id_sports" %date) def getrecordPeriod(self,date_ini, date_end, sport=None): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-25 22:59:48
|
Revision: 435 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=435&view=rev Author: jblance Date: 2009-12-25 22:59:39 +0000 (Fri, 25 Dec 2009) Log Message: ----------- Update TCXv2 plugin to cater for files with multiple activities per file Modified Paths: -------------- pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2009-12-17 09:20:40 UTC (rev 434) +++ pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2009-12-25 22:59:39 UTC (rev 435) @@ -51,15 +51,19 @@ importfiles = [] if not selectedFiles: #Nothing selected return importfiles - for filename in selectedFiles: - if self.valid_input_file(filename): - if not self.inDatabase(filename): - sport = self.getSport(filename) - gpxfile = "%s/garmin-tcxv2-%d.gpx" % (self.tmpdir, len(importfiles)) - self.createGPXfile(gpxfile, filename) - importfiles.append((gpxfile, sport)) - else: - logging.debug("%s already in database. Skipping import." % (filename,) ) + for filename in selectedFiles: #Multiple files + if self.valid_input_file(filename): #TODO could consolidate tree generation here + tree = etree.ElementTree(file=filename) + #Possibly multiple entries in file + activities = self.getActivities(tree) + for activity in activities: + if not self.inDatabase(activity): + sport = self.getSport(activity) + gpxfile = "%s/garmin-tcxv2-%d.gpx" % (self.tmpdir, len(importfiles)) + self.createGPXfile(gpxfile, activity) + importfiles.append((gpxfile, sport)) + else: + logging.debug("File:%s activity %d already in database. Skipping import." % (filename, activities.index(activity)) ) else: logging.info("File %s failed validation" % (filename)) logging.debug("<<") @@ -76,42 +80,46 @@ validator = xmlValidator() return validator.validateXSL(filename, xslfile) - def inDatabase(self, filename): + def getActivities(self, tree): + '''Function to return all activities in Garmin training center version 2 file + ''' + root = tree.getroot() + activities = root.findall(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Activity") + return activities + + def inDatabase(self, activity): #comparing date and start time (sport may have been changed in DB after import) - time = self.detailsFromTCX(filename) + time = self.detailsFromTCX(activity) if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): return True else: return False - def getSport(self, filename): + def getSport(self, activity): #return sport from file or overide if present if self.sport: return self.sport - tree = etree.ElementTree(file=filename) - root = tree.getroot() - sportElement = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Activity") + #sportElement = activity.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Activity") try: - sport = sportElement.get("Sport") + sport = activity.get("Sport") except: sport = "import" return sport - def detailsFromTCX(self, filename): - tree = etree.ElementTree(file=filename) - root = tree.getroot() - timeElement = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Id") + def detailsFromTCX(self, activity): + timeElement = activity.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Id") if timeElement is None: return None else: return timeElement.text - def createGPXfile(self, gpxfile, filename): + def createGPXfile(self, gpxfile, activity): """ Function to transform a Garmin Training Center v2 Track to a valid GPX+ file """ xslt_doc = etree.parse(self.data_path+"/translate.xsl") transform = etree.XSLT(xslt_doc) - xml_doc = etree.parse(filename) + #xml_doc = etree.parse(filename) + xml_doc = activity result_tree = transform(xml_doc) result_tree.write(gpxfile, xml_declaration=True) Modified: pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl 2009-12-17 09:20:40 UTC (rev 434) +++ pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl 2009-12-25 22:59:39 UTC (rev 435) @@ -17,8 +17,8 @@ xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > <xsl:value-of select="$newline"/> - <xsl:variable name="sport"><xsl:value-of select="t:TrainingCenterDatabase/t:Activities/t:Activity/@Sport"/></xsl:variable> - <xsl:variable name="time"><xsl:value-of select="t:TrainingCenterDatabase/t:Activities/t:Activity/t:Id"/></xsl:variable> + <xsl:variable name="sport"><xsl:value-of select="t:Activity/@Sport"/></xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Activity/t:Id"/></xsl:variable> <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> <metadata><xsl:value-of select="$newline"/> <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> @@ -26,7 +26,7 @@ <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> </metadata><xsl:value-of select="$newline"/> <trk><xsl:value-of select="$newline"/> - <xsl:for-each select="t:TrainingCenterDatabase/t:Activities/t:Activity/t:Lap"> + <xsl:for-each select="t:Activity/t:Lap"> <trkseg><xsl:value-of select="$newline"/> <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> <xsl:for-each select="t:Track/t:Trackpoint"> @@ -61,7 +61,7 @@ <!-- Lap Data --> <xsl:value-of select="$newline"/> <extensions><xsl:value-of select="$newline"/> - <xsl:for-each select="t:TrainingCenterDatabase/t:Activities/t:Activity/t:Lap"> + <xsl:for-each select="t:Activity/t:Lap"> <xsl:variable name="vIndex"> <xsl:number count="t:Lap"/> </xsl:variable> @@ -70,7 +70,7 @@ <xsl:variable name="stlat"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LatitudeDegrees"/></xsl:variable> <xsl:variable name="stlon"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LongitudeDegrees"/></xsl:variable> <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> - <xsl:variable name="cnt"><xsl:value-of select="count(t:Track/t:Trackpoint/t:Position)"/></xsl:variable> + <xsl:variable name="cnt"><xsl:value-of select="count(t:Track/t:Trackpoint/t:Position)-1"/></xsl:variable> <xsl:variable name="endlat"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LatitudeDegrees"/></xsl:variable> <xsl:variable name="endlon"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LongitudeDegrees"/></xsl:variable> <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-17 09:20:40 UTC (rev 434) +++ pytrainer/trunk/pytrainer/main.py 2009-12-25 22:59:39 UTC (rev 435) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#434" + self.version ="1.7.0_svn#435" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-25 23:11:34
|
Revision: 436 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=436&view=rev Author: jblance Date: 2009-12-25 23:11:26 +0000 (Fri, 25 Dec 2009) Log Message: ----------- Add garmintools to setup.py, html encode start/finish info windows for Googlemaps 3 display Modified Paths: -------------- pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/setup.py Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-25 22:59:39 UTC (rev 435) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-25 23:11:26 UTC (rev 436) @@ -89,6 +89,8 @@ time = "%d%s %02d%s" % (timeHours, _("h"), timeMin, _("min")) startinfo = "<div id='info_content'>%s: %s</div>" % (info[0][0], info[0][9]) finishinfo = "<div id='info_content'>%s: %s<br>%s: %s%s</div>" % (_("Time"), time, _("Distance"), info[0][2], _("km")) + startinfo = startinfo.encode('ascii', 'xmlcharrefreplace') #Encode for html + finishinfo = finishinfo.encode('ascii', 'xmlcharrefreplace') #Encode for html self.createHtml_api3(polyline, minlat, minlon, maxlat, maxlon, startinfo, finishinfo, laps) else: logging.debug("Using Google Maps version 2 API") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-25 22:59:39 UTC (rev 435) +++ pytrainer/trunk/pytrainer/main.py 2009-12-25 23:11:26 UTC (rev 436) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#435" + self.version ="1.7.0_svn#436" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2009-12-25 22:59:39 UTC (rev 435) +++ pytrainer/trunk/setup.py 2009-12-25 23:11:26 UTC (rev 436) @@ -36,6 +36,7 @@ install_plugin("garmin-hr-file"), install_plugin("garmin-tcxv2"), install_plugin("googleearth"), + install_plugin("garmintools"), install_extension("wordpress"), (install_locale("es")), (install_locale("ca")), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-26 03:14:33
|
Revision: 442 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=442&view=rev Author: jblance Date: 2009-12-26 03:14:24 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Incorporate time into record display Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-12-26 02:19:28 UTC (rev 441) +++ pytrainer/trunk/glade/pytrainer.glade 2009-12-26 03:14:24 UTC (rev 442) @@ -940,6 +940,7 @@ <property name="y_options"></property> </packing> </child> + <child> <widget class="GtkLabel" id="record_unegative"> @@ -1110,7 +1111,7 @@ </packing> </child> - <child> +<!-- <child> <widget class="GtkLabel" id="label11145"> <property name="visible">True</property> <property name="label" translatable="yes"><b>Date Time:</b></property> @@ -1137,7 +1138,36 @@ <property name="y_options"></property> </packing> </child> +--> + <child> + <widget class="GtkLabel" id="record_time"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> +<!-- <child> <widget class="GtkLabel" id="record_datetime"> <property name="visible">True</property> @@ -1193,7 +1223,7 @@ <property name="y_options"></property> </packing> </child> - +--> <child> <widget class="GtkLabel" id="record_pace"> <property name="visible">True</property> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-26 02:19:28 UTC (rev 441) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-26 03:14:24 UTC (rev 442) @@ -198,13 +198,13 @@ date_time_utc = record_list[16] if date_time_local is not None: #Have a local time stored in DB dateTime = dateutil.parser.parse(date_time_local) - recordDateTime = dateTime.strftime("%Y-%m-%d %H:%M:%S") - recordDateTimeOffset = dateTime.strftime("%z") else: #No local time in DB - dateTime = dateutil.parser.parse(date_time_utc) - local_dateTime = dateTime.astimezone(tzlocal()) #datetime with localtime offset (using value from OS) - recordDateTime = local_dateTime.strftime("%Y-%m-%d %H:%M:%S") - recordDateTimeOffset = local_dateTime.strftime("%z") + tmpDateTime = dateutil.parser.parse(date_time_utc) + dateTime = tmpDateTime.astimezone(tzlocal()) #datetime with localtime offset (using value from OS) + recordDateTime = dateTime.strftime("%Y-%m-%d %H:%M:%S") + recordDate = dateTime.strftime("%x") + recordTime = dateTime.strftime("%X") + recordDateTimeOffset = dateTime.strftime("%z") if configuration.getValue("pytraining","prf_us_system") == "True": self.record_distance.set_text("%0.2f" %km2miles(distance)) @@ -225,14 +225,16 @@ self.record_maxpace.set_text("%0.2f" %maxpace) self.record_sport.set_text(sport) - self.record_date.set_text(str(date)) + #self.record_date.set_text(str(date)) + self.record_date.set_text(recordDate) + self.record_time.set_text(recordTime) hour,min,sec=self.parent.date.second2time(int(record_list[3])) self.record_hour.set_text("%d" %hour) self.record_minute.set_text("%02d" %min) self.record_second.set_text("%02d" %sec) self.record_calories.set_text("%0.0f" %calories) - self.record_datetime.set_text(recordDateTime) - self.record_datetime_offset.set_text(recordDateTimeOffset) + #self.record_datetime.set_text(recordDateTime) + #self.record_datetime_offset.set_text(recordDateTimeOffset) self.record_title.set_text(title) buffer = self.record_comments.get_buffer() start,end = buffer.get_bounds() Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-26 02:19:28 UTC (rev 441) +++ pytrainer/trunk/pytrainer/main.py 2009-12-26 03:14:24 UTC (rev 442) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#441" + self.version ="1.7.0_svn#442" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-26 10:14:19
|
Revision: 443 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=443&view=rev Author: jblance Date: 2009-12-26 10:14:10 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Separated New Entry dialog into a separate glade file Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowrecord.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/record.py Added Paths: ----------- pytrainer/trunk/glade/newrecord.glade Added: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade (rev 0) +++ pytrainer/trunk/glade/newrecord.glade 2009-12-26 10:14:10 UTC (rev 443) @@ -0,0 +1,1925 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="newrecord"> + <property name="visible">True</property> + <property name="title" translatable="yes">New Entry</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="icon">logo_mini.png</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="quit" last_modification_time="Sun, 23 Sep 2007 20:55:46 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkNotebook" id="notebook2"> + <property name="border_width">9</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + + <child> + <widget class="GtkVBox" id="vbox27"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame19"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment22"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table28"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">4</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label156"> + <property name="width_request">120</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Title:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_title"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label161"> + <property name="visible">True</property> + <property name="label" translatable="yes">GPX File:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_gpxfile"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button25"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-open</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_selectfile_clicked" last_modification_time="Mon, 23 Oct 2006 10:40:57 GMT"/> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button24"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Calculate Values</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_calculatevalues_clicked" last_modification_time="Mon, 23 Oct 2006 10:41:32 GMT"/> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="label" translatable="yes">Sport:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="rcd_sport"> + <property name="width_request">134</property> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483646"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Main</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame24"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment28"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table31"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">4</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label8"> + <property name="width_request">120</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Distance (Km):</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button10"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Calculate</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_calcdistance_clicked" last_modification_time="Mon, 15 May 2006 18:26:54 GMT"/> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="label" translatable="yes">Time:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox7"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkSpinButton" id="rcd_hour"> + <property name="width_request">47</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">0 0 23 1 2 2</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label35"> + <property name="visible">True</property> + <property name="label" translatable="yes">:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="rcd_min"> + <property name="width_request">47</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">0 0 59 1 2 2</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label36"> + <property name="visible">True</property> + <property name="label" translatable="yes">:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="rcd_second"> + <property name="width_request">42</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">0 0 59 1 2 2</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_distance"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + <property name="width_chars">7</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button11"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Calculate</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_calctime_clicked" last_modification_time="Mon, 15 May 2006 18:27:10 GMT"/> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label6"> + <property name="width_request">60</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Date:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkEntry" id="rcd_date"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + <property name="width_chars">10</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label28"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button7"> + <property name="visible">True</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_calendar_clicked" last_modification_time="Sun, 02 Apr 2006 18:37:59 GMT"/> + + <child> + <widget class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-index</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> + </child> + + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblTime"> + <property name="visible">True</property> + <property name="label" translatable="yes">Time:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="rcd_time"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + <property name="width_chars">10</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>General</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="Velocity"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment27"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table30"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">5</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label134"> + <property name="width_request">120</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Max (km/h):</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_maxvel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">7</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label133"> + <property name="visible">True</property> + <property name="label" translatable="yes">Velocity (km/h)</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button12"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Calculate</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_calcaverage_clicked" last_modification_time="Mon, 15 May 2006 18:27:33 GMT"/> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_average"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">7</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label162"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Velocity</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="label" translatable="yes">Quick Entry</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox26"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame20"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment23"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table23"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">5</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label138"> + <property name="width_request">110</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Max (min/km):</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_maxpace"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">7</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label137"> + <property name="width_request">110</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Pace (min/km):</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_pace"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">7</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button43"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Calculate</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_calcpace_clicked" last_modification_time="Tue, 29 Jan 2008 21:42:09 GMT"/> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label162"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Pace</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame21"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment24"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table24"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">5</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label139"> + <property name="width_request">110</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Ascent:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_upositive"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">7</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label140"> + <property name="width_request">110</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Descent:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="rcd_unegative"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">7</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label163"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Accumulated Altitude Change</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame22"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment25"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table25"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">6</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label142"> + <property name="width_request">110</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Max (bpm):</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label143"> + <property name="width_request">110</property> + <property name="visible">True</property> + <property n... [truncated message content] |
From: <dg...@us...> - 2009-12-26 18:46:49
|
Revision: 445 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=445&view=rev Author: dgranda Date: 2009-12-26 18:46:42 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Removing wrong start scripts to avoid confusion Removed Paths: ------------- pytrainer/trunk/pytrainer.py pytrainer/trunk/pytrainer.sh Deleted: pytrainer/trunk/pytrainer.py =================================================================== --- pytrainer/trunk/pytrainer.py 2009-12-26 15:06:35 UTC (rev 444) +++ pytrainer/trunk/pytrainer.py 2009-12-26 18:46:42 UTC (rev 445) @@ -1,54 +0,0 @@ -#!/usr/bin/python -# -*- coding: iso-8859-1 -*- - -#Copyright (C) Fiz Vazquez vu...@si... - -#This program is free software; you can redistribute it and/or -#modify it under the terms of the GNU General Public License -#as published by the Free Software Foundation; either version 2 -#of the License, or (at your option) any later version. - -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. - -#You should have received a copy of the GNU General Public License -#along with this program; if not, write to the Free Software -#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import locale -import gettext -import sys -import pygtk -pygtk.require('2.0') -import gtk -import gtk.glade -import os - -data_path = "./" - -DIR = "./locale" - -gettext.bindtextdomain("pytrainer", DIR) -gtk.glade.bindtextdomain("pytrainer", DIR) -gtk.glade.textdomain("pytrainer") -gettext.textdomain("pytrainer") -gettext.install("pytrainer",DIR,unicode=1) - -from pytrainer.main import pyTrainer - - -os.popen("MOZILLA_FIVE_HOME=/usr/lib/firefox") - -# 21.03.2008 - dgranda -# check command line arguments -# for more complex handling, see http://docs.python.org/lib/module-getopt.html -# only -d (for debug log level) is supported right now -def main(argv): - #Lanzamos el pytrainer - pytrainer = pyTrainer(None, data_path) - #pytrainer.run() - -if __name__ == "__main__": - main(sys.argv[1:]) Deleted: pytrainer/trunk/pytrainer.sh =================================================================== --- pytrainer/trunk/pytrainer.sh 2009-12-26 15:06:35 UTC (rev 444) +++ pytrainer/trunk/pytrainer.sh 2009-12-26 18:46:42 UTC (rev 445) @@ -1,9 +0,0 @@ -#/bin/sh -# First arg is log level, e.g. -d for DEBUG - -export LD_LIBRARY_PATH=/usr/lib/firefox -# Building xulrunner path to avoid problems when upgrading -PATH_XULRUNNER=/usr/lib -XULRUNNER_VERSION=`ls "$PATH_XULRUNNER" | grep xulrunner` -export MOZILLA_FIVE_HOME=$PATH_XULRUNNER/$XULRUNNER_VERSION -python pytrainer.py $* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-12-26 18:48:41
|
Revision: 446 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=446&view=rev Author: dgranda Date: 2009-12-26 18:48:33 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Reviewing installation process to a more pythonic way. Check INSTALL file for more info Modified Paths: -------------- pytrainer/trunk/INSTALL pytrainer/trunk/bin/pytrainer pytrainer/trunk/setup.py Modified: pytrainer/trunk/INSTALL =================================================================== --- pytrainer/trunk/INSTALL 2009-12-26 18:46:42 UTC (rev 445) +++ pytrainer/trunk/INSTALL 2009-12-26 18:48:33 UTC (rev 446) @@ -10,11 +10,12 @@ 1.1.- Working packages (Fedora 12 package revisions as of 2009.12.06 for 1.7.0) python-2.6.2-2 +python-devel-2.6.2-2 (to run the installation from tarball) python-matplotlib-0.98.5.2-5 gnome-python2-gtkmozembed-2.25.3-13 -pygtk2-libglade-2.16.0-1.fc12.i686 -pygtk2-2.16.0-1.fc12.i686 -SOAPpy-0.11.6-10.fc12.noarch +pygtk2-libglade-2.16.0-1 +pygtk2-2.16.0-1 +SOAPpy-0.11.6-10 python-lxml-2.2.3-1 libxml2-python-2.7.6-1 libxml2-2.7.6-1 @@ -27,14 +28,15 @@ 2.- Installation process -Copy the tarball file to a location where you have write and execution rights. Make sure executables are under your $PATH. +Copy the tarball file to a location where you have write and execution rights (e.g. /tmp or ~/). Make sure executables are under your $PATH. -$ tar -xf pytrainer-X.Y.Z.tar.gz +$ tar -xzf pytrainer-X.Y.Z.tar.gz $ cd pytrainer-X.Y.Z -$ ./pytrainer.sh -i -*** Log level set to INFO *** -... +$ sudo python setup.py install +$ pytrainer -i +For more information about the process, please check http://docs.python.org/distutils/setupscript.html + 3.- USB access Currently PyTrainer is using gpsbabel (http://www.gpsbabel.org) to retrieve information from the Garmin device. There are some problems regarding driver to access usb ports, please take a look at http://www.gpsbabel.org/os/Linux_Hotplug.html Modified: pytrainer/trunk/bin/pytrainer =================================================================== --- pytrainer/trunk/bin/pytrainer 2009-12-26 18:46:42 UTC (rev 445) +++ pytrainer/trunk/bin/pytrainer 2009-12-26 18:48:33 UTC (rev 446) @@ -24,9 +24,10 @@ pygtk.require('2.0') import gtk import gtk.glade +import os +import commands data_path = "/usr/share/pytrainer/" - DIR = "/usr/share/locale" gettext.bindtextdomain("pytrainer", DIR) @@ -37,9 +38,13 @@ from pytrainer.main import pyTrainer -def main(): +os.environ['MOZILLA_FIVE_HOME']="/usr/lib/firefox" +os.environ['LD_LIBRARY_PATH']="/usr/lib/firefox" +#os.environ['MOZILLA_FIVE_HOME']="/usr/lib64/xulrunner-1.9.1" +os.environ['MOZILLA_FIVE_HOME']=commands.getstatusoutput("find /usr/li* -name xulrunner -exec dirname {} \; 2>/dev/null")[1] + +def main(argv): pytrainer = pyTrainer(None, data_path) - + if __name__ == "__main__": - main() - + main(sys.argv[1:]) Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2009-12-26 18:46:42 UTC (rev 445) +++ pytrainer/trunk/setup.py 2009-12-26 18:48:33 UTC (rev 446) @@ -15,9 +15,9 @@ return "share/pytrainer/extensions/%s"%extension_name, glob("extensions/%s/*"%extension_name) setup( name="pytrainer", - version="1.6.0.9", + version="1.7.0", author="Fiz Vazquez", - author_email="vu...@si...", + maintainer_email="pyt...@li...", url="https://sourceforge.net/projects/pytrainer/", license="GNU General Public License(GPL)", packages=[ 'pytrainer', @@ -50,4 +50,4 @@ ('share/applications/',['pytrainer.desktop']) ], scripts=['bin/pytrainer'] -) +) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-27 22:12:30
|
Revision: 448 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=448&view=rev Author: jblance Date: 2009-12-27 22:12:14 +0000 (Sun, 27 Dec 2009) Log Message: ----------- Add time (time-of-day) to recordtreeview, change Time to Duration Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/glade/newrecord.glade 2009-12-27 22:12:14 UTC (rev 448) @@ -376,7 +376,7 @@ <child> <widget class="GtkLabel" id="label9"> <property name="visible">True</property> - <property name="label" translatable="yes">Time:</property> + <property name="label" translatable="yes">Duration:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/glade/pytrainer.glade 2009-12-27 22:12:14 UTC (rev 448) @@ -580,7 +580,7 @@ <child> <widget class="GtkLabel" id="label11124"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -3190,7 +3190,7 @@ <child> <widget class="GtkLabel" id="label38"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -4318,7 +4318,7 @@ <child> <widget class="GtkLabel" id="label100"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -5460,7 +5460,7 @@ <child> <widget class="GtkLabel" id="label100"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -6755,7 +6755,7 @@ <child> <widget class="GtkLabel" id="label118"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-27 22:12:14 UTC (rev 448) @@ -58,7 +58,7 @@ self.window1.set_title ("pyTrainer %s" % self.version) self.record_list = [] #create the columns for the listdayrecord - column_names=[_("id"),_("Sport"),_("Kilometer")] + column_names=[_("id"),_("Time"), _("Sport"),_("Kilometer")] self.create_treeview(self.recordTreeView,column_names) #create the columns for the listarea column_names=[_("id"),_("Title"),_("Date"),_("Distance"),_("Sport"),_("Time"),_("Beats"),_("Average"),("Calories")] @@ -914,7 +914,7 @@ #hasta aqui revisado def on_allRecordTreeView_button_press(self, treeview, event): logging.debug(">>") - print "on_allRecordTreeView_" + #print "on_allRecordTreeView_" x = int(event.x) y = int(event.y) time = event.time @@ -944,16 +944,23 @@ gobject.TYPE_INT, gobject.TYPE_STRING, gobject.TYPE_STRING, + gobject.TYPE_STRING, object) for i in record_list: iter = store.append() if not iterOne: iterOne = iter + dateTime = i[12] + if dateTime is not None: + localTime = dateutil.parser.parse(dateTime).strftime("%H:%M") + else: + localTime = "" store.set ( iter, 0, int(i[8]), - 1, str(i[0]), - 2, str(i[2]) + 1, str(localTime), + 2, str(i[0]), + 3, str(i[2]) ) self.recordTreeView.set_model(store) if iterOne: Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-27 22:12:14 UTC (rev 448) @@ -95,7 +95,7 @@ if timeResult is not None: time_ = timeResult.text # check timezone mk_time = self.getDateTime(time_)[0] - time_ = time.strftime("%Y-%m-%d", mk_time) + time_ = mk_time.strftime("%Y-%m-%d") else: time_ = _("No Data") logging.debug("name: "+name+" | time: "+time_) @@ -211,14 +211,18 @@ #chequeamos que la altura sea correcta / check that the height is correct if ele is not None: if len(ele)<15: - tmp_alt = int(float(ele)) + tmp_alt = int(float(ele)) #Why convert to int? ele are like "156.3515625" + else: + print "ele len >= 15" + ele else: tmp_alt= 0 + print "tmp_alt:" + tmp_alt #evitamos los puntos blancos / we avoid the white points if (float(lat) < -0.000001) or (float(lat) > 0.0000001): - tmp_lat = float(lat)*0.01745329252 - tmp_lon = float(lon)*0.01745329252 + #Convert lat and lon from degrees to radians + tmp_lat = float(lat)*0.01745329252 #0.01745329252 = number of radians in a degree + tmp_lon = float(lon)*0.01745329252 #57.29577951 = 1/0.01745329252 or degrees per radian tmp_time = int(time_) #Para las vueltas diferentes a la primera / For the returns different from first @@ -228,8 +232,9 @@ #Caqlculate diference betwen last and new point #tempnum=(math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)) #try: - #Pasamos la distancia de radianes a metros.. creo - #David no me mates que esto lo escribi hace anhos + #Pasamos la distancia de radianes a metros.. creo / We convert the distance from radians to meters + #David no me mates que esto lo escribi hace anhos / Do not kill me this was written ages ago + #http://faculty.washington.edu/blewis/ocn499/EXER04.htm equation for the distance between 2 points on a spherical earth try: #dist=math.acos(tempnum)*111.302*57.29577951 dist=math.acos((math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)))*111.302*57.29577951 Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/pytrainer/main.py 2009-12-27 22:12:14 UTC (rev 448) @@ -97,13 +97,10 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#447" + self.version ="1.7.0_svn#448" self.date = Date() - main_dir = os.path.realpath(os.path.dirname(__file__)) #why? - sys.path.insert(0, main_dir) #why? # Checking profile self.profile = Profile(self.data_path,self) - #self.profile.setVersion("0.0") self.profile.isProfileConfigured() self.log_level = log_level self.validate = validate This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-28 05:56:16
|
Revision: 450 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=450&view=rev Author: jblance Date: 2009-12-28 05:56:06 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Fix module references so module path hack not needed Modified Paths: -------------- pytrainer/trunk/plugins/garmin-gpx/garmingpx.py pytrainer/trunk/plugins/garmin-hr/garminhr.py pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py pytrainer/trunk/plugins/garmintools/garmintools.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/plugins/garmin-gpx/garmingpx.py =================================================================== --- pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2009-12-28 05:56:06 UTC (rev 450) @@ -21,10 +21,11 @@ import logging import os import shutil -from gui.dialogs import fileChooserDialog, guiFlush import xml.etree.cElementTree -from lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush +from pytrainer.lib.xmlUtils import XMLParser + class garmingpx(): """ Plugin to import from a GPX file or files Expects only one activity in each file Modified: pytrainer/trunk/plugins/garmin-hr/garminhr.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr/garminhr.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-hr/garminhr.py 2009-12-28 05:56:06 UTC (rev 450) @@ -20,7 +20,7 @@ import os, sys import logging from lxml import etree -from lib.xmlUtils import XMLParser +from pytrainer.lib.xmlUtils import XMLParser import commands Modified: pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2009-12-28 05:56:06 UTC (rev 450) @@ -22,9 +22,9 @@ import os import logging from lxml import etree -from lib.xmlUtils import XMLParser -from gui.dialogs import fileChooserDialog, guiFlush +from pytrainer.lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush class garminhrfile(): Modified: pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2009-12-28 05:56:06 UTC (rev 450) @@ -20,10 +20,9 @@ import logging import os from lxml import etree -from lib.xmlUtils import XMLParser +from pytrainer.lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush -from gui.dialogs import fileChooserDialog, guiFlush - class garminTCXv2(): def __init__(self, parent = None, validate=False): self.parent = parent Modified: pytrainer/trunk/plugins/garmintools/garmintools.py =================================================================== --- pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-28 05:56:06 UTC (rev 450) @@ -21,9 +21,9 @@ import os import StringIO from lxml import etree -from lib.xmlUtils import XMLParser -from gui.dialogs import fileChooserDialog, guiFlush +from pytrainer.lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush class garmintools(): def __init__(self, parent = None, validate=False): Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/pytrainer/main.py 2009-12-28 05:56:06 UTC (rev 450) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#449" + self.version ="1.7.0_svn#450" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) @@ -107,8 +107,6 @@ self.check = check self.gm3 = gm3 self.windowmain = None - main_dir = os.path.realpath(os.path.dirname(__file__)) #Add pytrainer directory to module search path - sys.path.insert(0, main_dir) # so modules in subdirs are found e.g. lib.xmlutil logging.debug('checking configuration...') self.conf = checkConf() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-30 03:56:02
|
Revision: 454 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=454&view=rev Author: jblance Date: 2009-12-30 03:55:53 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Added lap display to record graph - user selectable Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/recordgraph.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/glade/pytrainer.glade 2009-12-30 03:55:53 UTC (rev 454) @@ -1891,6 +1891,16 @@ <property name="fill">False</property> </packing> </child> + <child> + <widget class="GtkCheckButton" id="btnShowLaps"> + <property name="label" translatable="yes">Show Laps</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_btnShowLaps_toggled"/> + </widget> + </child> <child> <widget class="GtkLabel" id="label-2147483645"> Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-30 03:55:53 UTC (rev 454) @@ -199,7 +199,7 @@ elapsedTimeHours = int(elapsedTime/3600) elapsedTimeMins = int((elapsedTime - (elapsedTimeHours * 3600)) / 60) elapsedTimeSecs = elapsedTime - (elapsedTimeHours * 3600) - (elapsedTimeMins * 60) - strElapsedTime = "%0.0dh:%0.0dm:%0.2fs" % (elapsedTimeHours, elapsedTimeMins, elapsedTimeSecs) + strElapsedTime = "%0.0dh:%0.2dm:%0.2fs" % (elapsedTimeHours, elapsedTimeMins, elapsedTimeSecs) content += "var lap%dmarker = new google.maps.Marker({position: new google.maps.LatLng(%f, %f), icon: lapimage, map: map, title:\"Lap%d\"}); \n " % (lapNumber, float(lap[1]), float(lap[2]), lapNumber) content += "var lap%d = new google.maps.InfoWindow({content: \"<div class='info_content'>End of lap:%s<br>Elapsed time:%s<br>Distance:%0.2f km<br>Calories:%s</div>\" });\n" % (lapNumber, lapNumber, strElapsedTime, float(lap[4])/1000, lap[3]) content += "google.maps.event.addListener(lap%dmarker, 'click', function() { lap%d.open(map,lap%dmarker); });\n" % (lapNumber,lapNumber,lapNumber) Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-12-30 03:55:53 UTC (rev 454) @@ -44,7 +44,7 @@ return False #logging.debug('xvalues: '+str(xvalues)) #logging.debug('yvalues: '+str(yvalues)) - logging.debug("Type: "+type+" | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) + #logging.debug("Type: "+type+" | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) if type == "bars": self.drawBars(xvalues,yvalues,xlabel,ylabel,title,color) elif type == "plot": @@ -55,6 +55,7 @@ def drawBars(self,xvalues,yvalues,xlabel,ylabel,title,color): logging.debug('>>') + logging.debug("Type: bars | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) self.removeVboxChildren() figure = Figure(figsize=(6,4), dpi=72) numCols=len(xvalues[0]) @@ -129,7 +130,7 @@ def getColor(self, x): colors=["b","g","r","c","m","y","k", "w"] - if x > len(colors): + if x >= len(colors): x = x % len(colors) return colors[x] @@ -272,8 +273,9 @@ logging.debug('<<') - def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): + def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None,xzones=None): logging.debug('>>') + logging.debug("Type: plot | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) logging.debug('xlabel: '+str(xlabel)+' | ylabel: '+str(ylabel)+' | title: '+str(title)) self.removeVboxChildren() figure = Figure() @@ -286,15 +288,28 @@ axis.grid(True) for tl in axis.get_yticklabels(): - tl.set_color('%s' %color[i]) + tl.set_color('%s' %color[i]) + #Draw zones on graph, eg for each lap + if xzones is not None: + for xzone in xzones: + if xzones.index(xzone) % 2: + color='b' + else: + color='g' + axis.axvspan(xzone[0], xzone[1], alpha=0.25, facecolor=color) + maxX = max(xvalues[i]) if i>=1: ax2 = axis.twinx() ax2.plot(xvalues[i], yvalues[i], color=color[i]) for tl in ax2.get_yticklabels(): - tl.set_color('%s' %color[i]) + tl.set_color('%s' %color[i]) + maxXt = max(xvalues[i]) + if maxXt > maxX: + maxX = maxXt axis.set_xlabel(xlabel[i]) i+=1 - + axis.set_xlim(0, maxX) + if (len(xvalues)>1): axis.set_title("%s vs %s" %(ylabel[0],ylabel[1])) else: @@ -309,14 +324,11 @@ for child in self.vbox.get_children(): logging.debug('Child available: '+str(child)) - if title[0] == 'Stage Profile': - figure.savefig('/tmp/stage.png', dpi=75) - if title[0] == 'Heart Rate': - figure.savefig('/tmp/hr.png', dpi=75) logging.debug('<<') def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') + logging.debug("Type: pie | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) self.removeVboxChildren() figure = Figure(figsize=(6,4), dpi=72) axis = figure.add_subplot(111) Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-30 03:55:53 UTC (rev 454) @@ -59,7 +59,7 @@ self.window1.set_title ("pyTrainer %s" % self.version) self.record_list = [] #create the columns for the listdayrecord - column_names=[_("id"),_("Time"), _("Sport"),_("Kilometer")] + column_names=[_("id"),_("Start"), _("Sport"),_("Kilometer")] self.create_treeview(self.recordTreeView,column_names) #create the columns for the listarea column_names=[_("id"),_("Title"),_("Date"),_("Distance"),_("Sport"),_("Time"),_("Beats"),_("Average"),("Calories")] @@ -117,7 +117,7 @@ self.parent.runExtension(extension,id) def createGraphs(self,RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph): - self.drawarearecord = RecordGraph(self.record_vbox, self.window1, self.record_combovalue, self.record_combovalue2) + self.drawarearecord = RecordGraph(self.record_vbox, self.window1, self.record_combovalue, self.record_combovalue2, self.btnShowLaps) self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() @@ -245,7 +245,7 @@ self.recordview.set_sensitive(0) logging.debug(">>") - def actualize_recordgraph(self,record_list): + def actualize_recordgraph(self,record_list,laps=None): logging.debug(">>") if len(record_list)>0: self.record_vbox.set_sensitive(1) @@ -261,7 +261,7 @@ self.record_vbox.remove(child) self.record_vbox.set_sensitive(0) #logging.debug("Going to draw "+str(record_list)) - self.drawarearecord.drawgraph(record_list) + self.drawarearecord.drawgraph(record_list,laps) logging.debug("<<") def actualize_heartrategraph(self,record_list): @@ -846,6 +846,10 @@ def on_hidemap_clicked(self,widget): self.maparea.hide() self.infoarea.show() + + def on_btnShowLaps_toggled(self,widget): + logging.debug("--") + self.parent.refreshGraphView(self.selected_view) def on_day_combovalue_changed(self,widget): logging.debug("--") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/main.py 2009-12-30 03:55:53 UTC (rev 454) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#453" + self.version ="1.7.0_svn#454" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) @@ -287,9 +287,10 @@ id_record = selected.get_value(iter,0) gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx" %id_record if os.path.isfile(gpxfile): - gpx = Gpx(self.data_path,gpxfile) - gpx_tracklist = gpx.getTrackList() - self.windowmain.actualize_recordgraph(gpx_tracklist) + gpx = Gpx(self.data_path,gpxfile) + gpx_tracklist = gpx.getTrackList() + gpx_laps = gpx.getLaps() + self.windowmain.actualize_recordgraph(gpx_tracklist, gpx_laps) if view=="map": self.refreshMapView() Modified: pytrainer/trunk/pytrainer/recordgraph.py =================================================================== --- pytrainer/trunk/pytrainer/recordgraph.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/recordgraph.py 2009-12-30 03:55:53 UTC (rev 454) @@ -20,14 +20,15 @@ from gui.drawArea import DrawArea class RecordGraph: - def __init__(self, vbox = None, window = None, combovalue = None, combovalue2 = None): + def __init__(self, vbox = None, window = None, combovalue = None, combovalue2 = None, btnShowLaps = None): logging.debug(">>") self.drawarea = DrawArea(vbox, window) self.combovalue = combovalue self.combovalue2 = combovalue2 + self.showLaps = btnShowLaps logging.debug("<<") - def drawgraph(self,values): + def drawgraph(self,values,laps=None): logging.debug(">>") xval = [] yval = [] @@ -39,6 +40,19 @@ logging.debug("Value selected 1: "+ str(value_selected)) value_selected2 = self.combovalue2.get_active() logging.debug("Value selected 2: "+ str(value_selected2)) + showLaps = self.showLaps.get_active() + logging.debug("Show laps: "+ str(showLaps)) + #Determine left and right lap boundaries + if laps is not None and showLaps: + lapValues = [] + lastPoint = 0.0 + for lap in laps: #(elapsedTime, lat, lon, calories, distance) + thisPoint = float(lap[4])/1000.0 + lastPoint + lapValues.append((lastPoint, thisPoint)) + lastPoint = thisPoint + else: + lapValues = None + if value_selected < 0: self.combovalue.set_active(0) value_selected = 0 @@ -46,7 +60,6 @@ if value_selected2 < 0: self.combovalue2.set_active(0) value_selected2 = 0 - xvalues, yvalues = self.get_values(values,value_selected) xlabel,ylabel,title,color = self.get_value_params(value_selected) @@ -71,7 +84,8 @@ tit.append("") col.append(color) logging.info("To show: tit: "+str(tit)+" | col: "+str(col)+" | xlab: "+str(xlab)+" | ylab: "+str(ylab)) - self.drawarea.stadistics("plot",xval,yval,xlab,ylab,tit,col) + #self.drawPlot(xvalues,yvalues,xlabel,ylabel,title,color,zones) + self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues) logging.debug("<<") def get_value_params(self,value): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-02 19:46:40
|
Revision: 457 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=457&view=rev Author: jblance Date: 2010-01-02 19:46:27 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Move preferences to separate glade file Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowprofile.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/glade/profile.glade Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2010-01-02 03:02:37 UTC (rev 456) +++ pytrainer/trunk/glade/newrecord.glade 2010-01-02 19:46:27 UTC (rev 457) @@ -693,7 +693,7 @@ <child> <widget class="GtkLabel" id="lblTime"> <property name="visible">True</property> - <property name="label" translatable="yes">Time:</property> + <property name="label" translatable="yes">Start Time:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Added: pytrainer/trunk/glade/profile.glade =================================================================== --- pytrainer/trunk/glade/profile.glade (rev 0) +++ pytrainer/trunk/glade/profile.glade 2010-01-02 19:46:27 UTC (rev 457) @@ -0,0 +1,2771 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="newprofile"> + <property name="visible">True</property> + <property name="title" translatable="yes">Preferences</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="icon">logo_mini.png</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="gtk_main_quit" last_modification_time="Mon, 27 Mar 2006 21:26:56 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkNotebook" id="notebook3"> + <property name="border_width">9</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + <signal name="switch_page" handler="on_switch_page" last_modification_time="Sat, 01 Apr 2006 14:42:27 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox24"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame14"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment14"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table19"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkRadioButton" id="prf_metric_system"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Metric system</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="prf_us_system"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">U.S. customary units</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">prf_metric_system</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label20"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>System of Measurement</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame13"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment13"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table3"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">4</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="prf_ddbb_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database type:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbhost_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database host:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbhost"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbname_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database name:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbname"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="prf_ddbb"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + <signal name="changed" handler="on_prf_ddbb_changed" last_modification_time="Mon, 24 Apr 2006 19:58:19 GMT"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbuser_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database user:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbpass_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database pass:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbuser"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbpass"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">False</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label19"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Database</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame15"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment15"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table20"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label22"> + <property name="visible">True</property> + <property name="label" translatable="yes">Use this port for internal connections: </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry345"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">6</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small><b>Note:</b> Change this only if you know what you are doing</small></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label21"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Port Connnection</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483645"> + <property name="visible">True</property> + <property name="label" translatable="yes">General</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame12"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment12"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table2"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">4</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label14"> + <property name="visible">True</property> + <property name="label" translatable="yes">User name:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label15"> + <property name="visible">True</property> + <property name="label" translatable="yes">Gender:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="prf_gender"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label17"> + <property name="visible">True</property> + <property name="label" translatable="yes">Height:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_height"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_name"> + <property name="width_request">160</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label18"> + <property name="visible">True</property> + <property name="label" translatable="yes">Date of birth:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox50"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkEntry" id="prf_age"> + <property name="width_request">108</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button46"> + <property name="visible">True</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_calendar_clicked" last_modification_time="Sun, 02 Apr 2006 18:37:59 GMT"/> + + <child> + <widget class="GtkImage" id="image31"> + <property name="visible">True</property> + <property name="stock">gtk-index</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> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_weight"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label16"> + <property name="visible">True</property> + <property name="label" translatable="yes">Weight:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Athlete Details</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label13"> + <property name="visible">True</property> + <property name="label" translatable="yes">Athlete</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkNotebook" id="notebook5"> + <property name="visible">True</property> + <property name="show_tabs">False</property> + <property name="show_border">False</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + + <child> + <widget class="GtkFrame" id="sportlist"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment16"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkVBox" id="sportlist_"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkScrolledWindow" id="sportScrollWindow"> + <property name="height_request">170</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTreeView" id="sportTreeView"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">True</property> + <property name="rules_hint">False</property> + <property name="reorderable">False</property> + <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="label26"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-delete</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_delsport_clicked" last_modification_time="Tue, 17 Oct 2006 17:11:23 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button23"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-edit</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_editsport_clicked" last_modification_time="Tue, 17 Oct 2006 17:51:12 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button6"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-add</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_addsport_clicked" last_modification_time="Tue, 17 Oct 2006 17:11:05 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Sport List</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label135"> + <property name="visible">True</property> + <property name="label" translatable="yes">llist</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="addsport"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment18"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkVBox" id="addsport_"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkTable" id="table18"> + <property name="visible">True</property> + <property name="n_rows">4</property> + <property name="n_columns">3</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkEntry" id="newsportentry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label154"> + <property name="visible">True</property> + <property name="label" translatable="yes">Name:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label155"> + <property name="visible">True</property> + <property name="label" translatable="yes">M.E.T.:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="newmetentry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="visible">True</property> + <property name="label" translatable="yes">Extra Weight:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="newweightentry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label156"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options">... [truncated message content] |
From: <jb...@us...> - 2010-01-04 02:58:06
|
Revision: 458 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=458&view=rev Author: jblance Date: 2010-01-04 02:57:59 +0000 (Mon, 04 Jan 2010) Log Message: ----------- EXPERIMENTAL: Single import screen - incomplete use --testimport to see GUI Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/xmlUtils.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/setup.py Added Paths: ----------- pytrainer/trunk/glade/importdata.glade pytrainer/trunk/import/ pytrainer/trunk/import/file_garmintcxv1.py pytrainer/trunk/import/file_garmintcxv2.py pytrainer/trunk/import/file_garmintools.py pytrainer/trunk/import/translate_garmintools.xsl pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/importdata.py Added: pytrainer/trunk/glade/importdata.glade =================================================================== --- pytrainer/trunk/glade/importdata.glade (rev 0) +++ pytrainer/trunk/glade/importdata.glade 2010-01-04 02:57:59 UTC (rev 458) @@ -0,0 +1,372 @@ +<?xml version="1.0"?> +<glade-interface> + <!-- interface-requires gtk+ 2.16 --> + <!-- interface-naming-policy toplevel-contextual --> + <widget class="GtkWindow" id="win_importdata"> + <property name="visible">True</property> + <property name="title" translatable="yes">Import</property> + <property name="window_position">mouse</property> + <property name="default_width">600</property> + <property name="default_height">400</property> + <property name="destroy_with_parent">True</property> + <property name="icon">logo_mini.png</property> + <signal name="destroy_event" handler="on_win_importdata_destroy_event"/> + <signal name="delete_event" handler="on_win_importdata_delete_event"/> + <child> + <widget class="GtkNotebook" id="notebookMainTabs"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <signal name="switch_page" handler="on_notebookMainTabs_switch_page"/> + <child> + <widget class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <placeholder/> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame1</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelImportFromDevice"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Import from GPS Device</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> + <property name="type">tab</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vboxImportFromFile"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkFrame" id="frameSelectFile"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <child> + <widget class="GtkFileChooserButton" id="filechooserbuttonSelectFile"> + <property name="visible">True</property> + <property name="create_folders">False</property> + <property name="focus_on_click">False</property> + <signal name="file_set" handler="on_filechooserbuttonSelectFile_file_set"/> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="buttonClearFile"> + <property name="label" translatable="yes">Clear</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_buttonClearFile_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelSelectFileFrame"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Select a file to import</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">5</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkFrame" id="frameFileType"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkScrolledWindow" id="scrolledwindowImportEvents"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <child> + <widget class="GtkTreeView" id="treeviewImportEvents"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelEvents"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Select Activities to Import</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="hboxImportButton"> + <property name="visible">True</property> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkButton" id="buttonImport"> + <property name="label" translatable="yes">Import</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="on_buttonImport_clicked"/> + </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> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkStatusbar" id="statusbarImportFile"> + <property name="visible">True</property> + <property name="spacing">2</property> + <property name="has_resize_grip">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelImportFromFilePage"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Import from File</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="position">1</property> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> + <property name="type">tab</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vboxOptions"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkFrame" id="frameDefaultTab"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkHBox" id="hboxDefaultTab"> + <property name="visible">True</property> + <child> + <widget class="GtkRadioButton" id="radiobuttonTabGPSDevice"> + <property name="label" translatable="yes">Import from GPS Device</property> + <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> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">10</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkRadioButton" id="radiobuttonFile"> + <property name="label" translatable="yes">Import from File</property> + <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> + <property name="group">radiobuttonTabGPSDevice</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">10</property> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelDefaultTab"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Default to Tab</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="padding">5</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkHBox" id="hboxOptionButtons"> + <property name="visible">True</property> + <child> + <widget class="GtkButton" id="buttonReset"> + <property name="label" translatable="yes">Reset</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="on_buttonReset_clicked"/> + </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="GtkButton" id="buttonSave"> + <property name="label" translatable="yes">Save</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="on_buttonSave_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">10</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="padding">5</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkStatusbar" id="statusbarOptions"> + <property name="visible">True</property> + <property name="spacing">2</property> + <property name="has_resize_grip">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelOptionsPage"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Options</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="position">2</property> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> + <property name="type">tab</property> + </packing> + </child> + </widget> + </child> + </widget> +</glade-interface> Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2010-01-02 19:46:27 UTC (rev 457) +++ pytrainer/trunk/glade/pytrainer.glade 2010-01-04 02:57:59 UTC (rev 458) @@ -61,6 +61,15 @@ </child> <child> + <widget class="GtkImageMenuItem" id="menu_importdata"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Import</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_menu_importdata_activate" last_modification_time="Sun, 26 Mar 2006 19:38:34 GMT"/> + </widget> + </child> + + <child> <widget class="GtkSeparatorMenuItem" id="separador1"> <property name="visible">True</property> </widget> @@ -8566,4640 +8575,7 @@ </widget> </child> </widget> -<!-- moved to newrecord.glade -<widget class="GtkWindow" id="newrecord"> - <property name="visible">True</property> - <property name="title" translatable="yes">New Entry</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="icon">logo_mini.png</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> - <signal name="destroy" handler="quit" last_modification_time="Sun, 23 Sep 2007 20:55:46 GMT"/> - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkNotebook" id="notebook2"> - <property name="border_width">9</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> - - <child> - <widget class="GtkVBox" id="vbox27"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame19"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment22"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table28"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label156"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Title:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_title"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label161"> - <property name="visible">True</property> - <property name="label" translatable="yes">GPX File:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_gpxfile"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button25"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-open</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_selectfile_clicked" last_modification_time="Mon, 23 Oct 2006 10:40:57 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button24"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate Values</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calculatevalues_clicked" last_modification_time="Mon, 23 Oct 2006 10:41:32 GMT"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sport:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkComboBoxEntry" id="rcd_sport"> - <property name="width_request">134</property> - <property name="visible">True</property> - <property name="items" translatable="yes"></property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483646"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Main</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame24"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment28"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table31"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label8"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Distance (Km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button10"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcdistance_clicked" last_modification_time="Mon, 15 May 2006 18:26:54 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Time:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox7"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkSpinButton" id="rcd_hour"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 23 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label35"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_min"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label36"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_second"> - <property name="width_request">42</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_distance"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button11"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calctime_clicked" last_modification_time="Mon, 15 May 2006 18:27:10 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label6"> - <property name="width_request">60</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Date:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkEntry" id="rcd_date"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label28"> - <property name="visible">True</property> - <property name="label" translatable="yes"> </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button7"> - <property name="visible">True</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_calendar_clicked" last_modification_time="Sun, 02 Apr 2006 18:37:59 GMT"/> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-index</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> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483648"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>General</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="Velocity"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment27"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table30"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label134"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (km/h):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_maxvel"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label133"> - <property name="visible">True</property> - <property name="label" translatable="yes">Velocity (km/h)</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button12"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcaverage_clicked" last_modification_time="Mon, 15 May 2006 18:27:33 GMT"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_average"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label162"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Velocity</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quick Entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox26"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame20"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment23"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property nam... [truncated message content] |
From: <dg...@us...> - 2010-01-04 17:46:03
|
Revision: 459 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=459&view=rev Author: dgranda Date: 2010-01-04 17:45:56 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Initial commit for plugin to retieve data from GPS device using garmintools Modified Paths: -------------- pytrainer/trunk/plugins/garmin-hr/conf.xml pytrainer/trunk/plugins/garmin-hr/translate.xsl pytrainer/trunk/setup.py Modified: pytrainer/trunk/plugins/garmin-hr/conf.xml =================================================================== --- pytrainer/trunk/plugins/garmin-hr/conf.xml 2010-01-04 02:57:59 UTC (rev 458) +++ pytrainer/trunk/plugins/garmin-hr/conf.xml 2010-01-04 17:45:56 UTC (rev 459) @@ -1,11 +1,12 @@ <?xml version="1.0" ?> <pytrainer-plugin - name="Garmin via GPSBabel 1.3.5" - description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using GPSBabel (version 1.3.5)" - plugincode="garminhr" - pluginbutton="Import from Garmin GPS device (via GPSBabel)" - executable="garminhr" + name="Garmin via garmintools" + description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using garmintools" + plugincode="garmintools_full" + pluginbutton="Import from Garmin GPS device (via garmintools)" + executable="garmintools_full" > -<conf-values variable="device" value="usb:"/> <conf-values variable="Force_sport_to" value=""/> +<conf-values variable="Not_older_days" value="0"/> +<conf-values variable="Legacy_comparison" value="True"/> </pytrainer-plugin> Modified: pytrainer/trunk/plugins/garmin-hr/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmin-hr/translate.xsl 2010-01-04 02:57:59 UTC (rev 458) +++ pytrainer/trunk/plugins/garmin-hr/translate.xsl 2010-01-04 17:45:56 UTC (rev 459) @@ -2,7 +2,7 @@ <!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> <xsl:stylesheet version="1.0" -xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> @@ -17,8 +17,8 @@ xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > <xsl:value-of select="$newline"/> - <xsl:variable name="sport">"Run"</xsl:variable> - <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> + <xsl:variable name="sport"><xsl:value-of select="root/run/@sport"/></xsl:variable> + <xsl:variable name="time"><xsl:value-of select="root/point/@time"/></xsl:variable> <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> <metadata><xsl:value-of select="$newline"/> <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> @@ -26,28 +26,57 @@ <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> </metadata><xsl:value-of select="$newline"/> <trk><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Track"> <trkseg><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Trackpoint"> - <!-- only output a trkpt if a position exists --> - <xsl:if test="t:Position"> - <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> - <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> - <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> - <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> - <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> - <xsl:if test="t:HeartRateBpm"> - <extensions><xsl:value-of select="$newline"/> - <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> - </extensions><xsl:value-of select="$newline"/> - </xsl:if> - </trkpt><xsl:value-of select="$newline"/> - </xsl:if> + <!-- <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> --> + <xsl:for-each select="root/point"> + <xsl:if test="@lat"> <!-- only write trkpt if lat/lon exist --> + <xsl:variable name="lat"><xsl:value-of select="@lat"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="@lon"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="@alt"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="@time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="@hr"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="@hr"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> </xsl:for-each> <xsl:value-of select="$newline"/> </trkseg><xsl:value-of select="$newline"/> + </trk><xsl:value-of select="$newline"/> + +<!-- Lap Data --> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <xsl:for-each select="root/lap"> + <xsl:variable name="vIndex"> + <xsl:number count="lap"/> + </xsl:variable> + <gpxdata:lap><xsl:value-of select="$newline"/> + <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> + <xsl:variable name="stlat"><xsl:value-of select="begin_pos/@lat"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="begin_pos/@lon"/></xsl:variable> + <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> + <xsl:variable name="endlat"><xsl:value-of select="end_pos/@lat"/></xsl:variable> + <xsl:variable name="endlon"><xsl:value-of select="end_pos/@lon"/></xsl:variable> + <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> + <gpxdata:startTime><xsl:value-of select="@start"/></gpxdata:startTime><xsl:value-of select="$newline"/> + <gpxdata:elapsedTime><xsl:value-of select="@duration"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> <!-- Needs converting to seconds --> + <gpxdata:calories><xsl:value-of select="calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + <gpxdata:distance><xsl:value-of select="@distance"/></gpxdata:distance><xsl:value-of select="$newline"/> + <gpxdata:summary><xsl:value-of select="$newline"/> + <MaximumSpeed kind="max"><xsl:value-of select="max_speed"/></MaximumSpeed><xsl:value-of select="$newline"/> + <AverageHeartRateBpm kind="avg"><xsl:value-of select="avg_hr"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> + <MaximumHeartRateBpm kind="max"><xsl:value-of select="max_hr"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> + </gpxdata:summary><xsl:value-of select="$newline"/> + <gpxdata:trigger><xsl:value-of select="@trigger"/></gpxdata:trigger><xsl:value-of select="$newline"/> + <gpxdata:intensity><xsl:value-of select="intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> + </gpxdata:lap><xsl:value-of select="$newline"/> </xsl:for-each> - </trk><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet> Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2010-01-04 02:57:59 UTC (rev 458) +++ pytrainer/trunk/setup.py 2010-01-04 17:45:56 UTC (rev 459) @@ -40,6 +40,7 @@ install_plugin("garmin-tcxv2"), install_plugin("googleearth"), install_plugin("garmintools"), + install_plugin("garmintools_full"), install_extension("wordpress"), (install_locale("es")), (install_locale("ca")), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-01-04 18:17:04
|
Revision: 462 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=462&view=rev Author: dgranda Date: 2010-01-04 18:16:55 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Cosmetic changes to show dev version and short name for desktop icon Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer.desktop Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-04 18:08:27 UTC (rev 461) +++ pytrainer/trunk/pytrainer/main.py 2010-01-04 18:16:55 UTC (rev 462) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#458" + self.version ="1.7.0_svn#462" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) Modified: pytrainer/trunk/pytrainer.desktop =================================================================== --- pytrainer/trunk/pytrainer.desktop 2010-01-04 18:08:27 UTC (rev 461) +++ pytrainer/trunk/pytrainer.desktop 2010-01-04 18:16:55 UTC (rev 462) @@ -2,7 +2,7 @@ Version=1.0 Type=Application Encoding=UTF-8 -Name=pyTrainer sport training log +Name=pyTrainer Comment=The Free Sport Training Center Exec=pytrainer Icon=pytrainer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-04 23:34:39
|
Revision: 465 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=465&view=rev Author: jblance Date: 2010-01-04 23:34:32 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Separated Warning dialog into separate glade file Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/warning.py pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/glade/warning.glade Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/glade/pytrainer.glade 2010-01-04 23:34:32 UTC (rev 465) @@ -8835,130 +8835,6 @@ </child> </widget> -<widget class="GtkDialog" id="warning"> - <property name="visible">True</property> - <property name="title" translatable="yes">warning</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="icon">logo_mini.png</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> - <property name="has_separator">True</property> - <signal name="destroy" handler="gtk_main_quit" last_modification_time="Sat, 21 Oct 2006 09:00:50 GMT"/> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area2"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancelbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="response_id">-6</property> - <signal name="clicked" handler="on_cancel_clicked" last_modification_time="Sat, 21 Oct 2006 08:57:26 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkButton" id="okbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="response_id">-5</property> - <signal name="clicked" handler="on_accept_clicked" last_modification_time="Sat, 21 Oct 2006 09:24:25 GMT"/> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox28"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkImage" id="image14"> - <property name="visible">True</property> - <property name="icon_name">gtk-dialog-warning</property> - <property name="pixel_size">46</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> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="warningText"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - <widget class="GtkWindow" id="extensions"> <property name="width_request">606</property> <property name="height_request">249</property> Added: pytrainer/trunk/glade/warning.glade =================================================================== --- pytrainer/trunk/glade/warning.glade (rev 0) +++ pytrainer/trunk/glade/warning.glade 2010-01-04 23:34:32 UTC (rev 465) @@ -0,0 +1,98 @@ +<?xml version="1.0"?> +<glade-interface> + <!-- interface-requires gtk+ 2.6 --> + <!-- interface-naming-policy toplevel-contextual --> + <widget class="GtkDialog" id="warning"> + <property name="visible">True</property> + <property name="title" translatable="yes">Warning</property> + <property name="modal">True</property> + <property name="window_position">mouse</property> + <property name="icon">logo_mini.png</property> + <property name="type_hint">dialog</property> + <signal name="destroy" handler="gtk_main_quit"/> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox2"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkHBox" id="hbox28"> + <property name="visible">True</property> + <child> + <widget class="GtkImage" id="image14"> + <property name="visible">True</property> + <property name="pixel_size">46</property> + <property name="icon_name">gtk-dialog-warning</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="warningText"> + <property name="visible">True</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="label" translatable="yes">Warning</property> + <property name="use_markup">True</property> + <property name="wrap">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area2"> + <property name="visible">True</property> + <property name="layout_style">end</property> + <child> + <widget class="GtkButton" id="cancelbutton1"> + <property name="label">gtk-cancel</property> + <property name="response_id">-6</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + <signal name="clicked" handler="on_cancel_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="okbutton1"> + <property name="label">gtk-ok</property> + <property name="response_id">-5</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + <signal name="clicked" handler="on_accept_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </widget> + </child> + </widget> +</glade-interface> Modified: pytrainer/trunk/pytrainer/gui/warning.py =================================================================== --- pytrainer/trunk/pytrainer/gui/warning.py 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/pytrainer/gui/warning.py 2010-01-04 23:34:32 UTC (rev 465) @@ -24,7 +24,7 @@ self.cancelmethod = cancelmethod self.okparams = okparams self.cancelparams = cancelparams - glade_path="glade/pytrainer.glade" + glade_path="glade/warning.glade" self.path = data_path+glade_path root = "warning" domain = None Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-04 23:34:32 UTC (rev 465) @@ -151,18 +151,6 @@ self.buttonImport.set_sensitive(1) return - def treeviewImportEvents_header_checkbox(self, column, store): - """ - Handler for click on checkbox column - """ - if store is None: - return - for item in store: - if item[1]: - self.treeviewImportEvents_setCheckboxes(False) - return - self.treeviewImportEvents_setCheckboxes(True) - def treeviewImportEvents_setCheckboxes(self, state): """ Sets or unsets all checkboxes @@ -193,6 +181,18 @@ ## Window signal handlers ## ############################ + def treeviewImportEvents_header_checkbox(self, column, store): + """ + Handler for click on checkbox column + """ + if store is None: + return + for item in store: + if item[1]: + self.treeviewImportEvents_setCheckboxes(False) + return + self.treeviewImportEvents_setCheckboxes(True) + def on_win_importdata_delete_event(self, widget, window): self.win_importdata.hide() @@ -211,8 +211,9 @@ pass def on_filechooserbuttonSelectFile_file_set(self, widget): - self.buttonClearFile.set_sensitive(1) - self.updateStatusbar(self.statusbarImportFile, "" ) + self.buttonClearFile.set_sensitive(1) #Enable clear button + self.buttonImport.set_sensitive(0) #Disable import button + self.updateStatusbar(self.statusbarImportFile, "" ) #Clear status bar #Build treeview if self.store is None: self.store = self.build_tree_view() @@ -225,7 +226,7 @@ #Get activities in file activitiesSummary = processClass.getActivitiesSummary() for activity in activitiesSummary: - if not activity[0]: + if not activity[1]: #Activity selected, so enable import button self.buttonImport.set_sensitive(1) note = "" @@ -244,6 +245,7 @@ 6, note, ) else: + #Selected file not understood by any of the process files self.updateStatusbar(self.statusbarImportFile, _("Unknown file type") ) #Display warning msg = _("File selected is of unknown or unsupported file type") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/pytrainer/main.py 2010-01-04 23:34:32 UTC (rev 465) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#462" + self.version ="1.7.0_svn#465" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-05 02:08:29
|
Revision: 466 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=466&view=rev Author: jblance Date: 2010-01-05 02:08:23 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Unified import now imports selected activities (file tab only) Modified Paths: -------------- pytrainer/trunk/glade/importdata.glade pytrainer/trunk/import/file_garmintcxv1.py pytrainer/trunk/import/file_garmintcxv2.py pytrainer/trunk/import/file_garmintools.py pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/import/translate_garmintcxv1.xsl pytrainer/trunk/import/translate_garmintcxv2.xsl Modified: pytrainer/trunk/glade/importdata.glade =================================================================== --- pytrainer/trunk/glade/importdata.glade 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/glade/importdata.glade 2010-01-05 02:08:23 UTC (rev 466) @@ -164,9 +164,6 @@ <widget class="GtkHBox" id="hboxImportButton"> <property name="visible">True</property> <child> - <placeholder/> - </child> - <child> <widget class="GtkButton" id="buttonImport"> <property name="label" translatable="yes">Import</property> <property name="visible">True</property> @@ -182,6 +179,22 @@ <property name="position">1</property> </packing> </child> + <child> + <widget class="GtkButton" id="buttonCancel"> + <property name="label">gtk-close</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_buttonCancel_clicked"/> + </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> </widget> <packing> <property name="expand">False</property> Modified: pytrainer/trunk/import/file_garmintcxv1.py =================================================================== --- pytrainer/trunk/import/file_garmintcxv1.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/import/file_garmintcxv1.py 2010-01-05 02:08:23 UTC (rev 466) @@ -36,6 +36,8 @@ self.data_path = os.path.dirname(__file__) self.xmldoc = None self.activitiesSummary = [] + self.activities = [] + self.sportsList = ("Running", "Biking", "Other", "MultiSport") def getXmldoc(self): ''' Function to return parsed xmlfile ''' @@ -74,14 +76,16 @@ #Valid file self.xmldoc = xmldoc #Possibly multiple entries in file - for (sport, activities) in self.getActivities(xmldoc): + self.activities = self.getActivities(xmldoc) + for (sport, activities) in self.activities: logging.debug("Found %d tracks for %s sport in %s" % (len(activities), sport, filename)) for activity in activities: startTime = self.getDateTime(self.getStartTimeFromActivity(activity)) inDatabase = self.inDatabase(activity, startTime) duration = self.getDetails(activity, startTime) distance = "" - self.activitiesSummary.append( (activities.index(activity), + index = "%d:%d" % (self.activities.index((sport, activities)), activities.index(activity)) + self.activitiesSummary.append( (index, inDatabase, startTime[1].strftime("%Y-%m-%dT%H:%M:%S"), distance , @@ -98,10 +102,9 @@ def getActivities(self, tree): """ Function to return all the tracks in a Garmin Training Center v1 file """ - sportsList = ("Running", "Biking", "Other", "MultiSport") result = [] root = tree.getroot() - for sport in sportsList: + for sport in self.sportsList: try: sportLevel = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}%s" % sport) tracks = sportLevel.findall(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Track") @@ -144,13 +147,33 @@ #print utc_dateTime, local_dateTime return (utc_dateTime,local_dateTime) - '''def createGPXfile(self, gpxfile, activity): + def getGPXFile(self, ID): + """ + Generate GPX file based on activity ID + + Returns (sport, GPX filename) + """ + sport = None + gpxFile = None + #index = "%d:%d" % (self.activities.index((sport, activities)), activities.index(activity)) + sportID, activityID = ID.split(':') + sportID = int(sportID) + activityID = int(activityID) + sport, activities = self.activities[sportID] + activitiesCount = len(self.activities) + if activitiesCount > 0 and activityID < activitiesCount: + gpxFile = "%s/garmin-tcxv1-%d.gpx" % (self.tmpdir, activityID) + activity = activities[activityID] + self.createGPXfile(gpxFile, activity) + return sport, gpxFile + + def createGPXfile(self, gpxfile, activity): """ Function to transform a Garmin Training Center v2 Track to a valid GPX+ file """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") + xslt_doc = etree.parse(self.data_path+"/translate_garmintcxv1.xsl") transform = etree.XSLT(xslt_doc) #xml_doc = etree.parse(filename) xml_doc = activity result_tree = transform(xml_doc) - result_tree.write(gpxfile, xml_declaration=True)''' + result_tree.write(gpxfile, xml_declaration=True) Modified: pytrainer/trunk/import/file_garmintcxv2.py =================================================================== --- pytrainer/trunk/import/file_garmintcxv2.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/import/file_garmintcxv2.py 2010-01-05 02:08:23 UTC (rev 466) @@ -36,6 +36,7 @@ self.data_path = os.path.dirname(__file__) self.xmldoc = None self.activitiesSummary = [] + self.activities = [] def getXmldoc(self): ''' Function to return parsed xmlfile ''' @@ -79,15 +80,15 @@ #Valid file self.xmldoc = xmldoc #Possibly multiple entries in file - activities = self.getActivities(xmldoc) - for activity in activities: + self.activities = self.getActivities(xmldoc) + for activity in self.activities: startTime = self.getDateTime(self.getStartTimeFromActivity(activity)) inDatabase = self.inDatabase(activity, startTime) sport = self.getSport(activity) distance, duration = self.getDetails(activity, startTime) distance = distance / 1000.0 - self.activitiesSummary.append( (activities.index(activity), + self.activitiesSummary.append( (self.activities.index(activity), inDatabase, startTime[1].strftime("%Y-%m-%dT%H:%M:%S"), "%0.2f" % distance , @@ -151,13 +152,31 @@ #print utc_dateTime, local_dateTime return (utc_dateTime,local_dateTime) - '''def createGPXfile(self, gpxfile, activity): + def getGPXFile(self, ID): + """ + Generate GPX file based on activity ID + + Returns (sport, GPX filename) + """ + sport = None + gpxFile = None + activityID = int(ID) + activitiesCount = len(self.activities) + if activitiesCount > 0 and activityID < activitiesCount: + gpxFile = "%s/garmin-tcxv2-%d.gpx" % (self.tmpdir, activityID) + activity = self.activities[int(activityID)] + sport = self.getSport(activity) + self.createGPXfile(gpxFile, activity) + return sport, gpxFile + + + def createGPXfile(self, gpxfile, activity): """ Function to transform a Garmin Training Center v2 Track to a valid GPX+ file """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") + xslt_doc = etree.parse(self.data_path+"/translate_garmintcxv2.xsl") transform = etree.XSLT(xslt_doc) #xml_doc = etree.parse(filename) xml_doc = activity result_tree = transform(xml_doc) - result_tree.write(gpxfile, xml_declaration=True)''' + result_tree.write(gpxfile, xml_declaration=True) Modified: pytrainer/trunk/import/file_garmintools.py =================================================================== --- pytrainer/trunk/import/file_garmintools.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/import/file_garmintools.py 2010-01-05 02:08:23 UTC (rev 466) @@ -149,11 +149,25 @@ return time return None - '''def createGPXfile(self, gpxfile, tree): + def getGPXFile(self, ID): + """ + Generate GPX file based on activity ID + + Returns (sport, GPX filename) + """ + sport = None + gpxFile = None + if ID == "0": #Only one activity in file + gpxFile = "%s/garmintools-%s.gpx" % (self.tmpdir, ID) + sport = self.getSport(self.xmldoc) + self.createGPXfile(gpxFile, self.xmldoc) + return sport, gpxFile + + def createGPXfile(self, gpxfile, tree): """ Function to transform a Garmintools dump file to a valid GPX+ file """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") + xslt_doc = etree.parse(self.data_path+"/translate_garmintools.xsl") transform = etree.XSLT(xslt_doc) result_tree = transform(tree) - result_tree.write(gpxfile, xml_declaration=True)''' + result_tree.write(gpxfile, xml_declaration=True) Added: pytrainer/trunk/import/translate_garmintcxv1.xsl =================================================================== --- pytrainer/trunk/import/translate_garmintcxv1.xsl (rev 0) +++ pytrainer/trunk/import/translate_garmintcxv1.xsl 2010-01-05 02:08:23 UTC (rev 466) @@ -0,0 +1,53 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport">"Run"</xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> + <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> + <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> + </metadata><xsl:value-of select="$newline"/> + <trk><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Track"> + <trkseg><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Trackpoint"> + <!-- only output a trkpt if a position exists --> + <xsl:if test="t:Position"> + <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="t:HeartRateBpm"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> + </xsl:for-each> + <xsl:value-of select="$newline"/> + </trkseg><xsl:value-of select="$newline"/> + </xsl:for-each> + </trk><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> +</xsl:template> +</xsl:stylesheet> Added: pytrainer/trunk/import/translate_garmintcxv2.xsl =================================================================== --- pytrainer/trunk/import/translate_garmintcxv2.xsl (rev 0) +++ pytrainer/trunk/import/translate_garmintcxv2.xsl 2010-01-05 02:08:23 UTC (rev 466) @@ -0,0 +1,95 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport"><xsl:value-of select="t:Activity/@Sport"/></xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Activity/t:Id"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> + <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> + <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> + </metadata><xsl:value-of select="$newline"/> + <trk><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Activity/t:Lap"> + <trkseg><xsl:value-of select="$newline"/> + <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> + <xsl:for-each select="t:Track/t:Trackpoint"> + <!-- only output a trkpt if a position exists --> + <xsl:if test="t:Position"> + <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="t:HeartRateBpm/t:Value"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="t:HeartRateBpm/t:Value"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + <xsl:if test="t:Cadence"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:cadence><xsl:value-of select="t:Cadence"/></gpxdata:cadence><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> + </xsl:for-each> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:sportType><xsl:value-of select="$sport"/></gpxdata:sportType><xsl:value-of select="$newline"/> + <gpxdata:calories><xsl:value-of select="$calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </trkseg><xsl:value-of select="$newline"/> + </xsl:for-each> + </trk><xsl:value-of select="$newline"/> +<!-- Lap Data --> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Activity/t:Lap"> + <xsl:variable name="vIndex"> + <xsl:number count="t:Lap"/> + </xsl:variable> + <gpxdata:lap><xsl:value-of select="$newline"/> + <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> + <xsl:variable name="stlat"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LongitudeDegrees"/></xsl:variable> + <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> + <xsl:variable name="cnt"><xsl:value-of select="count(t:Track/t:Trackpoint/t:Position)-1"/></xsl:variable> + <xsl:variable name="endlat"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="endlon"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LongitudeDegrees"/></xsl:variable> + <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> + <gpxdata:startTime><xsl:value-of select="@StartTime"/></gpxdata:startTime><xsl:value-of select="$newline"/> + <gpxdata:elapsedTime><xsl:value-of select="t:TotalTimeSeconds"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> + <gpxdata:calories><xsl:value-of select="t:Calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + <gpxdata:distance><xsl:value-of select="t:DistanceMeters"/></gpxdata:distance><xsl:value-of select="$newline"/> + <!-- <gpxdata:trackReference>Reference information for the track which corresponds to this lap type="trackReferenceType"</gpxdata:trackReference><xsl:value-of select="$newline"/> --> + <gpxdata:summary><xsl:value-of select="$newline"/> + <MaximumSpeed kind="max"><xsl:value-of select="t:MaximumSpeed"/></MaximumSpeed><xsl:value-of select="$newline"/> + <AverageHeartRateBpm kind="avg"><xsl:value-of select="t:AverageHeartRateBpm/t:Value"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> + <MaximumHeartRateBpm kind="max"><xsl:value-of select="t:MaximumHeartRateBpm/t:Value"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> + </gpxdata:summary><xsl:value-of select="$newline"/> + <gpxdata:trigger><xsl:value-of select="t:TriggerMethod"/></gpxdata:trigger><xsl:value-of select="$newline"/> + <gpxdata:intensity><xsl:value-of select="t:Intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> + </gpxdata:lap><xsl:value-of select="$newline"/> + </xsl:for-each> + </extensions><xsl:value-of select="$newline"/> + + </gpx><xsl:value-of select="$newline"/> +</xsl:template> +</xsl:stylesheet> Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-05 02:08:23 UTC (rev 466) @@ -35,6 +35,7 @@ self.parent = parent self.configuration = config self.store = None + self.processClass = None #SimpleGladeApp.__init__(self, data_path+glade_path, root, domain) def run(self): @@ -176,7 +177,51 @@ self.configuration.setValue("pytraining","import_default_tab",self.defaulttab) #option + def getSelectedActivities(self): + """ + Function to determine which activities are selected + + Returns array of the ids of the selected activities + """ + selectedActivities = [] + if self.store is None: + return None + for item in self.store: + if item[1] is True: #Checkbox is True + logging.debug("Added activity id:%s to selected list" % item[0]) + selectedActivities.append(item[0]) + logging.debug( "Found %d selected activities to import" % len(selectedActivities) ) + return selectedActivities + + def importSelectedActivities(self, selectedActivities): + """ + Function to import selected activities + """ + if selectedActivities is None or len(selectedActivities) == 0: + return + for activityID in selectedActivities: + logging.debug( "Importing activity %s" % activityID) + sport, gpxFile = self.processClass.getGPXFile(activityID) + #process returned GPX files + if os.path.isfile(gpxFile): + logging.info('File exists. Size: %d. Sport: %s' % (os.path.getsize(gpxFile), sport)) + #TODO trigger newentry screen to allow user to edit data + self.parent.parent.record.importFromGPX(gpxFile, sport) + #Deselect imported activity and change note + self.updateActivity(activityID, status=False, notes="Imported into database") + else: + logging.error('File %s not valid' % gpxFile) + def updateActivity(self, activityID, status = None, notes = None): + path = 0 + for item in self.store: + if item[0] == activityID: + if status is not None: + self.store[path][1] = status + if notes is not None: + self.store[path][6] = notes + path +=1 + ############################ ## Window signal handlers ## ############################ @@ -195,6 +240,8 @@ def on_win_importdata_delete_event(self, widget, window): self.win_importdata.hide() + #self.win_importdata = None + #self.quit() def on_notebookMainTabs_switch_page(self, notebook, page, new_page): if new_page == 0: @@ -220,11 +267,11 @@ else: self.store.clear() #Validate file - processClass = self.validateFile(self.filechooserbuttonSelectFile.get_filename()) - if processClass is not None: - self.updateStatusbar(self.statusbarImportFile, _("Found file of type: %s") % processClass.getFileType() ) + self.processClass = self.validateFile(self.filechooserbuttonSelectFile.get_filename()) + if self.processClass is not None: + self.updateStatusbar(self.statusbarImportFile, _("Found file of type: %s") % self.processClass.getFileType() ) #Get activities in file - activitiesSummary = processClass.getActivitiesSummary() + activitiesSummary = self.processClass.getActivitiesSummary() for activity in activitiesSummary: if not activity[1]: #Activity selected, so enable import button @@ -256,6 +303,7 @@ def on_buttonClearFile_clicked(self, widget): self.filechooserbuttonSelectFile.unselect_all() self.updateStatusbar(self.statusbarImportFile, _("No file selected") ) + self.processClass = None self.store.clear() def on_buttonSave_clicked(self, widget): @@ -266,13 +314,25 @@ def on_buttonReset_clicked(self, widget): #GPS Device is default self.defaulttab = 0 - #self.saveOptions() #Redisplay tab self.init_options_tab() self.updateStatusbar(self.statusbarOptions, "") def on_buttonImport_clicked(self, widget): - self.updateStatusbar(self.statusbarImportFile, "buttonImport clicked") + #Import selected activities + selectedActivities = self.getSelectedActivities() + if len(selectedActivities) > 0: + self.updateStatusbar(self.statusbarImportFile, "Importing %d activities" % len(selectedActivities)) + self.importSelectedActivities(selectedActivities) + self.updateStatusbar(self.statusbarImportFile, "Imported %d activities" % len(selectedActivities)) + self.buttonImport.set_sensitive(0) #Disable import button + #self.updateStatusbar(self.statusbarImportFile, "buttonImport clicked") + + def on_buttonCancel_clicked(self, widget): + self.win_importdata.hide() + #self.win_importdata = None + #self.quit() + Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/pytrainer/main.py 2010-01-05 02:08:23 UTC (rev 466) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#465" + self.version ="1.7.0_svn#466" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-05 22:37:03
|
Revision: 469 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=469&view=rev Author: jblance Date: 2010-01-05 22:36:39 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Minor updates to unified import - file tab, warning gui updated to allow title to be set Modified Paths: -------------- pytrainer/trunk/glade/importdata.glade pytrainer/trunk/glade/warning.glade pytrainer/trunk/pytrainer/gui/warning.py pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/importdata.glade =================================================================== --- pytrainer/trunk/glade/importdata.glade 2010-01-05 21:21:28 UTC (rev 468) +++ pytrainer/trunk/glade/importdata.glade 2010-01-05 22:36:39 UTC (rev 469) @@ -18,26 +18,77 @@ <property name="can_focus">True</property> <signal name="switch_page" handler="on_notebookMainTabs_switch_page"/> <child> - <widget class="GtkFrame" id="frame1"> + <widget class="GtkVBox" id="vboxImportFromDevice"> <property name="visible">True</property> - <property name="label_xalign">0</property> + <property name="orientation">vertical</property> <child> - <widget class="GtkAlignment" id="alignment1"> + <widget class="GtkFrame" id="frameImportFromDevice"> <property name="visible">True</property> - <property name="left_padding">12</property> + <property name="label_xalign">0</property> <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <placeholder/> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame1</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="hboxDeviceButtons"> + <property name="visible">True</property> + <child> <placeholder/> </child> + <child> + <widget class="GtkButton" id="buttonDeviceCancel"> + <property name="label">gtk-cancel</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_buttonDeviceCancel_clicked"/> + </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> </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="GtkLabel" id="label7"> + <widget class="GtkStatusbar" id="statusbarDevice"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>frame1</b></property> - <property name="use_markup">True</property> + <property name="spacing">2</property> + <property name="has_resize_grip">False</property> </widget> <packing> - <property name="type">label_item</property> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">0</property> </packing> </child> </widget> @@ -161,16 +212,16 @@ </packing> </child> <child> - <widget class="GtkHBox" id="hboxImportButton"> + <widget class="GtkHBox" id="hboxImportButtons"> <property name="visible">True</property> <child> - <widget class="GtkButton" id="buttonImport"> + <widget class="GtkButton" id="buttonFileImport"> <property name="label" translatable="yes">Import</property> <property name="visible">True</property> <property name="sensitive">False</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <signal name="clicked" handler="on_buttonImport_clicked"/> + <signal name="clicked" handler="on_buttonFileImport_clicked"/> </widget> <packing> <property name="expand">False</property> @@ -180,13 +231,13 @@ </packing> </child> <child> - <widget class="GtkButton" id="buttonCancel"> + <widget class="GtkButton" id="buttonFileCancel"> <property name="label">gtk-close</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_buttonCancel_clicked"/> + <signal name="clicked" handler="on_buttonFileCancel_clicked"/> </widget> <packing> <property name="expand">False</property> @@ -310,12 +361,12 @@ <widget class="GtkHBox" id="hboxOptionButtons"> <property name="visible">True</property> <child> - <widget class="GtkButton" id="buttonReset"> + <widget class="GtkButton" id="buttonOptionsReset"> <property name="label" translatable="yes">Reset</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <signal name="clicked" handler="on_buttonReset_clicked"/> + <signal name="clicked" handler="on_buttonOptionsReset_clicked"/> </widget> <packing> <property name="expand">False</property> @@ -325,12 +376,12 @@ </packing> </child> <child> - <widget class="GtkButton" id="buttonSave"> + <widget class="GtkButton" id="buttonOptionsSave"> <property name="label" translatable="yes">Save</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <signal name="clicked" handler="on_buttonSave_clicked"/> + <signal name="clicked" handler="on_buttonOptionsSave_clicked"/> </widget> <packing> <property name="expand">False</property> Modified: pytrainer/trunk/glade/warning.glade =================================================================== --- pytrainer/trunk/glade/warning.glade 2010-01-05 21:21:28 UTC (rev 468) +++ pytrainer/trunk/glade/warning.glade 2010-01-05 22:36:39 UTC (rev 469) @@ -5,6 +5,7 @@ <widget class="GtkDialog" id="warning"> <property name="visible">True</property> <property name="title" translatable="yes">Warning</property> + <property name="resizable">False</property> <property name="modal">True</property> <property name="window_position">mouse</property> <property name="icon">logo_mini.png</property> Modified: pytrainer/trunk/pytrainer/gui/warning.py =================================================================== --- pytrainer/trunk/pytrainer/gui/warning.py 2010-01-05 21:21:28 UTC (rev 468) +++ pytrainer/trunk/pytrainer/gui/warning.py 2010-01-05 22:36:39 UTC (rev 469) @@ -32,6 +32,9 @@ if okmethod == None: self.cancelbutton1.hide() + def set_title(self, title): + self.warning.set_title(title) + def set_text(self, msg): self.warningText.set_text(msg) Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-05 21:21:28 UTC (rev 468) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-05 22:36:39 UTC (rev 469) @@ -48,7 +48,22 @@ else: self.defaulttab = int(self.defaulttab) self.notebookMainTabs.set_current_page(self.defaulttab) + self.init_tab(self.defaulttab) + def init_tab(self, page): + if page == 0: + #'Import from GPS Device' tab + self.init_gpsdevice_tab() + elif page == 1: + #'Import from File' tab + self.init_file_tab() + elif page ==2: + #'Options' tab + self.init_options_tab() + else: + #unknown tab + pass + def updateStatusbar(self, statusbar, text, context_id = None): if context_id is None: context_id = statusbar.get_context_id(text) @@ -59,8 +74,15 @@ return def init_file_tab(self): + self.filechooserbuttonSelectFile.unselect_all() + self.updateStatusbar(self.statusbarImportFile, _("No file selected") ) + self.processClass = None + if self.store is None: + self.store = self.build_tree_view() + else: + self.store.clear() self.buttonClearFile.set_sensitive(0) - self.buttonImport.set_sensitive(0) + self.buttonFileImport.set_sensitive(0) return def init_options_tab(self): @@ -146,25 +168,25 @@ Sets the state of the checkbox to true or false. """ store[path][1] = not store[path][1] - self.buttonImport.set_sensitive(0) + self.buttonFileImport.set_sensitive(0) for item in store: if item[1]: #Only enable import button if at least one activity is selected - self.buttonImport.set_sensitive(1) + self.buttonFileImport.set_sensitive(1) return def treeviewImportEvents_setCheckboxes(self, state): """ Sets or unsets all checkboxes """ - if self.store is None: + if self.store is None or len(self.store) == 0: return for item in self.store: item[1] = state if state: - self.buttonImport.set_sensitive(1) + self.buttonFileImport.set_sensitive(1) else: - self.buttonImport.set_sensitive(0) + self.buttonFileImport.set_sensitive(0) def saveOptions(self): """ @@ -223,6 +245,10 @@ self.store[path][6] = notes path +=1 + def close_window(self): + self.win_importdata.hide() + + ############################ ## Window signal handlers ## ############################ @@ -240,30 +266,18 @@ self.treeviewImportEvents_setCheckboxes(True) def on_win_importdata_delete_event(self, widget, window): - self.win_importdata.hide() + """ Windows closed """ + self.close_window() def on_notebookMainTabs_switch_page(self, notebook, page, new_page): - if new_page == 0: - #Switched to 'Import from GPS Device' tab - self.init_gpsdevice_tab() - elif new_page == 1: - #Switched to 'Import from File' tab - self.init_file_tab() - elif new_page ==2: - #Switched to 'Options' tab - self.init_options_tab() - else: - #Switched to unknown tab - pass + self.init_tab(new_page) def on_filechooserbuttonSelectFile_file_set(self, widget): self.buttonClearFile.set_sensitive(1) #Enable clear button - self.buttonImport.set_sensitive(0) #Disable import button + self.buttonFileImport.set_sensitive(0) #Disable import button self.updateStatusbar(self.statusbarImportFile, "" ) #Clear status bar - #Build treeview - if self.store is None: - self.store = self.build_tree_view() - else: + #Clear store + if self.store is not None: self.store.clear() #Validate file self.processClass = self.validateFile(self.filechooserbuttonSelectFile.get_filename()) @@ -274,7 +288,7 @@ for activity in activitiesSummary: if not activity[1]: #Activity selected, so enable import button - self.buttonImport.set_sensitive(1) + self.buttonFileImport.set_sensitive(1) note = "" else: note = _("Found in database") @@ -300,32 +314,43 @@ warning.run() def on_buttonClearFile_clicked(self, widget): - self.filechooserbuttonSelectFile.unselect_all() - self.updateStatusbar(self.statusbarImportFile, _("No file selected") ) - self.processClass = None - self.store.clear() + self.init_tab(1) - def on_buttonSave_clicked(self, widget): + def on_buttonOptionsSave_clicked(self, widget): self.updateStatusbar(self.statusbarOptions, "Saving options") self.saveOptions() self.updateStatusbar(self.statusbarOptions, "Options saved") - def on_buttonReset_clicked(self, widget): + def on_buttonOptionsReset_clicked(self, widget): #GPS Device is default self.defaulttab = 0 #Redisplay tab self.init_options_tab() self.updateStatusbar(self.statusbarOptions, "") - def on_buttonImport_clicked(self, widget): + def on_buttonFileImport_clicked(self, widget): #Import selected activities selectedActivities = self.getSelectedActivities() - if len(selectedActivities) > 0: - self.updateStatusbar(self.statusbarImportFile, "Importing %d activities" % len(selectedActivities)) + selectedCount = len(selectedActivities) + if selectedCount > 0: + if selectedCount == 1: + msgImporting = _("Importing one activity") + msgImported = _("Imported one activity") + else: + msgImporting = _("Importing %d activities" % selectedCount) + msgImported = _("Imported %d activities" % selectedCount) + self.updateStatusbar(self.statusbarImportFile, msgImporting) self.importSelectedActivities(selectedActivities) - self.updateStatusbar(self.statusbarImportFile, "Imported %d activities" % len(selectedActivities)) - self.buttonImport.set_sensitive(0) #Disable import button - #self.updateStatusbar(self.statusbarImportFile, "buttonImport clicked") + self.updateStatusbar(self.statusbarImportFile, msgImported) + warning = Warning(self.data_path) + warning.set_text(msgImpored) + warning.set_title(_("Import Success")) + warning.run() + self.buttonFileImport.set_sensitive(0) #Disable import button - def on_buttonCancel_clicked(self, widget): - self.win_importdata.hide() + def on_buttonFileCancel_clicked(self, widget): + self.close_window() + + def on_buttonDeviceCancel_clicked(self, widget): + self.close_window() + Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-05 21:21:28 UTC (rev 468) +++ pytrainer/trunk/pytrainer/main.py 2010-01-05 22:36:39 UTC (rev 469) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#468" + self.version ="1.7.0_svn#469" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-06 09:53:21
|
Revision: 470 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=470&view=rev Author: jblance Date: 2010-01-06 09:53:15 +0000 (Wed, 06 Jan 2010) Log Message: ----------- Unified import - start of device import functionality Modified Paths: -------------- pytrainer/trunk/glade/importdata.glade pytrainer/trunk/pytrainer/gui/windowimportdata.py Added Paths: ----------- pytrainer/trunk/import/tool_gant.py pytrainer/trunk/import/tool_garmintools.py pytrainer/trunk/import/tool_gpsbabel.py Modified: pytrainer/trunk/glade/importdata.glade =================================================================== --- pytrainer/trunk/glade/importdata.glade 2010-01-05 22:36:39 UTC (rev 469) +++ pytrainer/trunk/glade/importdata.glade 2010-01-06 09:53:15 UTC (rev 470) @@ -30,15 +30,22 @@ <property name="visible">True</property> <property name="left_padding">12</property> <child> - <placeholder/> + <widget class="GtkVBox" id="vboxImportTools"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </widget> </child> </widget> </child> <child> - <widget class="GtkLabel" id="label1"> + <widget class="GtkLabel" id="labelImportDeviceTools"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>frame1</b></property> + <property name="label" translatable="yes"><b>Tools</b></property> <property name="use_markup">True</property> + <property name="single_line_mode">True</property> </widget> <packing> <property name="type">label_item</property> @@ -53,16 +60,30 @@ <widget class="GtkHBox" id="hboxDeviceButtons"> <property name="visible">True</property> <child> - <placeholder/> + <widget class="GtkButton" id="buttonDeviceToolRescan"> + <property name="label" translatable="yes">Rescan</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip" translatable="yes">Rescan system for available tools</property> + <signal name="clicked" handler="on_buttonDeviceToolRescan_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">10</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> </child> <child> - <widget class="GtkButton" id="buttonDeviceCancel"> - <property name="label">gtk-cancel</property> + <widget class="GtkButton" id="buttonDeviceClose"> + <property name="label">gtk-close</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_buttonDeviceCancel_clicked"/> + <signal name="clicked" handler="on_buttonDeviceClose_clicked"/> </widget> <packing> <property name="expand">False</property> @@ -226,18 +247,19 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="padding">10</property> <property name="pack_type">end</property> <property name="position">1</property> </packing> </child> <child> - <widget class="GtkButton" id="buttonFileCancel"> + <widget class="GtkButton" id="buttonFileClose"> <property name="label">gtk-close</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_buttonFileCancel_clicked"/> + <signal name="clicked" handler="on_buttonFileClose_clicked"/> </widget> <packing> <property name="expand">False</property> @@ -372,7 +394,7 @@ <property name="expand">False</property> <property name="fill">False</property> <property name="pack_type">end</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> <child> @@ -388,6 +410,22 @@ <property name="fill">False</property> <property name="padding">10</property> <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="buttonOptionsClose"> + <property name="label">gtk-close</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_buttonOptionsClose_clicked"/> + </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> Added: pytrainer/trunk/import/tool_gant.py =================================================================== --- pytrainer/trunk/import/tool_gant.py (rev 0) +++ pytrainer/trunk/import/tool_gant.py 2010-01-06 09:53:15 UTC (rev 470) @@ -0,0 +1,68 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... +# Modified by dgranda + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import logging +import os, sys, commands +import StringIO +from lxml import etree +import dateutil.parser +from dateutil.tz import * # for tzutc() + +from pytrainer.lib.system import checkConf + +class gant(): + def __init__(self, parent = None, data_path = None): + self.parent = parent + self.conf = checkConf() + self.tmpdir = self.conf.getValue("tmpdir") + self.main_data_path = data_path + self.data_path = os.path.dirname(__file__) + + def getName(self): + return _("Gant") + + def getVersion(self): + return None + + def getSourceLocation(self): + return "http://cgit.get-open.com/cgit.cgi/gant/" + + def deviceExists(self): + return True + + def isPresent(self): + if self.getVersion(): + return True + else: + return False + + def getDateTime(self, time_): + # Time can be in multiple formats + # - zulu 2009-12-15T09:00Z + # - local ISO8601 2009-12-15T10:00+01:00 + if time_ is None or time_ == "": + return (None, None) + dateTime = dateutil.parser.parse(time_) + timezone = dateTime.tzname() + if timezone == 'UTC': #got a zulu time + local_dateTime = dateTime.astimezone(tzlocal()) #datetime with localtime offset (from OS) + else: + local_dateTime = dateTime #use datetime as supplied + utc_dateTime = dateTime.astimezone(tzutc()) #datetime with 00:00 offset + return (utc_dateTime,local_dateTime) Added: pytrainer/trunk/import/tool_garmintools.py =================================================================== --- pytrainer/trunk/import/tool_garmintools.py (rev 0) +++ pytrainer/trunk/import/tool_garmintools.py 2010-01-06 09:53:15 UTC (rev 470) @@ -0,0 +1,77 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... +# Modified by dgranda + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import logging +import os, sys, commands +import StringIO +from lxml import etree +import dateutil.parser +from dateutil.tz import * # for tzutc() + +from pytrainer.lib.system import checkConf + +class garmintools(): + def __init__(self, parent = None, data_path = None): + self.parent = parent + self.conf = checkConf() + self.tmpdir = self.conf.getValue("tmpdir") + self.main_data_path = data_path + self.data_path = os.path.dirname(__file__) + + def getName(self): + return _("Garmintools") + + def getVersion(self): + outstatus = commands.getstatusoutput('which garmin_save_runs') + if outstatus[0] == 0: #Found garmin_save_runs in path + path = "Unknown" + return path + else: + return None + + def getSourceLocation(self): + return "http://code.google.com/p/garmintools/" + + def deviceExists(self): + outstatus = commands.getstatusoutput('garmin_get_info') + if outstatus[0] is not 0 or outstatus[1].startswith("garmin unit could not be opened"): + return False + else: + return True + + def isPresent(self): + if self.getVersion(): + return True + else: + return False + + def getDateTime(self, time_): + # Time can be in multiple formats + # - zulu 2009-12-15T09:00Z + # - local ISO8601 2009-12-15T10:00+01:00 + if time_ is None or time_ == "": + return (None, None) + dateTime = dateutil.parser.parse(time_) + timezone = dateTime.tzname() + if timezone == 'UTC': #got a zulu time + local_dateTime = dateTime.astimezone(tzlocal()) #datetime with localtime offset (from OS) + else: + local_dateTime = dateTime #use datetime as supplied + utc_dateTime = dateTime.astimezone(tzutc()) #datetime with 00:00 offset + return (utc_dateTime,local_dateTime) Added: pytrainer/trunk/import/tool_gpsbabel.py =================================================================== --- pytrainer/trunk/import/tool_gpsbabel.py (rev 0) +++ pytrainer/trunk/import/tool_gpsbabel.py 2010-01-06 09:53:15 UTC (rev 470) @@ -0,0 +1,84 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... +# Modified by dgranda + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import logging +import os, sys, commands +import StringIO +from lxml import etree +import dateutil.parser +from dateutil.tz import * # for tzutc() + +from pytrainer.lib.system import checkConf + +class gpsbabel(): + def __init__(self, parent = None, data_path = None): + self.parent = parent + self.conf = checkConf() + self.tmpdir = self.conf.getValue("tmpdir") + self.main_data_path = data_path + self.data_path = os.path.dirname(__file__) + + def getName(self): + return _("GPSBabel") + + def getVersion(self): + result = commands.getstatusoutput('gpsbabel -V') + if result[0] == 0: + version = result[1].split() + try: + return version[2] + except: + logging.error("Unexpected result from gpsbabel -V") + return None + return None + + def getSourceLocation(self): + return "http://www.gpsbabel.org/" + + def deviceExists(self): + try: + #TODO Check if this is correct??? + outmod = commands.getstatusoutput('/sbin/lsmod | grep garmin_gps') + if outmod[0]==256: #there is no garmin_gps module loaded + return False + else: + return True + except: + return False + + def isPresent(self): + if self.getVersion(): + return True + else: + return False + + def getDateTime(self, time_): + # Time can be in multiple formats + # - zulu 2009-12-15T09:00Z + # - local ISO8601 2009-12-15T10:00+01:00 + if time_ is None or time_ == "": + return (None, None) + dateTime = dateutil.parser.parse(time_) + timezone = dateTime.tzname() + if timezone == 'UTC': #got a zulu time + local_dateTime = dateTime.astimezone(tzlocal()) #datetime with localtime offset (from OS) + else: + local_dateTime = dateTime #use datetime as supplied + utc_dateTime = dateTime.astimezone(tzutc()) #datetime with 00:00 offset + return (utc_dateTime,local_dateTime) Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-05 22:36:39 UTC (rev 469) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-06 09:53:15 UTC (rev 470) @@ -24,8 +24,6 @@ import logging from lxml import etree -from pytrainer.gui.warning import Warning - class WindowImportdata(SimpleGladeApp): def __init__(self, data_path = None, parent=None, config=None): self.data_path = data_path @@ -36,6 +34,7 @@ self.configuration = config self.store = None self.processClass = None + self.toolsDetected = False #SimpleGladeApp.__init__(self, data_path+glade_path, root, domain) def run(self): @@ -71,6 +70,14 @@ return context_id def init_gpsdevice_tab(self): + #Only detect tools once (or if requested) + if not self.toolsDetected: + #Remove all components in vbox - in case of re-detection + for child in self.vboxImportTools.get_children(): + print "removing ", child + self.vboxImportTools.remove(child) + self.detect_tools() + self.toolsDetected = True return def init_file_tab(self): @@ -92,8 +99,59 @@ else: self.radiobuttonTabGPSDevice.set_active(1) return + + def detect_tools(self): + """ + Iterate through all tool files from import directory + Each file contains information on a particular tool + and knows how to determine if the tool is present on the system + and what configuration options are needed for the tool + + Currently displays the tool info and config grayed out if tool is not present + """ + logging.debug('>>') + self.updateStatusbar(self.statusbarDevice, "Checking for tools") + #Get import tool_* files + fileList = glob.glob(self.data_path+"import/tool_*.py") + for toolFile in fileList: + index = fileList.index(toolFile) + directory, filename = os.path.split(toolFile) + filename = filename.rstrip('.py') + classname = filename.lstrip('tool_') + #Import module + sys.path.insert(0, self.data_path+"import") + module = __import__(filename) + toolMain = getattr(module, classname) + #Instantiate module + toolClass = toolMain(self.parent, self.data_path) + #Get info from class + toolName = toolClass.getName() + toolTable = gtk.Table() + toolFrame = gtk.Frame(label=toolName) + toolFrame.add(toolTable) + if toolClass.isPresent(): + version = gtk.Label("Version: " + toolClass.getVersion()) + version.set_alignment(0,0) + if toolClass.deviceExists(): + deviceExists = gtk.Label(_("GPS device found") ) + else: + deviceExists = gtk.Label(_("GPS device <b>not</b> found")) + deviceExists.set_alignment(0,0) + deviceExists.set_use_markup(True) + toolTable.attach(version, 0, 1, 0, 1, xoptions=gtk.EXPAND|gtk.FILL, xpadding=5) + toolTable.attach(deviceExists, 0, 1, 1, 2, xoptions=gtk.EXPAND|gtk.FILL, xpadding=5) + toolFrame.set_sensitive(1) + else: + info = gtk.Label(_("This tool was not found on the system") ) + info.set_alignment(0,0.5) + location = gtk.LinkButton(toolClass.getSourceLocation(), _("Tool Homepage")) + info.set_sensitive(0) + toolTable.attach(info, 0, 1, 0, 1, xoptions=gtk.EXPAND|gtk.FILL, xpadding=5) + toolTable.attach(location, 1, 2, 0, 1, xoptions=gtk.EXPAND|gtk.FILL, xpadding=5) + #toolFrame.set_sensitive(0) + self.vboxImportTools.pack_start(toolFrame, expand=False, fill=False, padding=5) + self.win_importdata.show_all() - def validateFile(self, import_filename): """ Iterate through all supported types of file by reading processing files from import directory @@ -247,7 +305,7 @@ def close_window(self): self.win_importdata.hide() - + self.win_importdata.destroy() ############################ ## Window signal handlers ## @@ -307,11 +365,12 @@ else: #Selected file not understood by any of the process files self.updateStatusbar(self.statusbarImportFile, _("Unknown file type") ) - #Display warning + #Display error msg = _("File selected is of unknown or unsupported file type") - warning = Warning(self.data_path) - warning.set_text(msg) - warning.run() + md = gtk.MessageDialog(self.win_importdata, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, msg) + md.set_title("Error") + md.run() + md.destroy() def on_buttonClearFile_clicked(self, widget): self.init_tab(1) @@ -342,15 +401,24 @@ self.updateStatusbar(self.statusbarImportFile, msgImporting) self.importSelectedActivities(selectedActivities) self.updateStatusbar(self.statusbarImportFile, msgImported) - warning = Warning(self.data_path) - warning.set_text(msgImpored) - warning.set_title(_("Import Success")) - warning.run() + + #Display informational dialog box + md = gtk.MessageDialog(self.win_importdata, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, msgImported) + md.set_title(_("Import Success")) + md.run() + md.destroy() + self.buttonFileImport.set_sensitive(0) #Disable import button - def on_buttonFileCancel_clicked(self, widget): + def on_buttonFileClose_clicked(self, widget): self.close_window() - def on_buttonDeviceCancel_clicked(self, widget): + def on_buttonDeviceClose_clicked(self, widget): self.close_window() + def on_buttonOptionsClose_clicked(self, widget): + self.close_window() + + def on_buttonDeviceToolRescan_clicked(self, widget): + self.toolsDetected = False + self.init_gpsdevice_tab() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-05 21:21:38
|
Revision: 468 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=468&view=rev Author: jblance Date: 2010-01-05 21:21:28 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Unified import - activities in file import sortable Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2010-01-05 18:22:54 UTC (rev 467) +++ pytrainer/trunk/glade/newrecord.glade 2010-01-05 21:21:28 UTC (rev 468) @@ -1,1925 +1,1136 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - +<?xml version="1.0"?> <glade-interface> - -<widget class="GtkWindow" id="newrecord"> - <property name="visible">True</property> - <property name="title" translatable="yes">New Entry</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="icon">logo_mini.png</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> - <signal name="destroy" handler="quit" last_modification_time="Sun, 23 Sep 2007 20:55:46 GMT"/> - - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkNotebook" id="notebook2"> - <property name="border_width">9</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> - - <child> - <widget class="GtkVBox" id="vbox27"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame19"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment22"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table28"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label156"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Title:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_title"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label161"> - <property name="visible">True</property> - <property name="label" translatable="yes">GPX File:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_gpxfile"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button25"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-open</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_selectfile_clicked" last_modification_time="Mon, 23 Oct 2006 10:40:57 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button24"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate Values</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calculatevalues_clicked" last_modification_time="Mon, 23 Oct 2006 10:41:32 GMT"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sport:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkComboBoxEntry" id="rcd_sport"> - <property name="width_request">134</property> - <property name="visible">True</property> - <property name="items" translatable="yes"></property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483646"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Main</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame24"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment28"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table31"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label8"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Distance (Km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button10"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcdistance_clicked" last_modification_time="Mon, 15 May 2006 18:26:54 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Duration:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox7"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkSpinButton" id="rcd_hour"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 23 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label35"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_min"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label36"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_second"> - <property name="width_request">42</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_distance"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button11"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calctime_clicked" last_modification_time="Mon, 15 May 2006 18:27:10 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label6"> - <property name="width_request">60</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Date:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkEntry" id="rcd_date"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label28"> - <property name="visible">True</property> - <property name="label" translatable="yes"> </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button7"> - <property name="visible">True</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_calendar_clicked" last_modification_time="Sun, 02 Apr 2006 18:37:59 GMT"/> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-index</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> - </child> - - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="lblTime"> - <property name="visible">True</property> - <property name="label" translatable="yes">Start Time:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkEntry" id="rcd_time"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">10</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483648"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>General</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="Velocity"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment27"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table30"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label134"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (km/h):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_maxvel"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label133"> - <property name="visible">True</property> - <property name="label" translatable="yes">Velocity (km/h)</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button12"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcaverage_clicked" last_modification_time="Mon, 15 May 2006 18:27:33 GMT"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_average"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label162"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Velocity</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quick Entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox26"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame20"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment23"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table23"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label138"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (min/km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_maxpace"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label137"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Pace (min/km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_pace"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button43"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcpace_clicked" last_modification_time="Tue, 29 Jan 2008 21:42:09 GMT"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label162"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Pace</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame21"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment24"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table24"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label139"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Ascent:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_upositive"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label140"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Descent:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_unegative"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label163"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Accumulated Altitude Change</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame22"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment25"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table25"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">6</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label142"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (bpm):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label143"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Heart rate:</property> - <... [truncated message content] |
From: <jb...@us...> - 2010-01-06 21:48:01
|
Revision: 471 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=471&view=rev Author: jblance Date: 2010-01-06 21:47:54 +0000 (Wed, 06 Jan 2010) Log Message: ----------- Add GPX support to unified import Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/import/file_gpxplus.py Added: pytrainer/trunk/import/file_gpxplus.py =================================================================== --- pytrainer/trunk/import/file_gpxplus.py (rev 0) +++ pytrainer/trunk/import/file_gpxplus.py 2010-01-06 21:47:54 UTC (rev 471) @@ -0,0 +1,145 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... +# Modified by dgranda + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import logging +import os +#import StringIO +from lxml import etree +import dateutil.parser +from dateutil.tz import * # for tzutc() + +#from pytrainer.lib.xmlUtils import XMLParser +#from pytrainer.gui.dialogs import fileChooserDialog, guiFlush +from pytrainer.lib.system import checkConf + +class gpxplus(): + def __init__(self, parent = None, data_path = None): + self.parent = parent + self.conf = checkConf() + self.tmpdir = self.conf.getValue("tmpdir") + self.main_data_path = data_path + self.data_path = os.path.dirname(__file__) + self.xmldoc = None + self.activitiesSummary = [] + + def getXmldoc(self): + ''' Function to return parsed xmlfile ''' + return self.xmldoc + + def getFileType(self): + return _("GPS eXchange file") + + def getActivitiesSummary(self): + return self.activitiesSummary + + def testFile(self, filename): + logging.debug('>>') + logging.debug("Testing " + filename) + #Check if file is a GPX + #try: + while True: + #parse as xml + xmldoc = etree.parse(filename) + #Parse XML schema + xmlschema_doc = etree.parse(self.main_data_path+"schemas/Topografix_gpx11.xsd") + xmlschema = etree.XMLSchema(xmlschema_doc) + if (xmlschema.validate(xmldoc)): + #Valid gpx file + self.xmldoc = xmldoc + startTime = self.getDateTime(self.startTimeFromFile(xmldoc)) + indatabase = self.inDatabase(xmldoc, startTime) + sport = self.getSport(xmldoc) + duration = self.getDetails(xmldoc, startTime) + distance = "" + self.activitiesSummary.append( (0, + indatabase, + startTime[1].strftime("%Y-%m-%dT%H:%M:%S"), + distance , + str(duration), + sport, + ) ) + return True + #except: + #Not gpx file + # return False + return False + + def getDateTime(self, time_): + # Time can be in multiple formats + # - zulu 2009-12-15T09:00Z + # - local ISO8601 2009-12-15T10:00+01:00 + if time_ is None or time_ == "": + return (None, None) + dateTime = dateutil.parser.parse(time_) + timezone = dateTime.tzname() + if timezone == 'UTC': #got a zulu time + local_dateTime = dateTime.astimezone(tzlocal()) #datetime with localtime offset (from OS) + else: + local_dateTime = dateTime #use datetime as supplied + utc_dateTime = dateTime.astimezone(tzutc()) #datetime with 00:00 offset + #print utc_dateTime, local_dateTime + return (utc_dateTime,local_dateTime) + + def inDatabase(self, tree, startTime): + #comparing date and start time (sport may have been changed in DB after import) + time = startTime + if time is None: + return False + time = time[0].strftime("%Y-%m-%dT%H:%M:%SZ") + if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + return True + else: + return False + + def getDetails(self, tree, startTime): + root = tree.getroot() + #Get all times from file + times = root.findall(".//{http://www.topografix.com/GPX/1/1}time") + time = times[-1].text + return self.getDateTime(time)[0]-startTime[0] + + def getSport(self, tree): + #No sport in GPX file + return None + + def startTimeFromFile(self, tree): + """ Function to return the first time element from a GPX 1.1 file """ + root = tree.getroot() + timeElement = root.find(".//{http://www.topografix.com/GPX/1/1}time") + if timeElement is not None: + return timeElement.text + return None + + def getGPXFile(self, ID): + """ + Generate GPX file based on activity ID + + Returns (sport, GPX filename) + """ + sport = None + gpxFile = None + if ID == "0": #Only one activity in file + gpxFile = "%s/gpx-%s.gpx" % (self.tmpdir, ID) + sport = self.getSport(self.xmldoc) + self.createGPXfile(gpxFile, self.xmldoc) + return sport, gpxFile + + def createGPXfile(self, gpxfile, tree): + tree.write(gpxfile, xml_declaration=True) + Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-06 09:53:15 UTC (rev 470) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-06 21:47:54 UTC (rev 471) @@ -144,7 +144,7 @@ else: info = gtk.Label(_("This tool was not found on the system") ) info.set_alignment(0,0.5) - location = gtk.LinkButton(toolClass.getSourceLocation(), _("Tool Homepage")) + location = gtk.LinkButton(toolClass.getSourceLocation(), toolName +_(" Homepage")) info.set_sensitive(0) toolTable.attach(info, 0, 1, 0, 1, xoptions=gtk.EXPAND|gtk.FILL, xpadding=5) toolTable.attach(location, 1, 2, 0, 1, xoptions=gtk.EXPAND|gtk.FILL, xpadding=5) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-06 09:53:15 UTC (rev 470) +++ pytrainer/trunk/pytrainer/main.py 2010-01-06 21:47:54 UTC (rev 471) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#469" + self.version ="1.7.0_svn#471" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-01-08 18:43:38
|
Revision: 472 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=472&view=rev Author: dgranda Date: 2010-01-08 18:43:31 +0000 (Fri, 08 Jan 2010) Log Message: ----------- Removed useless files for localization Removed Paths: ------------- pytrainer/trunk/Makefile pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot pytrainer/trunk/locale/da/LC_MESSAGES/pytrainer_dk.pot pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot pytrainer/trunk/locale/eu/LC_MESSAGES/pytrainer_eu.pot pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.pot pytrainer/trunk/locale/no/LC_MESSAGES/pytrainer_no.pot pytrainer/trunk/locale/pl/LC_MESSAGES/pytrainer_pl.pot pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_pl.pot pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.pot pytrainer/trunk/messages.pot Deleted: pytrainer/trunk/Makefile =================================================================== --- pytrainer/trunk/Makefile 2010-01-06 21:47:54 UTC (rev 471) +++ pytrainer/trunk/Makefile 2010-01-08 18:43:31 UTC (rev 472) @@ -1,36 +0,0 @@ -install: - xgettext glade/pytrainer.glade -o ./messages.pot - find ./ -iname "*.py" -exec xgettext -k_ -j -o ./messages.pot ./pytrainer/main.py {} \; - make locale_es - make locale_eu - make locale_ca - make locale_fr - make locale_da - make locale_de - make locale_no - make locale_cs - make locale_ru - make locale_pl - -locale_es: - msginit -i ./messages.pot -l es -o ./locale/es/LC_MESSAGES/pytrainer_es.pot -locale_eu: - msginit -i ./messages.pot -l eu -o ./locale/eu/LC_MESSAGES/pytrainer_eu.pot -locale_ca: - msginit -i ./messages.pot -l ca -o ./locale/ca/LC_MESSAGES/pytrainer_ca.pot -locale_fr: - msginit -i ./messages.pot -l fr -o ./locale/fr/LC_MESSAGES/pytrainer_fr.pot -locale_da: - msginit -i ./messages.pot -l da -o ./locale/de/LC_MESSAGES/pytrainer_da.pot -locale_de: - msginit -i ./messages.pot -l de -o ./locale/de/LC_MESSAGES/pytrainer_de.pot -locale_pl: - msginit -i ./messages.pot -l pl -o ./locale/pl/LC_MESSAGES/pytrainer_pl.pot -locale_no: - msginit -i ./messages.pot -l no -o ./locale/no/LC_MESSAGES/pytrainer_no.pot -locale_cs: - msginit -i ./messages.pot -l cs -o ./locale/cs/LC_MESSAGES/pytrainer_cs.pot -locale_ru: - msginit -i ./messages.pot -l ru -o ./locale/ru/LC_MESSAGES/pytrainer_ru.pot -locale_pl: - msginit -i ./messages.pot -l pl -o ./locale/ru/LC_MESSAGES/pytrainer_pl.pot Deleted: pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot =================================================================== --- pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot 2010-01-06 21:47:54 UTC (rev 471) +++ pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot 2010-01-08 18:43:31 UTC (rev 472) @@ -1,1191 +0,0 @@ -# Catalan translations for vud package. -# Copyright (C) 2008 THE vud'S COPYRIGHT HOLDER -# This file is distributed under the same license as the vud package. -# Fiz Vazquez <vu...@si...>, 2008. -# -msgid "" -msgstr "" -"Project-Id-Version: vud 1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-03-03 19:57+0100\n" -"PO-Revision-Date: 2008-03-03 19:57+0100\n" -"Last-Translator: Fiz Vazquez <vu...@si...>\n" -"Language-Team: Catalan\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: glade/pytrainer.glade:10 -msgid "window1" -msgstr "" - -#: glade/pytrainer.glade:50 -msgid "_File" -msgstr "" - -#: glade/pytrainer.glade:74 -msgid "_Export as Text Separated by Commas" -msgstr "" - -#: glade/pytrainer.glade:114 -msgid "_Edit" -msgstr "" - -#: glade/pytrainer.glade:136 -msgid "_View" -msgstr "" - -#: glade/pytrainer.glade:145 -msgid " _Classic View" -msgstr "" - -#: glade/pytrainer.glade:156 -msgid " _List View" -msgstr "" - -#: glade/pytrainer.glade:168 -msgid " _Waypoints Editor" -msgstr "" - -#: glade/pytrainer.glade:184 -msgid "Tools" -msgstr "" - -#: glade/pytrainer.glade:194 glade/pytrainer.glade:12298 -msgid "Extensions" -msgstr "" - -#: glade/pytrainer.glade:204 -msgid "GPS Device Plugins" -msgstr "" - -#: glade/pytrainer.glade:218 -msgid "_Help" -msgstr "" - -#: glade/pytrainer.glade:338 pytrainer/gui/windowmain.py:49 -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:471 -#: pytrainer/gui/windowprofile.py:67 -msgid "Sport" -msgstr "" - -#: glade/pytrainer.glade:364 -msgid "All Sports" -msgstr "" - -#: glade/pytrainer.glade:473 glade/pytrainer.glade:838 -#: glade/pytrainer.glade:866 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:501 glade/pytrainer.glade:894 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:529 -msgid "<b>Sport:</b>" -msgstr "" - -#: glade/pytrainer.glade:557 glade/pytrainer.glade:2996 -#: glade/pytrainer.glade:4124 glade/pytrainer.glade:5419 -msgid "<b>Time:</b>" -msgstr "" - -#: glade/pytrainer.glade:586 glade/pytrainer.glade:3193 -#: glade/pytrainer.glade:4294 glade/pytrainer.glade:5643 -msgid "<b>Speed:</b>" -msgstr "" - -#: glade/pytrainer.glade:614 glade/pytrainer.glade:3502 -#: glade/pytrainer.glade:4658 glade/pytrainer.glade:5813 -msgid "<b>Pace:</b>" -msgstr "" - -#: glade/pytrainer.glade:642 -msgid "<b>Ascent:</b>" -msgstr "" - -#: glade/pytrainer.glade:670 -msgid "<b>Comments:</b>" -msgstr "" - -#: glade/pytrainer.glade:698 glade/pytrainer.glade:1381 -#: glade/pytrainer.glade:3249 glade/pytrainer.glade:3306 -#: glade/pytrainer.glade:4350 glade/pytrainer.glade:4519 -#: glade/pytrainer.glade:5699 glade/pytrainer.glade:5727 -msgid "km/h" -msgstr "" - -#: glade/pytrainer.glade:726 glade/pytrainer.glade:1091 -#: glade/pytrainer.glade:3530 glade/pytrainer.glade:3586 -#: glade/pytrainer.glade:4714 glade/pytrainer.glade:4742 -#: glade/pytrainer.glade:5870 glade/pytrainer.glade:5898 -msgid "min/km" -msgstr "" - -#: glade/pytrainer.glade:754 glade/pytrainer.glade:1147 -msgid "m" -msgstr "" - -#: glade/pytrainer.glade:782 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:810 glade/pytrainer.glade:1119 -#: glade/pytrainer.glade:2042 glade/pytrainer.glade:2070 -#: glade/pytrainer.glade:2098 glade/pytrainer.glade:2266 -#: glade/pytrainer.glade:3698 glade/pytrainer.glade:4854 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:922 -msgid "<b>Date:</b>" -msgstr "" - -#: glade/pytrainer.glade:950 glade/pytrainer.glade:2968 -#: glade/pytrainer.glade:4096 glade/pytrainer.glade:5391 -msgid "<b>Distance:</b>" -msgstr "" - -#: glade/pytrainer.glade:979 -msgid "<b>Max Speed</b>" -msgstr "" - -#: glade/pytrainer.glade:1007 glade/pytrainer.glade:3558 -#: glade/pytrainer.glade:4686 glade/pytrainer.glade:5842 -msgid "<b>Max Pace:</b>" -msgstr "" - -#: glade/pytrainer.glade:1035 -msgid "<b>Descent:</b>" -msgstr "" - -#: glade/pytrainer.glade:1063 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:1213 glade/pytrainer.glade:2912 -#: glade/pytrainer.glade:4040 glade/pytrainer.glade:5615 -msgid "Km" -msgstr "" - -#: glade/pytrainer.glade:1246 glade/pytrainer.glade:1296 -#: glade/pytrainer.glade:1346 glade/pytrainer.glade:3030 -#: glade/pytrainer.glade:3080 glade/pytrainer.glade:3130 -#: glade/pytrainer.glade:4208 glade/pytrainer.glade:4258 -#: glade/pytrainer.glade:5503 glade/pytrainer.glade:5553 -msgid "00" -msgstr "" - -#: glade/pytrainer.glade:1271 glade/pytrainer.glade:1321 -#: glade/pytrainer.glade:3055 glade/pytrainer.glade:3105 -#: glade/pytrainer.glade:4183 glade/pytrainer.glade:4233 -#: glade/pytrainer.glade:5478 glade/pytrainer.glade:5528 -#: glade/pytrainer.glade:7648 glade/pytrainer.glade:7693 -msgid ":" -msgstr "" - -#: glade/pytrainer.glade:1415 glade/pytrainer.glade:2377 -#: glade/pytrainer.glade:2939 glade/pytrainer.glade:3221 -#: glade/pytrainer.glade:3362 glade/pytrainer.glade:3446 -#: glade/pytrainer.glade:3726 glade/pytrainer.glade:3754 -#: glade/pytrainer.glade:4067 glade/pytrainer.glade:4322 -#: glade/pytrainer.glade:4406 glade/pytrainer.glade:4602 -#: glade/pytrainer.glade:4882 glade/pytrainer.glade:5222 -#: glade/pytrainer.glade:5306 glade/pytrainer.glade:5362 -#: glade/pytrainer.glade:5671 glade/pytrainer.glade:5954 -#: glade/pytrainer.glade:5982 glade/pytrainer.glade:6010 -#: glade/pytrainer.glade:6038 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:1522 -msgid " <b>Title:</b>" -msgstr "" - -#: glade/pytrainer.glade:1636 -msgid "" -"Profile\n" -"Speed\n" -"Pace\n" -"Heart Rate" -msgstr "" - -#: glade/pytrainer.glade:1655 glade/pytrainer.glade:5040 -#: glade/pytrainer.glade:6196 -msgid "Versus" -msgstr "" - -#: glade/pytrainer.glade:1680 -msgid "" -"None\n" -"Profile\n" -"Speed\n" -"Pace\n" -"Heart Rate\n" -msgstr "" - -#: glade/pytrainer.glade:1845 -msgid "<b>Beats:</b>" -msgstr "" - -#: glade/pytrainer.glade:1873 glade/pytrainer.glade:3334 -#: glade/pytrainer.glade:4378 glade/pytrainer.glade:5194 -msgid "<b>Calories: </b>" -msgstr "" - -#: glade/pytrainer.glade:1901 glade/pytrainer.glade:3614 -#: glade/pytrainer.glade:4798 glade/pytrainer.glade:5926 -msgid "<b>Max Beats:</b>" -msgstr "" - -#: glade/pytrainer.glade:1929 -msgid "<b>HR Zones Method:</b>" -msgstr "" - -#: glade/pytrainer.glade:1958 -msgid "<b>HR Zone5:</b>" -msgstr "" - -#: glade/pytrainer.glade:1986 glade/pytrainer.glade:2350 -msgid " bpm" -msgstr "" - -#: glade/pytrainer.glade:2014 -msgid " Cal" -msgstr "" - -#: glade/pytrainer.glade:2126 -msgid "<b>HR Zone4:</b>" -msgstr "" - -#: glade/pytrainer.glade:2154 -msgid "<b>HR Zone3:</b>" -msgstr "" - -#: glade/pytrainer.glade:2182 -msgid "<b>HR Zone2:</b>" -msgstr "" - -#: glade/pytrainer.glade:2210 -msgid "<b>HR Zone1:</b>" -msgstr "" - -#: glade/pytrainer.glade:2238 glade/pytrainer.glade:2294 -#: glade/pytrainer.glade:2322 glade/pytrainer.glade:3670 -#: glade/pytrainer.glade:4491 glade/pytrainer.glade:4826 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:2405 glade/pytrainer.glade:2432 -#: glade/pytrainer.glade:2460 glade/pytrainer.glade:2488 -#: glade/pytrainer.glade:2516 glade/pytrainer.glade:3474 -#: glade/pytrainer.glade:3642 glade/pytrainer.glade:4630 -#: glade/pytrainer.glade:4770 glade/pytrainer.glade:5334 -#: glade/pytrainer.glade:5755 -msgid "bpm" -msgstr "" - -#: glade/pytrainer.glade:2544 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:2582 -msgid " <b>Heart Rate:</b>" -msgstr "" - -#: glade/pytrainer.glade:2759 glade/pytrainer.glade:7010 -#: glade/pytrainer.glade:10877 -msgid "label-2147483648" -msgstr "" - -#: glade/pytrainer.glade:2797 -msgid "label-2147483647" -msgstr "" - -#: glade/pytrainer.glade:2853 -msgid "Record" -msgstr "" - -#: glade/pytrainer.glade:3278 glade/pytrainer.glade:4463 -#: glade/pytrainer.glade:5784 -msgid "<b>Max Speed:</b>" -msgstr "" - -#: glade/pytrainer.glade:3390 glade/pytrainer.glade:4434 -#: glade/pytrainer.glade:5250 -msgid "Cal" -msgstr "" - -#: glade/pytrainer.glade:3418 glade/pytrainer.glade:4574 -#: glade/pytrainer.glade:5278 -msgid "<b>Beats avg:</b>" -msgstr "" - -#: glade/pytrainer.glade:3792 -msgid " <b>Date:</b>" -msgstr "" - -#: glade/pytrainer.glade:3867 -msgid "Value" -msgstr "" - -#: glade/pytrainer.glade:3892 -msgid "" -"Stage Profile\n" -"Stage Velocity\n" -"Stage Profile/velocity" -msgstr "" - -#: glade/pytrainer.glade:3981 -msgid "Day" -msgstr "" - -#: glade/pytrainer.glade:4158 glade/pytrainer.glade:5453 -msgid "000" -msgstr "" - -#: glade/pytrainer.glade:4547 glade/pytrainer.glade:7846 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:4920 -msgid " <b>Month:</b>" -msgstr "" - -#: glade/pytrainer.glade:5020 glade/pytrainer.glade:6176 -msgid "" -"Kilometers\n" -"Time\n" -"Beats\n" -"Average\n" -"Calories" -msgstr "" - -#: glade/pytrainer.glade:5065 glade/pytrainer.glade:6221 -msgid "" -"None\n" -"Kilometers\n" -"Time\n" -"Beats\n" -"Average\n" -"Calories" -msgstr "" - -#: glade/pytrainer.glade:5135 -msgid "Month" -msgstr "" - -#: glade/pytrainer.glade:6076 -msgid " <b>Year:</b>" -msgstr "" - -#: glade/pytrainer.glade:6291 -msgid "Year" -msgstr "" - -#: glade/pytrainer.glade:6334 -msgid "label154" -msgstr "" - -#: glade/pytrainer.glade:6371 -msgid "<b>Title:</b>" -msgstr "" - -#: glade/pytrainer.glade:6416 -msgid "Search" -msgstr "" - -#: glade/pytrainer.glade:6463 -msgid "Columns" -msgstr "" - -#: glade/pytrainer.glade:6538 -msgid "label155" -msgstr "" - -#: glade/pytrainer.glade:6672 -msgid "Type:" -msgstr "" - -#: glade/pytrainer.glade:6700 -msgid "" -"Font\n" -"Restaurant\n" -"Scenic Area\n" -"Summit" -msgstr "" - -#: glade/pytrainer.glade:6721 -msgid "Latitude: " -msgstr "" - -#: glade/pytrainer.glade:6749 -msgid " Name:" -msgstr "" - -#: glade/pytrainer.glade:6777 -msgid "Longitude:" -msgstr "" - -#: glade/pytrainer.glade:6805 glade/pytrainer.glade:12486 -#: glade/pytrainer.glade:12809 -msgid "Description:" -msgstr "" - -#: glade/pytrainer.glade:6925 -msgid "<b> Waypoint: </b>" -msgstr "" - -#: glade/pytrainer.glade:7058 -msgid "label162" -msgstr "" - -#: glade/pytrainer.glade:7198 -msgid "label163" -msgstr "" - -#: glade/pytrainer.glade:7223 -msgid "New Entry" -msgstr "" - -#: glade/pytrainer.glade:7296 -msgid "Title:" -msgstr "" - -#: glade/pytrainer.glade:7345 -msgid "GPX File:" -msgstr "" - -#: glade/pytrainer.glade:7415 -msgid "Calculate Values" -msgstr "" - -#: glade/pytrainer.glade:7434 -msgid "Sport:" -msgstr "" - -#: glade/pytrainer.glade:7485 -msgid "<b>Main</b>" -msgstr "" - -#: glade/pytrainer.glade:7546 -msgid "Distance (Km):" -msgstr "" - -#: glade/pytrainer.glade:7575 glade/pytrainer.glade:7772 -#: glade/pytrainer.glade:8053 glade/pytrainer.glade:8299 -#: glade/pytrainer.glade:8767 glade/pytrainer.glade:11515 -msgid "Calculate" -msgstr "" - -#: glade/pytrainer.glade:7594 -msgid "Time:" -msgstr "" - -#: glade/pytrainer.glade:7792 -msgid "Date:" -msgstr "" - -#: glade/pytrainer.glade:7912 glade/pytrainer.glade:11565 -msgid "<b>General</b>" -msgstr "" - -#: glade/pytrainer.glade:7973 -msgid "Max (km/h):" -msgstr "" - -#: glade/pytrainer.glade:8024 -msgid "Velocity (km/h)" -msgstr "" - -#: glade/pytrainer.glade:8099 -msgid "<b>Velocity</b>" -msgstr "" - -#: glade/pytrainer.glade:8135 -msgid "Quick Entry" -msgstr "" - -#: glade/pytrainer.glade:8195 -msgid "Max (min/km):" -msgstr "" - -#: glade/pytrainer.glade:8247 -msgid "Pace (min/km):" -msgstr "" - -#: glade/pytrainer.glade:8322 -msgid "<b>Pace</b>" -msgstr "" - -#: glade/pytrainer.glade:8383 -msgid "Ascent:" -msgstr "" - -#: glade/pytrainer.glade:8435 -msgid "Descent:" -msgstr "" - -#: glade/pytrainer.glade:8490 -msgid "<b>Accumulated Altitude Change</b>" -msgstr "" - -#: glade/pytrainer.glade:8551 -msgid "Max (bpm):" -msgstr "" - -#: glade/pytrainer.glade:8580 -msgid "Heart rate:" -msgstr "" - -#: glade/pytrainer.glade:8654 pytrainer/gui/windowmain.py:475 -#: pytrainer/monthgraph.py:77 -msgid "Calories" -msgstr "" - -#: glade/pytrainer.glade:8705 -msgid "" -"<small><b>Note:</b> In order to calculate the calories you must set the " -"sport MET (in Preferences->Sport) </small>" -msgstr "" - -#: glade/pytrainer.glade:8822 -msgid "<b>Heart Rate</b>" -msgstr "" - -#: glade/pytrainer.glade:8858 -msgid "Advanced" -msgstr "" - -#: glade/pytrainer.glade:8955 -msgid "<b>Comments</b>" -msgstr "" - -#: glade/pytrainer.glade:8984 -msgid "Comments" -msgstr "" - -#: glade/pytrainer.glade:9089 -msgid "Preferences" -msgstr "" - -#: glade/pytrainer.glade:9163 -msgid "Metric system" -msgstr "" - -#: glade/pytrainer.glade:9185 -msgid "U.S. customary units" -msgstr "" - -#: glade/pytrainer.glade:9211 -msgid "<b>System of Measurement</b>" -msgstr "" - -#: glade/pytrainer.glade:9271 -msgid "Database type:" -msgstr "" - -#: glade/pytrainer.glade:9299 -msgid "Database host:" -msgstr "" - -#: glade/pytrainer.glade:9348 -msgid "Database name:" -msgstr "" - -#: glade/pytrainer.glade:9416 -msgid "Database user:" -msgstr "" - -#: glade/pytrainer.glade:9444 -msgid "Database pass:" -msgstr "" - -#: glade/pytrainer.glade:9518 -msgid "<b>Database</b>" -msgstr "" - -#: glade/pytrainer.glade:9578 -msgid "Use this port for internal connections: " -msgstr "" - -#: glade/pytrainer.glade:9629 -msgid "" -"<small><b>Note:</b> Change this only if you know what you are doing</small>" -msgstr "" - -#: glade/pytrainer.glade:9661 -msgid "<b>Port Connnection</b>" -msgstr "" - -#: glade/pytrainer.glade:9697 -msgid "General" -msgstr "" - -#: glade/pytrainer.glade:9750 -msgid "User name:" -msgstr "" - -#: glade/pytrainer.glade:9778 -msgid "Gender:" -msgstr "" - -#: glade/pytrainer.glade:9824 -msgid "Height:" -msgstr "" - -#: glade/pytrainer.glade:9895 -msgid "Date of birth:" -msgstr "" - -#: glade/pytrainer.glade:10007 -msgid "Weight:" -msgstr "" - -#: glade/pytrainer.glade:10039 -msgid "<b>Athlete Details</b>" -msgstr "" - -#: glade/pytrainer.glade:10068 -msgid "Athlete" -msgstr "" - -#: glade/pytrainer.glade:10251 -msgid "<b>Sport List</b>" -msgstr "" - -#: glade/pytrainer.glade:10280 -msgid "llist" -msgstr "" - -#: glade/pytrainer.glade:10360 glade/pytrainer.glade:12430 -#: glade/pytrainer.glade:12921 -msgid "Name:" -msgstr "" - -#: glade/pytrainer.glade:10388 -msgid "M.E.T.:" -msgstr "" - -#: glade/pytrainer.glade:10437 -msgid "Extra Weight:" -msgstr "" - -#: glade/pytrainer.glade:10513 glade/pytrainer.glade:11119 -msgid "" -"<small><b>Note:</b> You can get your M.E.T. sport Coefficient here: http://" -"pytrainer.e-oss.net/met.pdf</small>" -msgstr "" - -#: glade/pytrainer.glade:10624 -msgid "<b>Add New Sport</b>" -msgstr "" - -#: glade/pytrainer.glade:10653 -msgid "new" -msgstr "" - -#: glade/pytrainer.glade:10713 -msgid "" -"Deleting a sport removes associated records.\n" -"Continue?" -msgstr "" - -#: glade/pytrainer.glade:10853 -msgid "<b>Delete Sport</b>" -msgstr "" - -#: glade/pytrainer.glade:10913 -msgid "delete" -msgstr "" - -#: glade/pytrainer.glade:10972 -msgid "Name" -msgstr "" - -#: glade/pytrainer.glade:11021 -msgid "M.E.T." -msgstr "" - -#: glade/pytrainer.glade:11070 pytrainer/gui/windowprofile.py:67 -msgid "Extra Weight" -msgstr "" - -#: glade/pytrainer.glade:11236 -msgid "<b>Edit Sport</b>" -msgstr "" - -#: glade/pytrainer.glade:11260 -msgid "<b>lalaal</b>" -msgstr "" - -#: glade/pytrainer.glade:11296 -msgid "edit" -msgstr "" - -#: glade/pytrainer.glade:11325 -msgid "Sports" -msgstr "" - -#: glade/pytrainer.glade:11384 -msgid "Maximum heart rate:" -msgstr "" - -#: glade/pytrainer.glade:11412 -msgid "Resting heart rate:" -msgstr "" - -#: glade/pytrainer.glade:11486 -msgid "" -"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " -"number 220 minus your age. </small>" -msgstr "" - -#: glade/pytrainer.glade:11625 -msgid "" -"<small><b>NOTE:</b> in order to use the Karvonen method you must cover the " -"Resting hr field.</small>" -msgstr "" - -#: glade/pytrainer.glade:11654 -msgid "Percentages based method" -msgstr "" - -#: glade/pytrainer.glade:11676 pytrainer/gui/windowmain.py:194 -msgid "Karvonen method" -msgstr "" - -#: glade/pytrainer.glade:11698 -msgid "Select how to calculate your heart rate zones." -msgstr "" - -#: glade/pytrainer.glade:11730 -msgid "<b>Heart Rate Zones</b>" -msgstr "" - -#: glade/pytrainer.glade:11766 pytrainer/daygraph.py:58 -#: pytrainer/heartrategraph.py:33 pytrainer/recordgraph.py:78 -msgid "Heart Rate" -msgstr "" - -#: glade/pytrainer.glade:11871 -msgid "Calendar" -msgstr "" - -#: glade/pytrainer.glade:11997 -msgid "pytrainer" -msgstr "" - -#: glade/pytrainer.glade:11998 -msgid "(c) Fiz Vazquez <vu...@si...>" -msgstr "" - -#: glade/pytrainer.glade:11999 -msgid "Track sporting activities and performance" -msgstr "" - -#: glade/pytrainer.glade:12000 -msgid "" -"(C) Fiz Vazquez\n" -"\n" -" This program is free software; you can redistribute \n" -" it and/or modify it under the terms of the GNU \n" -" General Public License as published by the Free \n" -" Software Foundation; either version 2 of the License, \n" -" or (at your option) any later version.\n" -"\n" -" This program is distributed in the hope that it will be \n" -" useful, but WITHOUT ANY WARRANTY; without even the\n" -" implied warranty of MERCHANTABILITY or FITNESS FOR \n" -" A PARTICULAR PURPOSE. See the GNU General Public \n" -" License <http://www.opensource.org/gpl-license.html>\n" -" for more details.\n" -"\n" -" You can found the license on Debian systems in the file\n" -" /usr/share/common-licenses/GPL\n" -msgstr "" - -#: glade/pytrainer.glade:12020 -msgid "pytrainer.e-oss.net" -msgstr "" - -#: glade/pytrainer.glade:12022 -msgid "" -"Basque: Jabier Santamaria <men...@gm...>\n" -"Catalan: Eloi Crespillo Itchart <el...@ik...>\n" -"Czech: Lobus Pokorny <sp...@se...>\n" -"French: Dj <dj...@dj...>\n" -"French: Pierre Gaigé <pg...@fr...>\n" -"Norwegian: Havard Davidsen <hav...@gm...>\n" -"Polish: Seweryn Kokot <sk...@po...>\n" -"german: Aleks <al...@sc...>\n" -"Spanish: Fiz vazquez <vu...@si...>" -msgstr "" - -#: glade/pytrainer.glade:12115 -msgid "Edit Record" -msgstr "" - -#: glade/pytrainer.glade:12136 -msgid "Show graph in classic view" -msgstr "" - -#: glade/pytrainer.glade:12172 -msgid "warning" -msgstr "" - -#: glade/pytrainer.glade:12374 -msgid "<b>Extension Details</b>" -msgstr "" - -#: glade/pytrainer.glade:12402 -msgid "name-entry" -msgstr "" - -#: glade/pytrainer.glade:12458 glade/pytrainer.glade:12865 -msgid "Status:" -msgstr "" - -#: glade/pytrainer.glade:12514 glade/pytrainer.glade:12837 -msgid "status-entry" -msgstr "" - -#: glade/pytrainer.glade:12542 -msgid "description-entry" -msgstr "" - -#: glade/pytrainer.glade:12677 -msgid "Plugins" -msgstr "" - -#: glade/pytrainer.glade:12752 -msgid "<b>Plugin Details</b>" -msgstr "" - -#: glade/pytrainer.glade:12781 -msgid "description-entry " -msgstr "" - -#: glade/pytrainer.glade:12893 -msgid "nameEntry" -msgstr "" - -#: glade/pytrainer.glade:13064 -msgid "Select track record" -msgstr "" - -#: pytrainer/main.py:94 -msgid "No Active Plugins" -msgstr "" - -#: pytrainer/main.py:103 -msgid "No Active Extensions" -msgstr "" - -#: pytrainer/main.py:245 -msgid "Delete this database entry?" -msgstr "" - -#: pytrainer/main.py:256 -msgid "Delete this waypoint?" -msgstr "" - -#: pytrainer/lib/heartrate.py:46 -msgid "Moderate activity" -msgstr "" - -#: pytrainer/lib/heartrate.py:47 -msgid "Weight Control" -msgstr "" - -#: pytrainer/lib/heartrate.py:48 -msgid "Aerobic" -msgstr "" - -#: pytrainer/lib/heartrate.py:49 -msgid "Anaerobic" -msgstr "" - -#: pytrainer/lib/heartrate.py:50 -msgid "VO2 MAX" -msgstr "" - -#: pytrainer/lib/gpx.py:75 -msgid "No Name" -msgstr "" - -#: pytrainer/lib/gpx.py:81 -msgid "No Data" -msgstr "" - -#: pytrainer/lib/date.py:73 -msgid "January" -msgstr "" - -#: pytrainer/lib/date.py:74 -msgid "Febrary" -msgstr "" - -#: pytrainer/lib/date.py:75 -msgid "March" -msgstr "" - -#: pytrainer/lib/date.py:76 -msgid "April" -msgstr "" - -#: pytrainer/lib/date.py:77 -msgid "May" -msgstr "" - -#: pytrainer/lib/date.py:78 -msgid "June" -msgstr "" - -#: pytrainer/lib/date.py:79 -msgid "July" -msgstr "" - -#: pytrainer/lib/date.py:80 -msgid "August" -msgstr "" - -#: pytrainer/lib/date.py:81 -msgid "September" -msgstr "" - -#: pytrainer/lib/date.py:82 -msgid "October" -msgstr "" - -#: pytrainer/lib/date.py:83 -msgid "November" -msgstr "" - -#: pytrainer/lib/date.py:84 -msgid "December" -msgstr "" - -#: pytrainer/yeargraph.py:69 pytrainer/yeargraph.py:71 -#: pytrainer/yeargraph.py:73 pytrainer/yeargraph.py:75 -#: pytrainer/yeargraph.py:77 -msgid "month" -msgstr "" - -#: pytrainer/yeargraph.py:69 -msgid "kilometers" -msgstr "" - -#: pytrainer/yeargraph.py:69 -msgid "monthly kilometers" -msgstr "" - -#: pytrainer/yeargraph.py:71 -msgid "time in hours" -msgstr "" - -#: pytrainer/yeargraph.py:71 -msgid "monthly time" -msgstr "" - -#: pytrainer/yeargraph.py:73 -msgid "beats per minute" -msgstr "" - -#: pytrainer/yeargraph.py:73 -msgid "monthly beats" -msgstr "" - -#: pytrainer/yeargraph.py:75 -msgid "average (hm/h)" -msgstr "" - -#: pytrainer/yeargraph.py:75 -msgid "monthly averages" -msgstr "" - -#: pytrainer/yeargraph.py:77 -msgid "calories" -msgstr "" - -#: pytrainer/yeargraph.py:77 -msgid "monthly calories" -msgstr "" - -#: pytrainer/gui/windowmain.py:49 pytrainer/gui/windowmain.py:52 -#: pytrainer/gui/windowmain.py:56 -msgid "id" -msgstr "" - -#: pytrainer/gui/windowmain.py:49 -msgid "Kilometer" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:468 -msgid "Title" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:469 -#: pytrainer/gui/dialogselecttrack.py:36 -msgid "Date" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:470 -msgid "Distance" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:472 -msgid "Time" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:473 -msgid "Beats" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:474 -msgid "Average" -msgstr "" - -#: pytrainer/gui/windowmain.py:56 -msgid "Waypoint" -msgstr "" - -#: pytrainer/gui/windowmain.py:196 -msgid "Percentages method" -msgstr "" - -#: pytrainer/gui/windowplugins.py:70 pytrainer/gui/windowplugins.py:97 -#: pytrainer/gui/windowextensions.py:70 -msgid "Enable" -msgstr "" - -#: pytrainer/gui/windowplugins.py:72 pytrainer/gui/windowplugins.py:96 -#: pytrainer/gui/windowextensions.py:72 -msgid "Disable" -msgstr "" - -#: pytrainer/gui/windowplugins.py:81 pytrainer/gui/windowextensions.py:81 -#, python-format -msgid "%s settings" -msgstr "" - -#: pytrainer/gui/windowplugins.py:104 -msgid "Ok" -msgstr "" - -#: pytrainer/gui/windowextensions.py:104 pytrainer/gui/windowextensions.py:117 -msgid "OK" -msgstr "" - -#: pytrainer/gui/windowprofile.py:49 -msgid "Male" -msgstr "" - -#: pytrainer/gui/windowprofile.py:50 -msgid "Female" -msgstr "" - -#: pytrainer/gui/windowprofile.py:67 -msgid "MET" -msgstr "" - -#: pytrainer/gui/dialogselecttrack.py:36 -msgid "Track Name" -msgstr "" - -#: pytrainer/daygraph.py:54 pytrainer/daygraph.py:56 pytrainer/daygraph.py:58 -#: pytrainer/heartrategraph.py:33 pytrainer/recordgraph.py:72 -#: pytrainer/recordgraph.py:74 pytrainer/recordgraph.py:76 -#: pytrainer/recordgraph.py:78 -msgid "Distance (km)" -msgstr "" - -#: pytrainer/daygraph.py:54 pytrainer/recordgraph.py:72 -msgid "Height (m)" -msgstr "" - -#: pytrainer/daygraph.py:54 pytrainer/recordgraph.py:72 -msgid "Stage Profile" -msgstr "" - -#: pytrainer/daygraph.py:56 -msgid "Velocity (Km/h)" -msgstr "" - -#: pytrainer/daygraph.py:56 -msgid "Velocity" -msgstr "" - -#: pytrainer/daygraph.py:58 pytrainer/heartrategraph.py:33 -#: pytrainer/recordgraph.py:78 -msgid "Beats (bpm)" -msgstr "" - -#: pytrainer/monthgraph.py:69 pytrainer/monthgraph.py:71 -#: pytrainer/monthgraph.py:73 pytrainer/monthgraph.py:75 -#: pytrainer/monthgraph.py:77 -msgid "day" -msgstr "" - -#: pytrainer/monthgraph.py:69 -msgid "Kilometers" -msgstr "" - -#: pytrainer/monthgraph.py:69 -msgid "Daily kilometers" -msgstr "" - -#: pytrainer/monthgraph.py:71 -msgid "Time in Hours" -msgstr "" - -#: pytrainer/monthgraph.py:71 -msgid "Daily Time" -msgstr "" - -#: pytrainer/monthgraph.py:73 -msgid "Beats per Minute" -msgstr "" - -#: pytrainer/monthgraph.py:73 -msgid "Daily Beats" -msgstr "" - -#: pytrainer/monthgraph.py:75 -msgid "Average (km/h)" -msgstr "" - -#: pytrainer/monthgraph.py:75 -msgid "Daily Averages" -msgstr "" - -#: pytrainer/monthgraph.py:77 -msgid "Daily Calories" -msgstr "" - -#: pytrainer/recordgraph.py:74 -msgid "Speed (Km/h)" -msgstr "" - -#: pytrainer/recordgraph.py:74 -msgid "Speed" -msgstr "" - -#: pytrainer/recordgraph.py:76 -msgid "Pace (min/km)" -msgstr "" - -#: pytrainer/recordgraph.py:76 -msgid "Pace" -msgstr "" - -#: pytrainer/record.py:207 -msgid "pyTrainer cant import data from your gpx file" -msgstr "" - -#: pytrainer/waypoint.py:67 -msgid "" -"The gpx file seems to be a several days records. Perhaps you will need to " -"edit your gpx file" -msgstr "" Deleted: pytrainer/trunk/locale/da/LC_MESSAGES/pytrainer_dk.pot =================================================================== --- pytrainer/trunk/locale/da/LC_MESSAGES/pytrainer_dk.pot 2010-01-06 21:47:54 UTC (rev 471) +++ pytrainer/trunk/locale/da/LC_MESSAGES/pytrainer_dk.pot 2010-01-08 18:43:31 UTC (rev 472) @@ -1,806 +0,0 @@ -# translation of pytrainer_dk.po to Dansk -# Danish translations for pytrainer package. -# Copyright (C) 2007 THE pytrainer'S COPYRIGHT HOLDER -# This file is distributed under the same license as the pytrainer package. -# -# Lars Olesen <ole...@gm...>, 2007. -msgid "" -msgstr "" -"Project-Id-Version: pytrainer_dk\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-09 23:06+0100\n" -"PO-Revision-Date: 2007-12-20 21:02+0100\n" -"Last-Translator: Lars Olesen <ole...@gm...>\n" -"Language-Team: Dansk\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: KBabel 1.11.4\n" - -#: glade/pytrainer.glade:10 -msgid "window1" -msgstr "Vindue1" - -#: glade/pytrainer.glade:50 -msgid "_File" -msgstr "Fil" - -#: glade/pytrainer.glade:74 -msgid "_Export as text separated by commas" -msgstr "Eksporteret som tekst adskilt af kommaer" - -#: glade/pytrainer.glade:114 -msgid "_Edit" -msgstr "Rediger" - -#: glade/pytrainer.glade:136 -msgid "_View" -msgstr "Billede" - -#: glade/pytrainer.glade:145 -msgid " _Classic View" -msgstr "Klassisk billede" - -#: glade/pytrainer.glade:156 -msgid " _List View" -msgstr "Liste billede" - -#: glade/pytrainer.glade:168 -msgid " _Waypoints Editor View" -msgstr "Waypoint redigerings billede" - -#: glade/pytrainer.glade:184 -msgid "Tools" -msgstr "Værktøjer" - -#: glade/pytrainer.glade:194 -msgid "Extensions" -msgstr "Udvidelser" - -#: glade/pytrainer.glade:204 -msgid "Gps Device Plugins" -msgstr "GPS udstyrs plugins" - -#: glade/pytrainer.glade:218 -msgid "_Help" -msgstr "Hjælp" - -#: glade/pytrainer.glade:338 glade/pytrainer.glade:4810 -#: pytrainer/gui/windowmain.py:49 pytrainer/gui/windowmain.py:52 -#: pytrainer/gui/windowmain.py:378 -msgid "Sport" -msgstr "Sport" - -#: glade/pytrainer.glade:364 -msgid "All Sports" -msgstr "Alle sportsgrene" - -#: glade/pytrainer.glade:472 glade/pytrainer.glade:1658 -#: glade/pytrainer.glade:2414 glade/pytrainer.glade:3125 -msgid "<b>Beats avg:</b>" -msgstr "Hjerteslag" - -#: glade/pytrainer.glade:522 -msgid " bpm" -msgstr "puls" - -#: glade/pytrainer.glade:550 glade/pytrainer.glade:1630 -#: glade/pytrainer.glade:2386 glade/pytrainer.glade:3097 -msgid "<b>Time:</b>" -msgstr "Tid" - -#: glade/pytrainer.glade:578 glade/pytrainer.glade:1602 -#: glade/pytrainer.glade:2358 glade/pytrainer.glade:3069 -msgid "<b>Distance:</b>" -msgstr "Distance" - -#: glade/pytrainer.glade:632 glade/pytrainer.glade:677 -#: glade/pytrainer.glade:1903 glade/pytrainer.glade:1948 -#: glade/pytrainer.glade:2659 glade/pytrainer.glade:2704 -#: glade/pytrainer.glade:3370 glade/pytrainer.glade:3415 -#: glade/pytrainer.glade:5178 glade/pytrainer.glade:5223 -msgid ":" -msgstr ":" - -#: glade/pytrainer.glade:782 -msgid " Km" -msgstr "km" - -#: glade/pytrainer.glade:810 glade/pytrainer.glade:1714 -#: glade/pytrainer.glade:2470 glade/pytrainer.glade:3181 -msgid "<b>Calories: </b>" -msgstr "Kalorier" - -#: glade/pytrainer.glade:860 -msgid " Cal" -msgstr "Kal" - -#: glade/pytrainer.glade:888 glade/pytrainer.glade:1686 -#: glade/pytrainer.glade:2442 glade/pytrainer.glade:3153 -msgid "<b>Average:</b>" -msgstr "Gennemsnit" - -#: glade/pytrainer.glade:938 -msgid " km/h" -msgstr "km/t" - -#: glade/pytrainer.glade:1005 -msgid "<b>Comments:</b>" -msgstr "Kommentarer" - -#: glade/pytrainer.glade:1059 glade/pytrainer.glade:5484 -msgid "<b>Positive:</b>" -msgstr "Positive" - -#: glade/pytrainer.glade:1103 glade/pytrainer.glade:5528 -msgid "<b>Negative:</b>" -msgstr "Negative" - -#: glade/pytrainer.glade:1151 glade/pytrainer.glade:5576 -msgid " <b>Accumulated Unevenness:</b> " -msgstr "Akkumuleret højdeforskel" - -#: glade/pytrainer.glade:1297 -msgid " <b>Title:</b>" -msgstr "Titel" - -#: glade/pytrainer.glade:1386 glade/pytrainer.glade:2185 -#: glade/pytrainer.glade:2941 glade/pytrainer.glade:3652 -msgid "Value" -msgstr "Værdi" - -#: glade/pytrainer.glade:1411 glade/pytrainer.glade:2210 -msgid "" -"Stage Profile\n" -"Stage Velocity\n" -"Stage Profile/velocity" -msgstr "" -"Træningspas Højdekurve\n" -"Træningspas Hastighed\n" -"Træningpas Højdekurve / Hastighed" - -#: glade/pytrainer.glade:1543 -msgid "Record" -msgstr "Data sæt" - -#: glade/pytrainer.glade:1742 glade/pytrainer.glade:2498 -#: glade/pytrainer.glade:3209 -msgid "Km" -msgstr "Km" - -#: glade/pytrainer.glade:1770 glade/pytrainer.glade:2526 -#: glade/pytrainer.glade:3237 -msgid "bpm" -msgstr "puls" - -#: glade/pytrainer.glade:1798 glade/pytrainer.glade:2554 -#: glade/pytrainer.glade:3265 -msgid "km/h" -msgstr "km/t" - -#: glade/pytrainer.glade:1826 glade/pytrainer.glade:2582 -#: glade/pytrainer.glade:3293 -msgid "Cal" -msgstr "Kal" - -#: glade/pytrainer.glade:2110 -msgid " <b>Date:</b>" -msgstr "Dato" - -#: glade/pytrainer.glade:2299 -msgid "Day" -msgstr "Dag" - -#: glade/pytrainer.glade:2759 glade/pytrainer.glade:4751 -msgid " " -msgstr " " - -#: glade/pytrainer.glade:2866 -msgid " <b>Month:</b>" -msgstr "Måned" - -#: glade/pytrainer.glade:2966 glade/pytrainer.glade:3677 -msgid "" -"Kilometers\n" -"Time\n" -"Beats\n" -"Average\n" -"Calories" -msgstr "" -"Kilometern " -"Tid\n" -"Hjerteslag\n" -"Gennemsnit\n" -"Kalorier" - -#: glade/pytrainer.glade:3010 -msgid "Month" -msgstr "Måned" - -#: glade/pytrainer.glade:3354 -msgid "999" -msgstr "999" - -#: glade/pytrainer.glade:3577 -msgid " <b>Year:</b>" -msgstr "<b>År</b>" - -#: glade/pytrainer.glade:3721 -msgid "Year" -msgstr "År" - -#: glade/pytrainer.glade:3764 -msgid "label154" -msgstr "mærkat154" - -#: glade/pytrainer.glade:3801 -msgid "<b>Title:</b>" -msgstr "<b>Titel:</b>" - -#: glade/pytrainer.glade:3846 -msgid "Search" -msgstr "Søg" - -#: glade/pytrainer.glade:3893 -msgid "Columns" -msgstr "Kolonner" - -#: glade/pytrainer.glade:3968 -msgid "label155" -msgstr "mærkat155" - -#: glade/pytrainer.glade:4145 -msgid " <b>Name:</b>" -msgstr " <b>Navn:</b>" - -#: glade/pytrainer.glade:4173 -msgid " <b>Description:</b>" -msgstr " <b>Beskrivelse</b>" - -#: glade/pytrainer.glade:4201 -msgid " <b>Latitude: </b>" -msgstr " <b>Breddegrad:</b>" - -#: glade/pytrainer.glade:4229 -msgid " <b>Longitude:</b>" -msgstr " <b>Længdegrad:</b>" - -#: glade/pytrainer.glade:4257 -msgid " <b>Type:</b>" -msgstr " <b>Type:</b>" - -#: glade/pytrainer.glade:4329 -msgid "" -"Font\n" -"Restaurant\n" -"Scenic Area\n" -"Summit" -msgstr "" -"Font\n" -"Restaurant\n" -"Naturskønt område\n" -"Møde" - -#: glade/pytrainer.glade:4354 -msgid "<b> Waypoint: </b>" -msgstr "<b> Waypoint: </b>" - -#: glade/pytrainer.glade:4439 -msgid "label-2147483648" -msgstr "mærkat-2147483648" - -#: glade/pytrainer.glade:4487 -msgid "label162" -msgstr "mærkat162" - -#: glade/pytrainer.glade:4627 -msgid "label163" -msgstr "mærkat163" - -#: glade/pytrainer.glade:4652 glade/pytrainer.glade:5684 -msgid "New Entry" -msgstr "Nyt data sæt" - -#: glade/pytrainer.glade:4700 pytrainer/gui/windowmain.py:52 -#: pytrainer/gui/windowmain.py:376 pytrainer/gui/dialogselecttrack.py:36 -msgid "Date" -msgstr "Dato" - -#: glade/pytrainer.glade:4865 pytrainer/gui/windowmain.py:52 -#: pytrainer/gui/windowmain.py:375 -msgid "Title" -msgstr "Titel" - -#: glade/pytrainer.glade:4923 -msgid "GPX file" -msgstr "GPX fil" - -#: glade/pytrainer.glade:4985 -msgid "Calculate Values" -msgstr "Beregn værdier" - -#: glade/pytrainer.glade:5018 -msgid "Beats avg (bpm)" -msgstr "Gennemsnitlig puls " - -#: glade/pytrainer.glade:5074 -msgid "Distance (Km)" -msgstr "Afstand (km)" - -#: glade/pytrainer.glade:5124 pytrainer/gui/windowmain.py:52 -#: pytrainer/gui/windowmain.py:379 -msgid "Time" -msgstr "Tid" - -#: glade/pytrainer.glade:5278 -msgid "Average (km/h)" -msgstr "Gennemsnit (km/t)" - -#: glade/pytrainer.glade:5328 -msgid "Calculate Distance" -msgstr "Beregn distance" - -#: glade/pytrainer.glade:5348 -msgid "Calculate Time" -msgstr "Beregn tid" - -#: glade/pytrainer.glade:5368 -msgid "Calculate Average" -msgstr "Beregn gennemsnit" - -#: glade/pytrainer.glade:5409 pytrainer/gui/windowmain.py:382 -msgid "Calories" -msgstr "Kalorier" - -#: glade/pytrainer.glade:5615 -msgid "<b>Comments</b>" -msgstr "<b>Kommentarer</b>" - -#: glade/pytrainer.glade:5789 glade/pytrainer.glade:6083 -msgid "Profile" -msgstr "Profil" - -#: glade/pytrainer.glade:5835 -msgid "Name" -msgstr "Navn" - -#: glade/pytrainer.glade:5863 -msgid "Gender" -msgstr "Køn" - -#: glade/pytrainer.glade:5891 -msgid "Weight" -msgstr "Vægt" - -#: glade/pytrainer.glade:5919 -msgid "Height" -msgstr "Højde" - -#: glade/pytrainer.glade:6010 -msgid "Age" -msgstr "Alder" - -#: glade/pytrainer.glade:6113 -msgid "<b>Database</b>" -msgstr "<b>Database</b>" - -#: glade/pytrainer.glade:6147 -msgid "Database Type" -msgstr "Database Type" - -#: glade/pytrainer.glade:6175 -msgid "Database Host" -msgstr "Database Host" - -#: glade/pytrainer.glade:6224 -msgid "Database Pass" -msgstr "Database Password" - -#: glade/pytrainer.glade:6273 -msgid "Database User " -msgstr "Database Brugernavn " - -#: glade/pytrainer.glade:6322 -msgid "Database Name" -msgstr "Database Navn" - -#: glade/pytrainer.glade:6403 -msgid "Database" -msgstr "Database" - -#: glade/pytrainer.glade:6441 -msgid "<b>Sport list</b>" -msgstr "<b>Liste over sportsgrene</b>" - -#: glade/pytrainer.glade:6592 -msgid "llist" -msgstr "Liste" - -#: glade/pytrainer.glade:6621 -msgid "<b>Add new Sport</b>" -msgstr "<b>Tilføj ny Sportsgren</b>" - -#: glade/pytrainer.glade:6781 -msgid "new" -msgstr "ny" - -#: glade/pytrainer.glade:6816 -msgid "<b>Delete sport</b>" -msgstr "<b>Slet sportsgren</b>" - -#: glade/pytrainer.glade:6879 -msgid "" -"You are going to remove a sport. When you delete a \n" -"sport you delete the records asociated. Are you sure \n" -"that you want do it?" -msgstr "" -"Du er ved at fjerne en sportsgren. Når du sletter en\n" -"sportsgrenså sletter du de tilhørende data sæt. Er du sikker\\ " -"på at du ønsker dette ?" - -#: glade/pytrainer.glade:7016 -msgid "delete" -msgstr "Slet" - -#: glade/pytrainer.glade:7051 -msgid "<b>Edit sport</b>" -msgstr "<b>Rediger sportsgren</b>" - -#: glade/pytrainer.glade:7114 -msgid "New name" -msgstr "Nyt navn" - -#: glade/pytrainer.glade:7243 -msgid "edit" -msgstr "Rediger" - -#: glade/pytrainer.glade:7272 -msgid "Sports" -msgstr "Sportsgrene" - -#: glade/pytrainer.glade:7377 -msgid "Calendar" -msgstr "Kalender" - -#: glade/pytrainer.glade:7503 -msgid "pytrainer" -msgstr "pytrainer" - -#: glade/pytrainer.glade:7504 -msgid "(c) Fiz Vazquez <vu...@si...>" -msgstr "(c) Fiz Vazquez <vu...@si...>" - -#: glade/pytrainer.glade:7505 -msgid "The free sport trainning center" -msgstr "Det frie sports trænings center" - -#: glade/pytrainer.glade:7506 -msgid "" -"(C) Fiz Vazquez\n" -"\n" -" This program is free software; you can redistribute \n" -" it and/or modify it under the terms of the GNU \n" -" General Public License as published by the Free \n" -" Software Foundation; either version 2 of the License, \n" -" or (at your option) any later version.\n" -"\n" -" This program is distributed in the hope that it will be \n" -" useful, but WITHOUT ANY WARRANTY; without even the\n" -" implied warranty of MERCHANTABILITY or FITNESS FOR \n" -" A PARTICULAR PURPOSE. See the GNU General Public \n" -" License <http://www.opensource.org/gpl-license.html>\n" -" for more details.\n" -"\n" -" You can found the license on Debian systems in the file\n" -" /usr/share/common-licenses/GPL\n" -msgstr "" -"(C) Fiz Vazquez\n" -"\n" -" Dette program er fri software; Du må videredistribuere\n" -" det og/eller ændre det under betingelserne fra GNU \n" -" General Public License som den er publiceret af \"the Free \n" -" Software Foundation\"; enten version 2 af licensen, \n" -" eller (hvis du ønsker det) en hvilken som helst senere version.\n" -"\n" -" Dette program er distribueret med håbet om at det vil \n" -" være brugbart, men UDEN NOGEN GARANTI; uden selv den \n" -" implicitte garanti for SALGBARHED eller EGNETHED tIL\n " -"ET GIVET SPECIFIKT FORMÅL. Se GNU General Public \n" -" License <http://www.opensource.org/gpl-license.html>\n" -" for yderligere detaljer.\n" -"\n" -" Du kan finde licensen på Debian systemer i filen\n" -" /usr/share/common-licenses/GPL\n" - -#: glade/pytrainer.glade:7526 -msgid "pytrainer.e-oss.net" -msgstr "pytrainer.e-oss.net" - -#: glade/pytrainer.glade:7528 -msgid "" -"Catalan: Eloi Crespillo Itchart <el...@ik...>\n" -"Czech: Lobus Pokorny <sp...@se...>\n" -"French: Dj <dj...@dj...>\n" -"Norwegian: Havard Davidsen <hav...@gm...>\n" -"Polish: Seweryn Kokot <sk...@po...>\n" -"german: Aleks <al...@sc...>\n" -"Spanish: Fiz vazquez <vu...@si...>" -msgstr "" -"Katalansk: Eloi Crespillo Itchart <el...@ik...>\n" -"Tjekkisk: Lobus Pokorny <sp...@se...>\n" -"Fransk: Dj <dj...@dj...>\n" -"Norsk: Havard Davidsen <hav...@gm...>\n" -"Polsk: Seweryn Kokot <sk...@po...>\n" -"Tysk: Aleks <al...@sc...>\n" -"Spansk: Fiz vazquez <vu...@si...> " -"Dansk<ikke opgivet>" - -#: glade/pytrainer.glade:7619 -msgid "Edit Record" -msgstr "Rediger data sæt" - -#: glade/pytrainer.glade:7640 -msgid "Show graph in classic view" -msgstr "Vis graf i klassisk billede" - -#: glade/pytrainer.glade:7676 -msgid "warning" -msgstr "Advarsel" - -#: glade/pytrainer.glade:7802 -msgid "window2" -msgstr "Vindue2" - -#: glade/pytrainer.glade:7878 glade/pytrainer.glade:8228 -msgid "<b>Name:</b>" -msgstr "<b>Navn:</b>" - -#: glade/pytrainer.glade:7906 glade/pytrainer.glade:8256 -msgid "<b>Description:</b>" -msgstr "<b>Beskrivelse:</b>" - -#: glade/pytrainer.glade:7934 glade/pytrainer.glade:8284 -msgid "<b>Status:</b>" -msgstr "<b>Status:</b>" - -#: glade/pytrainer.glade:7962 -msgid "name-entry" -msgstr "Navne-indtastning" - -#: glade/pytrainer.glade:7990 glade/pytrainer.glade:8340 -msgid "description-entry" -msgstr "Beskrivelses indtastning" - -#: glade/pytrainer.glade:8018 glade/pytrainer.glade:8368 -msgid "status-entry" -msgstr "status-indtastning" - -#: glade/pytrainer.glade:8153 -msgid "Plugins" -msgstr "Plugins" - -#: glade/pytrainer.glade:8312 -msgid "nameEntry" -msgstr "navneIndtastning" - -#: glade/pytrainer.glade:8511 -msgid "Select track record" -msgstr "Vælg track data sæt" - -#: pytrainer/main.py:90 -msgid "No Active Plugins" -msgstr "Ingen aktive plugins" - -#: pytrainer/main.py:99 -msgid "No Active Extensions" -msgstr "Ingen aktive udvidelser" - -#: pytrainer/main.py:208 -msgid "You are going to remove one database entry. Are you sure yo want do it?" -msgstr "Du er ved at fjerne en database post. Er du sikker på at du vil gøre det ?" - -#: pytrainer/main.py:219 -msgid "You are going to remove one waypoint. Are you sure yo want do it?" -msgstr "Du er ved at fjerne et waypoint. Er du sikker på at du vil gøre det?" - -#: pytrainer/lib/date.py:72 -msgid "January" -msgstr "Januar" - -#: pytrainer/lib/date.py:73 -msgid "Febrary" -msgstr "Februar" - -#: pytrainer/lib/date.py:74 -msgid "March" -msgstr "Marts" - -#: pytrainer/lib/date.py:75 -msgid "April" -msgstr "April" - -#: pytrainer/lib/date.py:76 -msgid "May" -msgstr "Maj" - -#: pytrainer/lib/date.py:77 -msgid "June" -msgstr "Juni" - -#: pytrainer/lib/date.py:78 -msgid "July" -msgstr "Juli" - -#: pytrainer/lib/date.py:79 -msgid "August" -msgstr "August" - -#: pytrainer/lib/date.py:80 -msgid "September" -msgstr "September" - -#: pytrainer/lib/date.py:81 -msgid "October" -msgstr "Oktober" - -#: pytrainer/lib/date.py:82 -msgid "November" -msgstr "November" - -#: pytrainer/lib/date.py:83 -msgid "December" -msgstr "December" - -#: pytrainer/yeargraph.py:37 pytrainer/yeargraph.py:39 -#: pytrainer/yeargraph.py:41 pytrainer/yeargraph.py:43 -#: pytrainer/yeargraph.py:45 -msgid "month" -msgstr "måned" - -#: pytrainer/yeargraph.py:37 pytrainer/monthgraph.py:37 -msgid "kilometers" -msgstr "kilometer" - -#: pytrainer/yeargraph.py:37 -msgid "monthly kilometers" -msgstr "kilometer pr. måned" - -#: pytrainer/yeargraph.py:39 pytrainer/monthgraph.py:39 -msgid "time in hours" -msgstr "Tid i timer" - -#: pytrainer/yeargraph.py:39 -msgid "monthly time" -msgstr "Timer pr. måned" - -#: pytrainer/yeargraph.py:41 pytrainer/monthgraph.py:41 -msgid "beats per minute" -msgstr "Slag pr. minut" - -#: pytrainer/yeargraph.py:41 -msgid "monthly beats" -msgstr "Slag pr. måned" - -#: pytrainer/yeargraph.py:43 pytrainer/monthgraph.py:43 -msgid "average (hm/h)" -msgstr "gennemsnit (?/t)" - -#: pytrainer/yeargraph.py:43 -msgid "monthly averages" -msgstr "Månedlige gennemsnit" - -#: pytrainer/yeargraph.py:45 pytrainer/monthgraph.py:45 -msgid "calories" -msgstr "kalorier" - -#: pytrainer/yeargraph.py:45 -msgid "monthly calories" -msgstr "Kalorier pr. måned" - -#: pytrainer/gui/windowmain.py:49 pytrainer/gui/windowmain.py:52 -#: pytrainer/gui/windowmain.py:56 -msgid "id" -msgstr "id" - -#: pytrainer/gui/windowmain.py:49 -msgid "Kilometer" -msgstr "Kilometer" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:377 -msgid "Distance" -msgstr "Distance" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:380 -msgid "Beats" -msgstr "Slag" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:381 -msgid "Average" -msgstr "Gennemsnit" - -#: pytrainer/gui/windowmain.py:56 -msgid "Waypoint" -msgstr "Waypoint" - -#: pytrainer/gui/windowplugins.py:72 pytrainer/gui/windowextensions.py:70 -msgid "Active" -msgstr "Aktiv" - -#: pytrainer/gui/windowplugins.py:74 pytrainer/gui/windowextensions.py:72 -msgid "unActive" -msgstr "ikke-aktiv" - -#: pytrainer/gui/windowplugins.py:83 pytrainer/gui/windowextensions.py:81 -#, python-format -msgid "%s settings" -msgstr "%s settings" - -#: pytrainer/gui/windowplugins.py:106 pytrainer/gui/windowextensions.py:104 -#: pytrainer/gui/windowextensions.py:117 -msgid "Ok" -msgstr "Ok" - -#: pytrainer/gui/dialogselecttrack.py:36 -msgid "Track Name" -msgstr "Track Navn" - -#: pytrainer/daygraph.py:48 pytrainer/daygraph.py:50 -#: pytrainer/recordgraph.py:48 pytrainer/recordgraph.py:50 -msgid "Distance (km)" -msgstr "Distance (km)" - -#: pytrainer/daygraph.py:48 pytrainer/recordgraph.py:48 -msgid "Height (m)" -msgstr "Højde (m)" - -#: pytrainer/daygraph.py:48 pytrainer/recordgraph.py:48 -msgid "Stage Profile" -msgstr "Træningspas fart profil" - -#: pytrainer/daygraph.py:50 pytrainer/recordgraph.py:50 -msgid "Velocity (Km/h)" -msgstr "Hastighed (Km/t)" - -#: pytrainer/daygraph.py:50 pytrainer/recordgraph.py:50 -msgid "velocity" -msgstr "hastighed" - -#: pytrainer/monthgraph.py:37 pytrainer/monthgraph.py:39 -#: pytrainer/monthgraph.py:41 pytrainer/monthgraph.py:43 -#: pytrainer/monthgraph.py:45 -msgid "day" -msgstr "dag" - -#: pytrainer/monthgraph.py:37 -msgid "daily kilometers" -msgstr "kilometer pr. dag" - -#: pytrainer/monthgraph.py:39 -msgid "daily time" -msgstr "tid pr. dag" - -#: pytrainer/monthgraph.py:41 -msgid "daily beats" -msgstr "slag pr. dag" - -#: pytrainer/monthgraph.py:43 -msgid "daily averages" -msgstr "daglige gennemsnit" - -#: pytrainer/monthgraph.py:45 -msgid "daily calories" -msgstr "kalorier pr. dag" - -#: pytrainer/record.py:190 -msgid "" -"The gpx file seems to have several track records. Press cancel to select a " -"track record. Press Ok to load all of them as a single track record." -msgstr "gpx filen ser ud til at indeholde flere track data sæt. Tryk fortryd for at vælge et track datasæt; Tryk Ok for at hente dem alle som et enkelt track datasæt." - -#: pytrainer/waypoint.py:67 -msgid "" -"The gpx file seems to be a several days records. Perhaps you will need to " -"edit your gpx file" -msgstr "gpx filen ser ud til at indeholde data sæt for flere dage. Måske bliver du nødt til at redigere din gpx fil." - Deleted: pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot =================================================================== --- pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot 2010-01-06 21:47:54 UTC (rev 471) +++ pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot 2010-01-08 18:43:31 UTC (rev 472) @@ -1,1192 +0,0 @@ -# German translations for vud package. -# Copyright (C) 2008 THE vud'S COPYRIGHT HOLDER -# This file is distributed under the same license as the vud package. -# Fiz Vazquez <vu...@si...>, 2008. -# -msgid "" -msgstr "" -"Project-Id-Version: vud 1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-03-03 19:57+0100\n" -"PO-Revision-Date: 2008-03-03 19:57+0100\n" -"Last-Translator: Fiz Vazquez <vu...@si...>\n" -"Language-Team: German\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: glade/pytrainer.glade:10 -msgid "window1" -msgstr "" - -#: glade/pytrainer.glade:50 -msgid "_File" -msgstr "" - -#: glade/pytrainer.glade:74 -msgid "_Export as Text Separated by Commas" -msgstr "" - -#: glade/pytrainer.glade:114 -msgid "_Edit" -msgstr "" - -#: glade/pytrainer.glade:136 -msgid "_View" -msgstr "" - -#: glade/pytrainer.glade:145 -msgid " _Classic View" -msgstr "" - -#: glade/pytrainer.glade:156 -msgid " _List View" -msgstr "" - -#: glade/pytrainer.glade:168 -msgid " _Waypoints Editor" -msgstr "" - -#: glade/pytrainer.glade:184 -msgid "Tools" -msgstr "" - -#: glade/pytrainer.glade:194 glade/pytrainer.glade:12298 -msgid "Extensions" -msgstr "" - -#: glade/pytrainer.glade:204 -msgid "GPS Device Plugins" -msgstr "" - -#: glade/pytrainer.glade:218 -msgid "_Help" -msgstr "" - -#: glade/pytrainer.glade:338 pytrainer/gui/windowmain.py:49 -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:471 -#: pytrainer/gui/windowprofile.py:67 -msgid "Sport" -msgstr "" - -#: glade/pytrainer.glade:364 -msgid "All Sports" -msgstr "" - -#: glade/pytrainer.glade:473 glade/pytrainer.glade:838 -#: glade/pytrainer.glade:866 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:501 glade/pytrainer.glade:894 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:529 -msgid "<b>Sport:</b>" -msgstr "" - -#: glade/pytrainer.glade:557 glade/pytrainer.glade:2996 -#: glade/pytrainer.glade:4124 glade/pytrainer.glade:5419 -msgid "<b>Time:</b>" -msgstr "" - -#: glade/pytrainer.glade:586 glade/pytrainer.glade:3193 -#: glade/pytrainer.glade:4294 glade/pytrainer.glade:5643 -msgid "<b>Speed:</b>" -msgstr "" - -#: glade/pytrainer.glade:614 glade/pytrainer.glade:3502 -#: glade/pytrainer.glade:4658 glade/pytrainer.glade:5813 -msgid "<b>Pace:</b>" -msgstr "" - -#: glade/pytrainer.glade:642 -msgid "<b>Ascent:</b>" -msgstr "" - -#: glade/pytrainer.glade:670 -msgid "<b>Comments:</b>" -msgstr "" - -#: glade/pytrainer.glade:698 glade/pytrainer.glade:1381 -#: glade/pytrainer.glade:3249 glade/pytrainer.glade:3306 -#: glade/pytrainer.glade:4350 glade/pytrainer.glade:4519 -#: glade/pytrainer.glade:5699 glade/pytrainer.glade:5727 -msgid "km/h" -msgstr "" - -#: glade/pytrainer.glade:726 glade/pytrainer.glade:1091 -#: glade/pytrainer.glade:3530 glade/pytrainer.glade:3586 -#: glade/pytrainer.glade:4714 glade/pytrainer.glade:4742 -#: glade/pytrainer.glade:5870 glade/pytrainer.glade:5898 -msgid "min/km" -msgstr "" - -#: glade/pytrainer.glade:754 glade/pytrainer.glade:1147 -msgid "m" -msgstr "" - -#: glade/pytrainer.glade:782 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:810 glade/pytrainer.glade:1119 -#: glade/pytrainer.glade:2042 glade/pytrainer.glade:2070 -#: glade/pytrainer.glade:2098 glade/pytrainer.glade:2266 -#: glade/pytrainer.glade:3698 glade/pytrainer.glade:4854 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:922 -msgid "<b>Date:</b>" -msgstr "" - -#: glade/pytrainer.glade:950 glade/pytrainer.glade:2968 -#: glade/pytrainer.glade:4096 glade/pytrainer.glade:5391 -msgid "<b>Distance:</b>" -msgstr "" - -#: glade/pytrainer.glade:979 -msgid "<b>Max Speed</b>" -msgstr "" - -#: glade/pytrainer.glade:1007 glade/pytrainer.glade:3558 -#: glade/pytrainer.glade:4686 glade/pytrainer.glade:5842 -msgid "<b>Max Pace:</b>" -msgstr "" - -#: glade/pytrainer.glade:1035 -msgid "<b>Descent:</b>" -msgstr "" - -#: glade/pytrainer.glade:1063 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:1213 glade/pytrainer.glade:2912 -#: glade/pytrainer.glade:4040 glade/pytrainer.glade:5615 -msgid "Km" -msgstr "" - -#: glade/pytrainer.glade:1246 glade/pytrainer.glade:1296 -#: glade/pytrainer.glade:1346 glade/pytrainer.glade:3030 -#: glade/pytrainer.glade:3080 glade/pytrainer.glade:3130 -#: glade/pytrainer.glade:4208 glade/pytrainer.glade:4258 -#: glade/pytrainer.glade:5503 glade/pytrainer.glade:5553 -msgid "00" -msgstr "" - -#: glade/pytrainer.glade:1271 glade/pytrainer.glade:1321 -#: glade/pytrainer.glade:3055 glade/pytrainer.glade:3105 -#: glade/pytrainer.glade:4183 glade/pytrainer.glade:4233 -#: glade/pytrainer.glade:5478 glade/pytrainer.glade:5528 -#: glade/pytrainer.glade:7648 glade/pytrainer.glade:7693 -msgid ":" -msgstr "" - -#: glade/pytrainer.glade:1415 glade/pytrainer.glade:2377 -#: glade/pytrainer.glade:2939 glade/pytrainer.glade:3221 -#: glade/pytrainer.glade:3362 glade/pytrainer.glade:3446 -#: glade/pytrainer.glade:3726 glade/pytrainer.glade:3754 -#: glade/pytrainer.glade:4067 glade/pytrainer.glade:4322 -#: glade/pytrainer.glade:4406 glade/pytrainer.glade:4602 -#: glade/pytrainer.glade:4882 glade/pytrainer.glade:5222 -#: glade/pytrainer.glade:5306 glade/pytrainer.glade:5362 -#: glade/pytrainer.glade:5671 glade/pytrainer.glade:5954 -#: glade/pytrainer.glade:5982 glade/pytrainer.glade:6010 -#: glade/pytrainer.glade:6038 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:1522 -msgid " <b>Title:</b>" -msgstr "" - -#: glade/pytrainer.glade:1636 -msgid "" -"Profile\n" -"Speed\n" -"Pace\n" -"Heart Rate" -msgstr "" - -#: glade/pytrainer.glade:1655 glade/pytrainer.glade:5040 -#: glade/pytrainer.glade:6196 -msgid "Versus" -msgstr "" - -#: glade/pytrainer.glade:1680 -msgid "" -"None\n" -"Profile\n" -"Speed\n" -"Pace\n" -"Heart Rate\n" -msgstr "" - -#: glade/pytrainer.glade:1845 -msgid "<b>Beats:</b>" -msgstr "" - -#: glade/pytrainer.glade:1873 glade/pytrainer.glade:3334 -#: glade/pytrainer.glade:4378 glade/pytrainer.glade:5194 -msgid "<b>Calories: </b>" -msgstr "" - -#: glade/pytrainer.glade:1901 glade/pytrainer.glade:3614 -#: glade/pytrainer.glade:4798 glade/pytrainer.glade:5926 -msgid "<b>Max Beats:</b>" -msgstr "" - -#: glade/pytrainer.glade:1929 -msgid "<b>HR Zones Method:</b>" -msgstr "" - -#: glade/pytrainer.glade:1958 -msgid "<b>HR Zone5:</b>" -msgstr "" - -#: glade/pytrainer.glade:1986 glade/pytrainer.glade:2350 -msgid " bpm" -msgstr "" - -#: glade/pytrainer.glade:2014 -msgid " Cal" -msgstr "" - -#: glade/pytrainer.glade:2126 -msgid "<b>HR Zone4:</b>" -msgstr "" - -#: glade/pytrainer.glade:2154 -msgid "<b>HR Zone3:</b>" -msgstr "" - -#: glade/pytrainer.glade:2182 -msgid "<b>HR Zone2:</b>" -msgstr "" - -#: glade/pytrainer.glade:2210 -msgid "<b>HR Zone1:</b>" -msgstr "" - -#: glade/pytrainer.glade:2238 glade/pytrainer.glade:2294 -#: glade/pytrainer.glade:2322 glade/pytrainer.glade:3670 -#: glade/pytrainer.glade:4491 glade/pytrainer.glade:4826 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:2405 glade/pytrainer.glade:2432 -#: glade/pytrainer.glade:2460 glade/pytrainer.glade:2488 -#: glade/pytrainer.glade:2516 glade/pytrainer.glade:3474 -#: glade/pytrainer.glade:3642 glade/pytrainer.glade:4630 -#: glade/pytrainer.glade:4770 glade/pytrainer.glade:5334 -#: glade/pytrainer.glade:5755 -msgid "bpm" -msgstr "" - -#: glade/pytrainer.glade:2544 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:2582 -msgid " <b>Heart Rate:</b>" -msgstr "" - -#: glade/pytrainer.glade:2759 glade/pytrainer.glade:7010 -#: glade/pytrainer.glade:10877 -msgid "label-2147483648" -msgstr "" - -#: glade/pytrainer.glade:2797 -msgid "label-2147483647" -msgstr "" - -#: glade/pytrainer.glade:2853 -msgid "Record" -msgstr "" - -#: glade/pytrainer.glade:3278 glade/pytrainer.glade:4463 -#: glade/pytrainer.glade:5784 -msgid "<b>Max Speed:</b>" -msgstr "" - -#: glade/pytrainer.glade:3390 glade/pytrainer.glade:4434 -#: glade/pytrainer.glade:5250 -msgid "Cal" -msgstr "" - -#: glade/pytrainer.glade:3418 glade/pytrainer.glade:4574 -#: glade/pytrainer.glade:5278 -msgid "<b>Beats avg:</b>" -msgstr "" - -#: glade/pytrainer.glade:3792 -msgid " <b>Date:</b>" -msgstr "" - -#: glade/pytrainer.glade:3867 -msgid "Value" -msgstr "" - -#: glade/pytrainer.glade:3892 -msgid "" -"Stage Profile\n" -"Stage Velocity\n" -"Stage Profile/velocity" -msgstr "" - -#: glade/pytrainer.glade:3981 -msgid "Day" -msgstr "" - -#: glade/pytrainer.glade:4158 glade/pytrainer.glade:5453 -msgid "000" -msgstr "" - -#: glade/pytrainer.glade:4547 glade/pytrainer.glade:7846 -msgid " " -msgstr "" - -#: glade/pytrainer.glade:4920 -msgid " <b>Month:</b>" -msgstr "" - -#: glade/pytrainer.glade:5020 glade/pytrainer.glade:6176 -msgid "" -"Kilometers\n" -"Time\n" -"Beats\n" -"Average\n" -"Calories" -msgstr "" - -#: glade/pytrainer.glade:5065 glade/pytrainer.glade:6221 -msgid "" -"None\n" -"Kilometers\n" -"Time\n" -"Beats\n" -"Average\n" -"Calories" -msgstr "" - -#: glade/pytrainer.glade:5135 -msgid "Month" -msgstr "" - -#: glade/pytrainer.glade:6076 -msgid " <b>Year:</b>" -msgstr "" - -#: glade/pytrainer.glade:6291 -msgid "Year" -msgstr "" - -#: glade/pytrainer.glade:6334 -msgid "label154" -msgstr "" - -#: glade/pytrainer.glade:6371 -msgid "<b>Title:</b>" -msgstr "" - -#: glade/pytrainer.glade:6416 -msgid "Search" -msgstr "" - -#: glade/pytrainer.glade:6463 -msgid "Columns" -msgstr "" - -#: glade/pytrainer.glade:6538 -msgid "label155" -msgstr "" - -#: glade/pytrainer.glade:6672 -msgid "Type:" -msgstr "" - -#: glade/pytrainer.glade:6700 -msgid "" -"Font\n" -"Restaurant\n" -"Scenic Area\n" -"Summit" -msgstr "" - -#: glade/pytrainer.glade:6721 -msgid "Latitude: " -msgstr "" - -#: glade/pytrainer.glade:6749 -msgid " Name:" -msgstr "" - -#: glade/pytrainer.glade:6777 -msgid "Longitude:" -msgstr "" - -#: glade/pytrainer.glade:6805 glade/pytrainer.glade:12486 -#: glade/pytrainer.glade:12809 -msgid "Description:" -msgstr "" - -#: glade/pytrainer.glade:6925 -msgid "<b> Waypoint: </b>" -msgstr "" - -#: glade/pytrainer.glade:7058 -msgid "label162" -msgstr "" - -#: glade/pytrainer.glade:7198 -msgid "label163" -msgstr "" - -#: glade/pytrainer.glade:7223 -msgid "New Entry" -msgstr "" - -#: glade/pytrainer.glade:7296 -msgid "Title:" -msgstr "" - -#: glade/pytrainer.glade:7345 -msgid "GPX File:" -msgstr "" - -#: glade/pytrainer.glade:7415 -msgid "Calculate Values" -msgstr "" - -#: glade/pytrainer.glade:7434 -msgid "Sport:" -msgstr "" - -#: glade/pytrainer.glade:7485 -msgid "<b>Main</b>" -msgstr "" - -#: glade/pytrainer.glade:7546 -msgid "Distance (Km):" -msgstr "" - -#: glade/pytrainer.glade:7575 glade/pytrainer.glade:7772 -#: glade/pytrainer.glade:8053 glade/pytrainer.glade:8299 -#: glade/pytrainer.glade:8767 glade/pytrainer.glade:11515 -msgid "Calculate" -msgstr "" - -#: glade/pytrainer.glade:7594 -msgid "Time:" -msgstr "" - -#: glade/pytrainer.glade:7792 -msgid "Date:" -msgstr "" - -#: glade/pytrainer.glade:7912 glade/pytrainer.glade:11565 -msgid "<b>General</b>" -msgstr "" - -#: glade/pytrainer.glade:7973 -msgid "Max (km/h):" -msgstr "" - -#: glade/pytrainer.glade:8024 -msgid "Velocity (km/h)" -msgstr "" - -#: glade/pytrainer.glade:8099 -msgid "<b>Velocity</b>" -msgstr "" - -#: glade/pytrainer.glade:8135 -msgid "Quick Entry" -msgstr "" - -#: glade/pytrainer.glade:8195 -msgid "Max (min/km):" -msgstr "" - -#: glade/pytrainer.glade:8247 -msgid "Pace (min/km):" -msgstr "" - -#: glade/pytrainer.glade:8322 -msgid "<b>Pace</b>" -msgstr "" - -#: glade/pytrainer.glade:8383 -msgid "Ascent:" -msgstr "" - -#: glade/pytrainer.glade:8435 -msgid "Descent:" -msgstr "" - -#: glade/pytrainer.glade:8490 -msgid "<b>Accumulated Altitude Change</b>" -msgstr "" - -#: glade/pytrainer.glade:8551 -msgid "Max (bpm):" -msgstr "" - -#: glade/pytrainer.glade:8580 -msgid "Heart rate:" -msgstr "" - -#: glade/pytrainer.glade:8654 pytrainer/gui/windowmain.py:475 -#: pytrainer/monthgraph.py:77 -msgid "Calories" -msgstr "" - -#: glade/pytrainer.glade:8705 -msgid "" -"<small><b>Note:</b> In order to calculate the calories you must set the " -"sport MET (in Preferences->Sport) </small>" -msgstr "" - -#: glade/pytrainer.glade:8822 -msgid "<b>Heart Rate</b>" -msgstr "" - -#: glade/pytrainer.glade:8858 -msgid "Advanced" -msgstr "" - -#: glade/pytrainer.glade:8955 -msgid "<b>Comments</b>" -msgstr "" - -#: glade/pytrainer.glade:8984 -msgid "Comments" -msgstr "" - -#: glade/pytrainer.glade:9089 -msgid "Preferences" -msgstr "" - -#: glade/pytrainer.glade:9163 -msgid "Metric system" -msgstr "" - -#: glade/pytrainer.glade:9185 -msgid "U.S. customary units" -msgstr "" - -#: glade/pytrainer.glade:9211 -msgid "<b>System of Measurement</b>" -msgstr "" - -#: glad... [truncated message content] |
From: <dg...@us...> - 2010-01-08 18:58:15
|
Revision: 473 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=473&view=rev Author: dgranda Date: 2010-01-08 18:58:09 +0000 (Fri, 08 Jan 2010) Log Message: ----------- Changed files to make clearer localization process Modified Paths: -------------- pytrainer/trunk/locale/ca/LC_MESSAGES/Makefile pytrainer/trunk/locale/cs/LC_MESSAGES/Makefile pytrainer/trunk/locale/da/LC_MESSAGES/Makefile pytrainer/trunk/locale/de/LC_MESSAGES/Makefile pytrainer/trunk/locale/es/LC_MESSAGES/Makefile pytrainer/trunk/locale/eu/LC_MESSAGES/Makefile pytrainer/trunk/locale/fr/LC_MESSAGES/Makefile pytrainer/trunk/locale/no/LC_MESSAGES/Makefile pytrainer/trunk/locale/pl/LC_MESSAGES/Makefile pytrainer/trunk/locale/ru/LC_MESSAGES/Makefile pytrainer/trunk/setup.py pytrainer/trunk/utils/translator.sh Modified: pytrainer/trunk/locale/ca/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/ca/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/ca/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_ca.po -o ./pytrainer.mo merge: - msgmerge pytrainer_ca.po pytrainer_ca.pot > pytrainer_ca.po.tmp + msgmerge pytrainer_ca.po pytrainer_ca.po_new > pytrainer_ca.po.tmp mv pytrainer_ca.po.tmp pytrainer_ca.po - + rm pytrainer_ca.po_new Modified: pytrainer/trunk/locale/cs/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/cs/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/cs/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_cs.po -o ./pytrainer.mo merge: - msgmerge pytrainer_cs.po pytrainer_cs.pot > pytrainer_cs.po.tmp + msgmerge pytrainer_cs.po pytrainer_cs.po_new > pytrainer_cs.po.tmp mv pytrainer_cs.po.tmp pytrainer_cs.po - + rm pytrainer_cs.po_new Modified: pytrainer/trunk/locale/da/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/da/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/da/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_dk.po -o ./pytrainer.mo merge: - msgmerge pytrainer_dk.po pytrainer_dk.pot > pytrainer_dk.po.tmp + msgmerge pytrainer_dk.po pytrainer_dk.po_new > pytrainer_dk.po.tmp mv pytrainer_de.pk.tmp pytrainer_dk.po - + rm pytrainer_dk.po_new Modified: pytrainer/trunk/locale/de/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/de/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/de/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_de.po -o ./pytrainer.mo merge: - msgmerge pytrainer_de.po pytrainer_de.pot > pytrainer_de.po.tmp + msgmerge pytrainer_de.po pytrainer_de.po_new > pytrainer_de.po.tmp mv pytrainer_de.po.tmp pytrainer_de.po - + rm pytrainer_de.po_new Modified: pytrainer/trunk/locale/es/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/es/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,7 @@ msgfmt pytrainer_es.po -o ./pytrainer.mo merge: - msgmerge pytrainer_es.po pytrainer_es.pot > pytrainer_es.po.tmp + msgmerge pytrainer_es.po pytrainer_es.po_new > pytrainer_es.po.tmp mv pytrainer_es.po.tmp pytrainer_es.po + rm pytrainer_es.po_new Modified: pytrainer/trunk/locale/eu/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/eu/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/eu/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_eu.po -o ./pytrainer.mo merge: - msgmerge pytrainer_eu.po pytrainer_eu.pot > pytrainer_eu.po.tmp + msgmerge pytrainer_eu.po pytrainer_eu.po_new > pytrainer_eu.po.tmp mv pytrainer_eu.po.tmp pytrainer_eu.po - + rm pytrainer_eu.po_new Modified: pytrainer/trunk/locale/fr/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/fr/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/fr/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_fr.po -o ./pytrainer.mo merge: - msgmerge pytrainer_fr.po pytrainer_fr.pot > pytrainer_fr.po.tmp + msgmerge pytrainer_fr.po pytrainer_fr.po_new > pytrainer_fr.po.tmp mv pytrainer_fr.po.tmp pytrainer_fr.po - + rm pytrainer_fr.po_new Modified: pytrainer/trunk/locale/no/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/no/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/no/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_no.po -o ./pytrainer.mo merge: - msgmerge pytrainer_no.po pytrainer_no.pot > pytrainer_no.po.tmp + msgmerge pytrainer_no.po pytrainer_no.po_new > pytrainer_no.po.tmp mv pytrainer_no.po.tmp pytrainer_no.po - + rm pytrainer_no.po_new Modified: pytrainer/trunk/locale/pl/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/pl/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/pl/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_pl.po -o ./pytrainer.mo merge: - msgmerge pytrainer_pl.po pytrainer_pl.pot > pytrainer_pl.po.tmp + msgmerge pytrainer_pl.po pytrainer_pl.po_new > pytrainer_pl.po.tmp mv pytrainer_pl.po.tmp pytrainer_pl.po - + rm pytrainer_pl.po_new Modified: pytrainer/trunk/locale/ru/LC_MESSAGES/Makefile =================================================================== --- pytrainer/trunk/locale/ru/LC_MESSAGES/Makefile 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/locale/ru/LC_MESSAGES/Makefile 2010-01-08 18:58:09 UTC (rev 473) @@ -2,6 +2,6 @@ msgfmt pytrainer_ru.po -o ./pytrainer.mo merge: - msgmerge pytrainer_ru.po pytrainer_ru.pot > pytrainer_ru.po.tmp + msgmerge pytrainer_ru.po pytrainer_ru.po_new > pytrainer_ru.po.tmp mv pytrainer_ru.po.tmp pytrainer_ru.po - + rm pytrainer_ru.po_new Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/setup.py 2010-01-08 18:58:09 UTC (rev 473) @@ -42,14 +42,16 @@ install_plugin("garmintools"), install_plugin("garmintools_full"), install_extension("wordpress"), + (install_locale("ca")), + (install_locale("cs")), + (install_locale("da")), + (install_locale("de")), (install_locale("es")), - (install_locale("ca")), + (install_locale("eu")), (install_locale("fr")), - (install_locale("de")), - (install_locale("da")), + (install_locale("no")), (install_locale("pl")), - (install_locale("no")), - (install_locale("cs")), + (install_locale("ru")), ('share/pixmaps/',['pytrainer.png']), ('share/applications/',['pytrainer.desktop']) ], Modified: pytrainer/trunk/utils/translator.sh =================================================================== --- pytrainer/trunk/utils/translator.sh 2010-01-08 18:43:31 UTC (rev 472) +++ pytrainer/trunk/utils/translator.sh 2010-01-08 18:58:09 UTC (rev 473) @@ -8,15 +8,22 @@ cd ../ +# Extract translatable strings from input files xgettext glade/pytrainer.glade -o ./messages.pot -if [ $? != 0 ]; then echo "WARNNING: xgettext not found. Please, install gettext package"; exit; fi +if [ $? != 0 ]; then echo "WARNING: xgettext not found. Please install gettext package"; exit; fi find ./ -iname "*.py" -exec xgettext -k_ -j -o ./messages.pot ./pytrainer/main.py {} \; -msginit -i ./messages.pot -l $LANGUAGE -o ./locale/$LANGUAGE/LC_MESSAGES/pytrainer_$LANGUAGE.pot +# Initializing translations for desired language +msginit -i ./messages.pot -l $LANGUAGE -o ./locale/$LANGUAGE/LC_MESSAGES/pytrainer_$LANGUAGE.po_new +rm ./messages.pot cd ./locale/$LANGUAGE/LC_MESSAGES/ +# Merging old po file with the one generated as a result of current script make merge + +# Editing our new gettext catalog (.po file) $SOFTWARE pytrainer_$LANGUAGE.po -if [ $? != 0 ]; then echo "WARNNING: $SOFTWARE not found"; exit ; fi +if [ $? != 0 ]; then echo "WARNING: $SOFTWARE not found"; exit ; fi + +# Compiling our new message catalog into binary files ready for distribution make - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-16 22:14:45
|
Revision: 476 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=476&view=rev Author: jblance Date: 2010-01-16 22:14:16 +0000 (Sat, 16 Jan 2010) Log Message: ----------- Minor tweaks to unified import Modified Paths: -------------- pytrainer/trunk/glade/importdata.glade pytrainer/trunk/import/tool_gant.py pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/importdata.glade =================================================================== --- pytrainer/trunk/glade/importdata.glade 2010-01-16 16:26:48 UTC (rev 475) +++ pytrainer/trunk/glade/importdata.glade 2010-01-16 22:14:16 UTC (rev 476) @@ -22,10 +22,47 @@ <property name="visible">True</property> <property name="orientation">vertical</property> <child> - <widget class="GtkFrame" id="frameImportFromDevice"> + <widget class="GtkFrame" id="frameDeviceSelect"> <property name="visible">True</property> <property name="label_xalign">0</property> + <property name="shadow_type">none</property> <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkComboBox" id="comboboxDevice"> + <property name="visible">True</property> + <property name="active">0</property> + <property name="items" translatable="yes">Test 1 +Test 2</property> + <signal name="changed" handler="on_comboboxDevice_changed"/> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelSelectDevice"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Select your GPS device</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkFrame" id="frameImportFromDevice"> + <property name="label_xalign">0</property> + <child> <widget class="GtkAlignment" id="alignment1"> <property name="visible">True</property> <property name="left_padding">12</property> @@ -53,7 +90,8 @@ </child> </widget> <packing> - <property name="position">1</property> + <property name="pack_type">end</property> + <property name="position">2</property> </packing> </child> <child> @@ -71,7 +109,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="padding">10</property> + <property name="padding">5</property> <property name="pack_type">end</property> <property name="position">1</property> </packing> @@ -88,6 +126,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="padding">5</property> <property name="pack_type">end</property> <property name="position">0</property> </packing> @@ -97,7 +136,7 @@ <property name="expand">False</property> <property name="fill">False</property> <property name="pack_type">end</property> - <property name="position">2</property> + <property name="position">1</property> </packing> </child> <child> @@ -247,7 +286,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="padding">10</property> + <property name="padding">5</property> <property name="pack_type">end</property> <property name="position">1</property> </packing> @@ -264,6 +303,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="padding">5</property> <property name="pack_type">end</property> <property name="position">0</property> </packing> @@ -393,6 +433,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="padding">5</property> <property name="pack_type">end</property> <property name="position">2</property> </packing> @@ -408,7 +449,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="padding">10</property> + <property name="padding">5</property> <property name="pack_type">end</property> <property name="position">1</property> </packing> @@ -425,6 +466,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="padding">5</property> <property name="pack_type">end</property> <property name="position">0</property> </packing> Modified: pytrainer/trunk/import/tool_gant.py =================================================================== --- pytrainer/trunk/import/tool_gant.py 2010-01-16 16:26:48 UTC (rev 475) +++ pytrainer/trunk/import/tool_gant.py 2010-01-16 22:14:16 UTC (rev 476) @@ -38,6 +38,12 @@ return _("Gant") def getVersion(self): + outstatus = commands.getstatusoutput('which gant') + if outstatus[0] == 0: #Found gant in path + path = outstatus[1] + return path + else: + return None return None def getSourceLocation(self): Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-16 16:26:48 UTC (rev 475) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-16 22:14:16 UTC (rev 476) @@ -34,7 +34,6 @@ self.configuration = config self.store = None self.processClass = None - self.toolsDetected = False #SimpleGladeApp.__init__(self, data_path+glade_path, root, domain) def run(self): @@ -70,14 +69,7 @@ return context_id def init_gpsdevice_tab(self): - #Only detect tools once (or if requested) - if not self.toolsDetected: - #Remove all components in vbox - in case of re-detection - for child in self.vboxImportTools.get_children(): - print "removing ", child - self.vboxImportTools.remove(child) - self.detect_tools() - self.toolsDetected = True + return def init_file_tab(self): @@ -111,6 +103,10 @@ """ logging.debug('>>') self.updateStatusbar(self.statusbarDevice, "Checking for tools") + #Remove all components in vbox - in case of re-detection + for child in self.vboxImportTools.get_children(): + print "removing ", child + self.vboxImportTools.remove(child) #Get import tool_* files fileList = glob.glob(self.data_path+"import/tool_*.py") for toolFile in fileList: @@ -134,6 +130,7 @@ version.set_alignment(0,0) if toolClass.deviceExists(): deviceExists = gtk.Label(_("GPS device found") ) + deviceExists.set_alignment(0,0) else: deviceExists = gtk.Label(_("GPS device <b>not</b> found")) deviceExists.set_alignment(0,0) @@ -420,5 +417,7 @@ self.close_window() def on_buttonDeviceToolRescan_clicked(self, widget): - self.toolsDetected = False - self.init_gpsdevice_tab() + self.detect_tools() + + def on_comboboxDevice_changed(self, widget): + self.detect_tools() Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-16 16:26:48 UTC (rev 475) +++ pytrainer/trunk/pytrainer/main.py 2010-01-16 22:14:16 UTC (rev 476) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#475" + self.version ="1.7.0_svn#476" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-16 22:58:01
|
Revision: 477 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=477&view=rev Author: jblance Date: 2010-01-16 22:57:55 +0000 (Sat, 16 Jan 2010) Log Message: ----------- Make gmaps3 default, change option to allow v2 api to be used, minor tidy up of some googlemaps lap display Modified Paths: -------------- pytrainer/trunk/import/translate_garmintcxv2.xsl pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/import/translate_garmintcxv2.xsl =================================================================== --- pytrainer/trunk/import/translate_garmintcxv2.xsl 2010-01-16 22:14:16 UTC (rev 476) +++ pytrainer/trunk/import/translate_garmintcxv2.xsl 2010-01-16 22:57:55 UTC (rev 477) @@ -67,8 +67,8 @@ </xsl:variable> <gpxdata:lap><xsl:value-of select="$newline"/> <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> - <xsl:variable name="stlat"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LatitudeDegrees"/></xsl:variable> - <xsl:variable name="stlon"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LongitudeDegrees"/></xsl:variable> + <xsl:variable name="stlat"><xsl:value-of select="t:Track/t:Trackpoint/t:Position[1]/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="t:Track/t:Trackpoint/t:Position[1]/t:LongitudeDegrees"/></xsl:variable> <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> <xsl:variable name="cnt"><xsl:value-of select="count(t:Track/t:Trackpoint/t:Position)-1"/></xsl:variable> <xsl:variable name="endlat"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LatitudeDegrees"/></xsl:variable> Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-01-16 22:14:16 UTC (rev 476) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-01-16 22:57:55 UTC (rev 477) @@ -199,10 +199,23 @@ elapsedTimeHours = int(elapsedTime/3600) elapsedTimeMins = int((elapsedTime - (elapsedTimeHours * 3600)) / 60) elapsedTimeSecs = elapsedTime - (elapsedTimeHours * 3600) - (elapsedTimeMins * 60) - strElapsedTime = "%0.0dh:%0.2dm:%0.2fs" % (elapsedTimeHours, elapsedTimeMins, elapsedTimeSecs) - content += "var lap%dmarker = new google.maps.Marker({position: new google.maps.LatLng(%f, %f), icon: lapimage, map: map, title:\"Lap%d\"}); \n " % (lapNumber, float(lap[1]), float(lap[2]), lapNumber) - content += "var lap%d = new google.maps.InfoWindow({content: \"<div class='info_content'>End of lap:%s<br>Elapsed time:%s<br>Distance:%0.2f km<br>Calories:%s</div>\" });\n" % (lapNumber, lapNumber, strElapsedTime, float(lap[4])/1000, lap[3]) - content += "google.maps.event.addListener(lap%dmarker, 'click', function() { lap%d.open(map,lap%dmarker); });\n" % (lapNumber,lapNumber,lapNumber) + if elapsedTimeHours > 0: + strElapsedTime = "%0.0dh:%0.2dm:%0.2fs" % (elapsedTimeHours, elapsedTimeMins, elapsedTimeSecs) + elif elapsedTimeMins > 0: + strElapsedTime = "%0.0dm:%0.2fs" % (elapsedTimeMins, elapsedTimeSecs) + else: + strElapsedTime = "%0.0fs" % (elapsedTimeSecs) + #process lat and lon for this lap + try: + lapLat = float(lap[1]) + lapLon = float(lap[2]) + content += "var lap%dmarker = new google.maps.Marker({position: new google.maps.LatLng(%f, %f), icon: lapimage, map: map, title:\"Lap%d\"}); \n " % (lapNumber, lapLat, lapLon, lapNumber) + content += "var lap%d = new google.maps.InfoWindow({content: \"<div class='info_content'>End of lap:%s<br>Elapsed time:%s<br>Distance:%0.2f km<br>Calories:%s</div>\" });\n" % (lapNumber, lapNumber, strElapsedTime, float(lap[4])/1000, lap[3]) + content += "google.maps.event.addListener(lap%dmarker, 'click', function() { lap%d.open(map,lap%dmarker); });\n" % (lapNumber,lapNumber,lapNumber) + except: + #Error processing lap lat or lon + #dont show this lap + print "Error processing lap "+ str(lapNumber) + " (lat,lon) ( " + str(lap[1]) + "," +str (lap[2]) + ")" content += ''' Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-16 22:14:16 UTC (rev 476) +++ pytrainer/trunk/pytrainer/main.py 2010-01-16 22:57:55 UTC (rev 477) @@ -75,13 +75,13 @@ For more help on valid options try: %prog -h """ parser = OptionParser(usage=usage) -parser.set_defaults(log_level=logging.ERROR, validate=False, gm3=False, testimport=False) +parser.set_defaults(log_level=logging.ERROR, validate=False, gm3=True, testimport=False) parser.add_option("-d", "--debug", action="store_const", const=logging.DEBUG, dest="log_level", help="enable logging at debug level") parser.add_option("-i", "--info", action="store_const", const=logging.INFO, dest="log_level", help="enable logging at info level") parser.add_option("-w", "--warn", action="store_const", const=logging.WARNING, dest="log_level", help="enable logging at warning level") parser.add_option("--valid", action="store_true", dest="validate", help="enable validation of files imported by plugins (details at info or debug logging level) - note plugin must support validation") parser.add_option("--check", action="store_true", dest="check", help="triggers database (only sqlite based) and configuration file sanity checks, adding fields if necessary. Backup of database is done before any change. Details at info or debug logging level") -parser.add_option("--gmaps3", action="store_true", dest="gm3", help="EXPERIMENTAL: use Google Maps API version3 (currently slower than version 2, but includes some new functionality)") +parser.add_option("--gmaps2", action="store_false", dest="gm3", help="Use old Google Maps API version (v2)") parser.add_option("--testimport", action="store_true", dest="testimport", help="EXPERIMENTAL: show new import functionality - for testing only USE AT YOUR OWN RISK") (options, args) = parser.parse_args() log_level = options.log_level This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |