You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
(1) |
Mar
(15) |
Apr
(20) |
May
(2) |
Jun
(9) |
Jul
(3) |
Aug
(2) |
Sep
(17) |
Oct
(16) |
Nov
(38) |
Dec
(40) |
2010 |
Jan
(51) |
Feb
(11) |
Mar
(24) |
Apr
(31) |
May
(24) |
Jun
(3) |
Jul
(9) |
Aug
(1) |
Sep
(29) |
Oct
(33) |
Nov
(81) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(4) |
Mar
(13) |
Apr
(4) |
May
(24) |
Jun
(4) |
Jul
(19) |
Aug
(46) |
Sep
(10) |
Oct
(28) |
Nov
(31) |
Dec
|
From: <jb...@us...> - 2010-04-16 10:19:08
|
Revision: 568 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=568&view=rev Author: jblance Date: 2010-04-16 10:19:00 +0000 (Fri, 16 Apr 2010) Log Message: ----------- More fixes after move to global varibles Modified Paths: -------------- pytrainer/trunk/pytrainer/extension.py pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/heartrategraph.py pytrainer/trunk/pytrainer/importdata.py pytrainer/trunk/pytrainer/lib/ddbb.py pytrainer/trunk/pytrainer/lib/heartrate.py pytrainer/trunk/pytrainer/lib/webUtils.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/plugins.py pytrainer/trunk/pytrainer/profile.py pytrainer/trunk/pytrainer/record.py pytrainer/trunk/pytrainer/waypoint.py Removed Paths: ------------- pytrainer/trunk/pytrainer/lib/soapUtils.py Modified: pytrainer/trunk/pytrainer/extension.py =================================================================== --- pytrainer/trunk/pytrainer/extension.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/extension.py 2010-04-16 10:19:00 UTC (rev 568) @@ -20,14 +20,12 @@ import logging from lib.xmlUtils import XMLParser -#from lib.system import checkConf from gui.windowextensions import WindowExtensions class Extension: def __init__(self, data_path = None, parent = None): self.data_path=data_path - #self.conf = checkConf() self.parent = parent self.pytrainer_main = parent @@ -77,7 +75,7 @@ def getExtensionConfParams(self,pathExtension): info = XMLParser(pathExtension+"/conf.xml") code = info.getValue("pytrainer-extension","extensioncode") - extensiondir = self.conf.getValue("extensiondir") + extensiondir = self.pytrainer_main.profile.extensiondir params = {} if not os.path.isfile(extensiondir+"/"+code+"/conf.xml"): prefs = info.getAllValues("conf-values") @@ -96,7 +94,7 @@ def setExtensionConfParams(self,pathExtension,savedOptions): info = XMLParser(pathExtension+"/conf.xml") code = info.getValue("pytrainer-extension","extensioncode") - extensiondir = self.conf.getValue("extensiondir")+"/"+code + extensiondir = self.pytrainer_main.profile.extensiondir+"/"+code if not os.path.isdir(extensiondir): os.mkdir(extensiondir) if not os.path.isfile(extensiondir+"/conf.xml"): @@ -114,7 +112,7 @@ def getCodeConfValue(self,code,value): - extensiondir = self.conf.getValue("extensiondir") + extensiondir = self.pytrainer_main.profile.extensiondir info = XMLParser(extensiondir+"/"+code+"/conf.xml") return info.getValue("pytrainer-extension",value) @@ -135,26 +133,4 @@ module = __import__(extension_filename) extensionMain = getattr(module, extension_classname) logging.debug('<<') - return extensionMain(parent=self, pytrainer_main=self.parent, conf_dir=self.conf.getValue("confdir"), options=options) - - #def runExtension(self,pathExtension,id): - #info = XMLParser(pathExtension+"/conf.xml") - #bin = info.getValue("pytrainer-extension","executable") - #extensiontype = info.getValue("pytrainer-extension","type") - #binnary = pathExtension+"/"+bin - #params = "" - #for opt in self.getExtensionConfParams(pathExtension): - # if opt[0]!="status" and opt[1]!="": - # params += "--%s %s " %(opt[0],opt[1]) - #if extensiontype=="record": - # params += "--gpxfile %s/gpx/%s.gpx " %(self.conf.getValue("confdir"),id) - # params += "--idrecord %s " %id - #bin = info.getValue("pytrainer-extension","executable") - #print params - #alert = os.popen("%s %s" %(binnary,params)).read() - - #from gui.warning import Warning - #warning = Warning(self.data_path) - # warning.set_text(alert) - # warning.run() - + return extensionMain(parent=self, pytrainer_main=self.parent, conf_dir=self.pytrainer_main.profile.confdir, options=options) Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-04-16 10:19:00 UTC (rev 568) @@ -21,7 +21,6 @@ import re import logging -#from pytrainer.lib.system import checkConf from pytrainer.lib.gpx import Gpx import pytrainer.lib.points as Points from pytrainer.lib.fileUtils import fileUtils Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-16 10:19:00 UTC (rev 568) @@ -29,7 +29,6 @@ from aboutdialog import About from pytrainer.lib.date import Date -#from pytrainer.lib.system import checkConf from pytrainer.lib.xmlUtils import XMLParser from pytrainer.lib.gpx import Gpx from pytrainer.lib.unitsconversor import * @@ -75,7 +74,6 @@ #create the columns for the waypoints treeview column_names=[_("id"),_("Waypoint")] self.create_treeview(self.waypointTreeView,column_names) - #conf = checkConf() self.fileconf = self.pytrainer_main.profile.confdir+"/listviewmenu.xml" if not os.path.isfile(self.fileconf): self._createXmlListView(self.fileconf) Modified: pytrainer/trunk/pytrainer/heartrategraph.py =================================================================== --- pytrainer/trunk/pytrainer/heartrategraph.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/heartrategraph.py 2010-04-16 10:19:00 UTC (rev 568) @@ -17,8 +17,6 @@ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. from gui.drawArea import DrawArea -from lib.system import checkConf -from lib.xmlUtils import XMLParser from lib.heartrate import * import logging @@ -56,4 +54,3 @@ return float(value) except: return float(0) - Modified: pytrainer/trunk/pytrainer/importdata.py =================================================================== --- pytrainer/trunk/pytrainer/importdata.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/importdata.py 2010-04-16 10:19:00 UTC (rev 568) @@ -18,9 +18,6 @@ import os -#from lib.xmlUtils import XMLParser -#from lib.system import checkConf - from gui.windowimportdata import WindowImportdata class Importdata: @@ -28,7 +25,6 @@ self.data_path=data_path self.parent = parent self.pytrainer_main = parent - #self.conf = checkConf() self.configuration = config def runImportdata(self): Modified: pytrainer/trunk/pytrainer/lib/ddbb.py =================================================================== --- pytrainer/trunk/pytrainer/lib/ddbb.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/lib/ddbb.py 2010-04-16 10:19:00 UTC (rev 568) @@ -22,7 +22,6 @@ import logging import traceback import commands, os -#from system import checkConf from pytrainer.lib.date import Date class DDBB: @@ -35,7 +34,6 @@ else: from sqliteUtils import Sql - #self.conf = checkConf() self.confdir = configuration.confdir self.ddbb_path = "%s/pytrainer.ddbb" %self.confdir Modified: pytrainer/trunk/pytrainer/lib/heartrate.py =================================================================== --- pytrainer/trunk/pytrainer/lib/heartrate.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/lib/heartrate.py 2010-04-16 10:19:00 UTC (rev 568) @@ -16,12 +16,7 @@ #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -from xmlUtils import XMLParser - def getZones(pytrainer_main=None): - #conf = checkConf() - #filename = conf.getValue("conffile") - #configuration = XMLParser(filename) maxhr = int(pytrainer_main.profile.getValue("pytraining","prf_maxhr")) resthr = int(pytrainer_main.profile.getValue("pytraining","prf_minhr")) Deleted: pytrainer/trunk/pytrainer/lib/soapUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/soapUtils.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/lib/soapUtils.py 2010-04-16 10:19:00 UTC (rev 568) @@ -1,149 +0,0 @@ -# -*- coding: iso-8859-1 -*- - -#Copyright (C) Fiz Vazquez vu...@si... -# vu...@gr... -# Jakinbidea & Grupo Ikusnet Developer - -#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 SOAPpy -from pytrainer.lib.ddbb import DDBB -from pytrainer.lib.xmlUtils import XMLParser -from pytrainer.lib.system import checkConf - -from threading import Thread - -class webService(Thread): - def __init__(self,data_path=None,onchangeAction = None,insertNewRecord=None): - system = checkConf() - self.data_path = data_path - self.conffile = "%s/conf.xml" %system.getValue("confdir") - self.server = SOAPpy.ThreadingSOAPServer(("localhost", 8081)) - #self.server = SOAPpy.server.InsecureServer(("localhost", 8081)) - self.server.registerFunction(self.getRecordInfo) - self.server.registerFunction(self.addWaypoint) - self.server.registerFunction(self.updateWaypoint) - self.server.registerFunction(self.getWaypoints) - self.server.registerFunction(self.test) - self.server.registerFunction(self.newRecord) - self.onchangeAction = onchangeAction - self.insertNewRecord = insertNewRecord - Thread.__init__ ( self ) - - def getRecordInfo(self,id_record): - configuration = XMLParser(self.conffile) - ddbb = DDBB(configuration) - ddbb.connect() - recordinfo = ddbb.select("records,sports", - "sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats", - "id_record=\"%s\" and records.sport=sports.id_sports" %id_record) - record = recordinfo[0] - info = {} - info["sport"] = record[0] - info["date"] = record[1] - info["distance"] = record[2] - info["time"] = record[3] - info["beats"] = record[4] - info["comments"] = record[5] - info["average"] = record[6] - info["calories"] = record[7] - info["title"] = record[9] - info["upositive"] = record[10] - info["unegative"] = record[11] - info["maxspeed"] = record[12] - info["maxpace"] = record[13] - info["pace"] = record[14] - info["maxbeats"] = record[15] - return info - - def newRecord(self,title=None,distance=None,time=None,upositive=None, unegative=None, bpm=None,calories=None, date=None, comment=None): - #self.insertNewRecord(title,distance,time,upositive,unegative,bpm,calories,date,comment) - #Pasar de la ventana. - #meter el registro en la bbdd y reiniciar la interfaz - from pytrainer.lib.ddbb import DDBB - from pytrainer.lib.xmlUtils import XMLParser - from pytrainer.lib.system import checkConf - conf = checkConf() - filename = conf.getValue("conffile") - configuration = XMLParser(filename) - ddbb = DDBB(configuration) - ddbb.connect() - cells= "date,sport,distance,time,beats,comments,average,calories,title,upositive,unegative" - values=[date,1,distance,time,bpm,comment,float(distance)/(float(time)/3600),calories,title,upositive,unegative] - ddbb.insert("records",cells,values) - return ddbb.lastRecord("records") - - def addWaypoint(self,lon=None,lat=None,name=None,comment=None,sym=None): - configuration = XMLParser(self.conffile) - ddbb = DDBB(configuration) - ddbb.connect() - cells = "lat,lon,comment,name,sym" - values = (lat,lon,comment,name,sym) - ddbb.insert("waypoints",cells,values) - self.onchangeAction(False,0) - return ddbb.lastRecord("waypoints") - - def getWaypoints(self): - configuration = XMLParser(self.conffile) - ddbb = DDBB(configuration) - ddbb.connect() - cells = "lat,lon,comment,name,sym" - return ddbb.select("waypoints","lat,lon,ele,comment,time,name,sym","1=1 order by name") - - def updateWaypoint(self,lon=None,lat=None,name=None,comment=None,sym=None,id_waypoint=None): - if id_waypoint==None: - return "NACK" - c = [] - v = [] - values = [] - if lat: - c.append("lat") - values.append(lat) - if lon: - c.append("lon") - values.append(lon) - if comment: - c.append("comment") - values.append(comment) - if sym: - c.append("sym") - values.append("sym") - cells = "" - count=0 - for i in c: - if count==1: - cells +="," - cells += "%s"%i - count=1 - - configuration = XMLParser(self.conffile) - ddbb = DDBB(configuration) - ddbb.connect() - ddbb.update("waypoints",cells,values," id_waypoint=%d" %int(id_waypoint)) - self.onchangeAction(False,0) - return "ACK" - - def test(self,lon=None,lat=None): - print "Llamando al soap" - return "Hello world!" - - def run(self): - self.server.serve_forever() - - def stop(self): - self._Thread__stop() - self.server.server_close() - - Modified: pytrainer/trunk/pytrainer/lib/webUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/webUtils.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/lib/webUtils.py 2010-04-16 10:19:00 UTC (rev 568) @@ -16,36 +16,9 @@ #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from threading import Thread -from pytrainer.lib.system import checkConf import webbrowser -class MyHandler(BaseHTTPRequestHandler): - def do_GET(self): - self.conf = checkConf() - tmpdir = self.conf.getValue("tmpdir") - f = open(tmpdir+"/waypointeditor.html") - self.send_response(200) - self.send_header('Content-type','text/html') - self.end_headers() - self.wfile.write(f.read()) - f.close() - print "un GET" - return - -class webServer(Thread): - def __init__(self): - self.server = HTTPServer(('localhost', 7988), MyHandler) - Thread.__init__ ( self ) - - def run(self): - #while 1==1: - self.server.serve_forever() - # print "molaaaaa" - # time.sleep(1) - #print "Iniciamos3" - def open_url_in_browser(url): """ Opens a url in the desktop's default browser Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/main.py 2010-04-16 10:19:00 UTC (rev 568) @@ -59,7 +59,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#567" + self.version ="1.7.2_svn#568" self.DB_version = 3 #Process command line options self.startup_options = self.get_options() Modified: pytrainer/trunk/pytrainer/plugins.py =================================================================== --- pytrainer/trunk/pytrainer/plugins.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/plugins.py 2010-04-16 10:19:00 UTC (rev 568) @@ -21,14 +21,12 @@ import logging from lib.xmlUtils import XMLParser -#from lib.system import checkConf from gui.windowplugins import WindowPlugins class Plugins: def __init__(self, data_path = None, parent = None): self.data_path=data_path - #self.conf = checkConf() self.pytrainer_main = parent def getActivePlugins(self): Modified: pytrainer/trunk/pytrainer/profile.py =================================================================== --- pytrainer/trunk/pytrainer/profile.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/profile.py 2010-04-16 10:19:00 UTC (rev 568) @@ -20,8 +20,6 @@ import os, sys import logging -#from lib.system import checkConf -#from lib.xmlUtils import XMLParser from lxml import etree from lib.ddbb import DDBB @@ -38,7 +36,7 @@ self.gpxdir = None self.extensiondir = None self.plugindir = None - #Set configuration parameters - old system.checkConf() + #Set configuration parameters self._setHome() self._setConfFiles() self._setTempDir() Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/record.py 2010-04-16 10:19:00 UTC (rev 568) @@ -26,7 +26,6 @@ from gui.dialogselecttrack import DialogSelectTrack from lib.ddbb import DDBB from lib.xmlUtils import XMLParser -from lib.system import checkConf from lib.date import Date from lib.gpx import Gpx Modified: pytrainer/trunk/pytrainer/waypoint.py =================================================================== --- pytrainer/trunk/pytrainer/waypoint.py 2010-04-15 10:06:46 UTC (rev 567) +++ pytrainer/trunk/pytrainer/waypoint.py 2010-04-16 10:19:00 UTC (rev 568) @@ -16,10 +16,6 @@ #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -from lib.ddbb import DDBB -#from lib.system import checkConf -#from lib.xmlUtils import XMLParser - import logging class Waypoint: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-15 10:06:53
|
Revision: 567 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=567&view=rev Author: jblance Date: 2010-04-15 10:06:46 +0000 (Thu, 15 Apr 2010) Log Message: ----------- Remove negative width warning 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 2010-04-15 09:07:55 UTC (rev 566) +++ pytrainer/trunk/glade/pytrainer.glade 2010-04-15 10:06:46 UTC (rev 567) @@ -1211,15 +1211,14 @@ <property name="visible">True</property> <property name="left_padding">10</property> <child> - <widget class="GtkTable" id="tableConfig"> + <widget class="GtkTable" id="tableConfigY1"> <property name="visible">True</property> - <property name="n_rows">4</property> + <property name="n_rows">5</property> <property name="n_columns">3</property> <child> <widget class="GtkLabel" id="labelY1AxisLimits"> <property name="visible">True</property> <property name="xalign">1</property> - <property name="xpad">1</property> <property name="label" translatable="yes"><small>Limits</small></property> <property name="use_markup">True</property> </widget> @@ -1293,7 +1292,7 @@ <widget class="GtkLabel" id="labelY1LineColor"> <property name="visible">True</property> <property name="xalign">1</property> - <property name="label" translatable="yes"><small>Line Color</small></property> + <property name="label" translatable="yes"><small>Color</small></property> <property name="use_markup">True</property> </widget> <packing> @@ -1313,7 +1312,7 @@ </widget> <packing> <property name="left_attach">1</property> - <property name="right_attach">3</property> + <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options">GTK_SHRINK</property> @@ -1324,7 +1323,7 @@ <widget class="GtkLabel" id="labelY1LineWeight"> <property name="visible">True</property> <property name="xalign">1</property> - <property name="label" translatable="yes"><small>Line Weight</small></property> + <property name="label" translatable="yes"><small>Weight</small></property> <property name="use_markup">True</property> </widget> <packing> @@ -1339,12 +1338,12 @@ <property name="can_focus">True</property> <property name="max_length">2</property> <property name="invisible_char">●</property> - <property name="adjustment">1 0 10 1 1 0</property> + <property name="adjustment">1 1 10 1 1 0</property> <signal name="value_changed" handler="on_spinbuttonY1LineWeight_value_changed"/> </widget> <packing> <property name="left_attach">1</property> - <property name="right_attach">3</property> + <property name="right_attach">2</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> <property name="x_options">GTK_SHRINK</property> @@ -1352,24 +1351,68 @@ </packing> </child> <child> + <widget class="GtkLabel" id="labelY1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Y1</property> + </widget> + <packing> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelY1LineSmoothing"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Smoothing</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1LineSmoothing"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="max_length">2</property> + <property name="invisible_char">●</property> + <property name="adjustment">1 0 10 1 1 0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </widget> </child> </widget> </child> <child> - <widget class="GtkLabel" id="labelY1Axis"> - <property name="visible">True</property> - <property name="label" translatable="yes"><small>Y1 Axis</small></property> - <property name="use_markup">True</property> - </widget> + <placeholder/> <packing> <property name="type">label_item</property> </packing> </child> </widget> <packing> + <property name="expand">False</property> <property name="position">1</property> </packing> </child> @@ -1383,26 +1426,25 @@ <property name="visible">True</property> <property name="left_padding">10</property> <child> - <widget class="GtkTable" id="tableConfig1"> + <widget class="GtkTable" id="tableConfigY2"> <property name="visible">True</property> - <property name="n_rows">3</property> + <property name="n_rows">5</property> <property name="n_columns">3</property> <child> - <widget class="GtkLabel" id="labelY1AxisLimits1"> + <widget class="GtkLabel" id="labelY2AxisLimits"> <property name="visible">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="label" translatable="yes"><small>Limits</small></property> <property name="use_markup">True</property> </widget> <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="labelYMin1"> + <widget class="GtkLabel" id="labelY2Min"> <property name="visible">True</property> <property name="label" translatable="yes"><small>Min</small></property> <property name="use_markup">True</property> @@ -1414,7 +1456,7 @@ </packing> </child> <child> - <widget class="GtkLabel" id="labelYMax1"> + <widget class="GtkLabel" id="labelY2Max"> <property name="visible">True</property> <property name="label" translatable="yes"><small>Max</small></property> <property name="use_markup">True</property> @@ -1426,7 +1468,7 @@ </packing> </child> <child> - <widget class="GtkSpinButton" id="spinbuttonY1Min2"> + <widget class="GtkSpinButton" id="spinbuttonY2Min"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> @@ -1443,12 +1485,12 @@ </packing> </child> <child> - <widget class="GtkSpinButton" id="spinbuttonY1Max2"> + <widget class="GtkSpinButton" id="spinbuttonY2Max"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> <property name="width_chars">4</property> - <property name="adjustment">0 -500 1000 1 10 0</property> + <property name="adjustment">1 -500 1000 1 10 0</property> </widget> <packing> <property name="left_attach">2</property> @@ -1460,9 +1502,75 @@ </packing> </child> <child> - <placeholder/> + <widget class="GtkLabel" id="labelY2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Y2</property> + </widget> + <packing> + <property name="y_options"></property> + </packing> </child> <child> + <widget class="GtkLabel" id="labelY2LineColor"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Color</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelY2LineWeight"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Weight</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkColorButton" id="colorbuttonY2LineColor"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="xalign">0</property> + <property name="color">#000000000000</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="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY2LineWeight"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="max_length">2</property> + <property name="invisible_char">●</property> + <property name="adjustment">1 0 10 1 1 0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> <placeholder/> </child> <child> @@ -1471,23 +1579,227 @@ <child> <placeholder/> </child> + <child> + <widget class="GtkLabel" id="labelY2LineSmoothing"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Smoothing</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY2LineSmoothing"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="max_length">2</property> + <property name="invisible_char">●</property> + <property name="adjustment">1 0 10 1 1 0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> </widget> </child> </widget> </child> <child> - <widget class="GtkLabel" id="labelY2Axis"> + <placeholder/> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkFrame" id="frameXAxis"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment6"> <property name="visible">True</property> - <property name="label" translatable="yes"><small>Y2 Axis</small></property> - <property name="use_markup">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkTable" id="tableConfigX"> + <property name="visible">True</property> + <property name="n_rows">4</property> + <property name="n_columns">3</property> + <child> + <widget class="GtkLabel" id="labelX"> + <property name="visible">True</property> + <property name="label" translatable="yes">X</property> + </widget> + <packing> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelXAxisLimits"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Limits</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonXMin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 -500 1000 1 10 0</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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonXMax"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 -500 1000 1 10 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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelXMin"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Min</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelXMax"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Max</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelXAxisDistance"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Distance</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkRadioButton" id="radiobuttonDistance"> + <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="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">GTK_EXPAND</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkLabel" id="labelXAxisTime"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Time</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkRadioButton" id="radiobuttonTime"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + <property name="group">radiobuttonDistance</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_EXPAND</property> + </packing> + </child> + </widget> + </child> </widget> + </child> + <child> + <placeholder/> <packing> <property name="type">label_item</property> </packing> </child> </widget> <packing> - <property name="position">2</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">4</property> </packing> </child> <child> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-15 09:07:55 UTC (rev 566) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-15 10:06:46 UTC (rev 567) @@ -140,7 +140,7 @@ self.parent.runExtension(extension,id) def createGraphs(self,RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph): - self.drawarearecord = RecordGraph(self.record_graph_vbox, self.window1, self.record_combovalue, self.record_combovalue2, self.btnShowLaps, self.tableConfig) + self.drawarearecord = RecordGraph(self.record_graph_vbox, self.window1, self.record_combovalue, self.record_combovalue2, self.btnShowLaps, self.tableConfigY1) self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2, pytrainer_main=self.pytrainer_main) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() @@ -822,11 +822,15 @@ ## Lista de eventos ## ###################### + def on_hpaned1_move_handle(self, widget): + print "Handler" + print widget + def on_spinbuttonY1_value_changed(self, widget): y1min = self.spinbuttonY1Min.get_value() y1max = self.spinbuttonY1Max.get_value() #Check to see if the min and max have the same... - if y1min == y1max: + if y1min == y1max: if widget.get_name() == "spinbuttonY1Min": #User was changing the min spinbutton, so move max up y1max += 1 else: #Move min down Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-15 09:07:55 UTC (rev 566) +++ pytrainer/trunk/pytrainer/main.py 2010-04-15 10:06:46 UTC (rev 567) @@ -59,7 +59,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#566" + self.version ="1.7.2_svn#567" self.DB_version = 3 #Process command line options self.startup_options = self.get_options() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-15 09:08:02
|
Revision: 566 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=566&view=rev Author: jblance Date: 2010-04-15 09:07:55 +0000 (Thu, 15 Apr 2010) Log Message: ----------- More global variables fixes... 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/googleearth/main.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/plugins/garmin-gpx/garmingpx.py =================================================================== --- pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2010-04-15 08:49:07 UTC (rev 565) +++ pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2010-04-15 09:07:55 UTC (rev 566) @@ -33,7 +33,8 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.profile.tmpdir + self.pytrainer_main = parent.pytrainer_main + self.tmpdir = self.pytrainer_main.profile.tmpdir self.validate = validate self.data_path = os.path.dirname(__file__) self.sport = self.getConfValue("Force_sport_to") @@ -41,7 +42,7 @@ def getConfValue(self, confVar): info = XMLParser(self.data_path+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): value = None else: @@ -77,8 +78,8 @@ return True else: #To validate GPX as used for pytrainer must test against both Topograpfix and Cluetrust - topografixXSLfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/Topografix_gpx11.xsd" - cluetrustXSLfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/Cluetrust_gpxdata10.xsd" + topografixXSLfile = os.path.realpath(self.pytrainer_main.data_path)+ "/schemas/Topografix_gpx11.xsd" + cluetrustXSLfile = os.path.realpath(self.pytrainer_main.data_path)+ "/schemas/Cluetrust_gpxdata10.xsd" from lib.xmlValidation import xmlValidator validator = xmlValidator() return validator.validateXSL(filename, topografixXSLfile) and validator.validateXSL(filename, cluetrustXSLfile) @@ -89,7 +90,7 @@ only valid for GPX files with a single activity """ time = self.detailsFromGPX(filename) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): return True else: return False @@ -110,5 +111,3 @@ return None else: return timeElement.text - - Modified: pytrainer/trunk/plugins/garmin-hr/garminhr.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr/garminhr.py 2010-04-15 08:49:07 UTC (rev 565) +++ pytrainer/trunk/plugins/garmin-hr/garminhr.py 2010-04-15 09:07:55 UTC (rev 566) @@ -33,7 +33,8 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.profile.tmpdir + self.pytrainer_main = parent.pytrainer_main + self.tmpdir = self.pytrainer_main.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.input_dev = self.getConfValue("device") @@ -42,7 +43,7 @@ def getConfValue(self, confVar): info = XMLParser(self.data_path+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): value = None else: @@ -124,7 +125,7 @@ logging.debug("Not validating %s" % (filename) ) return True else: #Validate TCXv1, note are validating against gpsbabels 'broken' result... - xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" + xslfile = os.path.realpath(self.pytrainer_main.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" from lib.xmlValidation import xmlValidator validator = xmlValidator() return validator.validateXSL(filename, xslfile) @@ -157,7 +158,7 @@ else: time = timeElement.text #comparing date and start time (sport may have been changed in DB after import) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): logging.debug("Not importing track for time %s" % (time)) return False else: Modified: pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2010-04-15 08:49:07 UTC (rev 565) +++ pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2010-04-15 09:07:55 UTC (rev 566) @@ -37,7 +37,8 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.profile.tmpdir + self.pytrainer_main = parent.pytrainer_main + self.tmpdir = self.pytrainer_main.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.sport = self.getConfValue("Force_sport_to") @@ -45,7 +46,7 @@ def getConfValue(self, confVar): info = XMLParser(self.data_path+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): value = None else: @@ -86,7 +87,7 @@ logging.debug("Not validating %s" % (filename) ) return True else: #Validate TCXv1, note are validating against gpsbabels 'broken' result... - xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" + xslfile = os.path.realpath(self.pytrainer_main.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" from lib.xmlValidation import xmlValidator validator = xmlValidator() return validator.validateXSL(filename, xslfile) @@ -103,7 +104,7 @@ else: time = timeElement.text #comparing date and start time (sport may have been changed in DB after import) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): logging.debug("Not importing track for time %s" % (time)) return False else: @@ -132,4 +133,3 @@ transform = etree.XSLT(xslt_doc) result_tree = transform(track) result_tree.write(gpxfile, xml_declaration=True) - Modified: pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2010-04-15 08:49:07 UTC (rev 565) +++ pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2010-04-15 09:07:55 UTC (rev 566) @@ -26,7 +26,8 @@ class garminTCXv2(): def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.profile.tmpdir + self.pytrainer_main = parent.pytrainer_main + self.tmpdir = self.pytrainer_main.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.sport = self.getConfValue("Force_sport_to") @@ -34,7 +35,7 @@ def getConfValue(self, confVar): info = XMLParser(self.data_path+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): value = None else: @@ -74,7 +75,7 @@ logging.debug("Not validating %s" % (filename) ) return True else: - xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v2.xsd" + xslfile = os.path.realpath(self.pytrainer_main.data_path)+ "/schemas/GarminTrainingCenterDatabase_v2.xsd" from pytrainer.lib.xmlValidation import xmlValidator validator = xmlValidator() return validator.validateXSL(filename, xslfile) @@ -89,7 +90,7 @@ def inDatabase(self, activity): #comparing date and start time (sport may have been changed in DB after import) time = self.detailsFromTCX(activity) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): return True else: return False @@ -121,4 +122,3 @@ xml_doc = activity result_tree = transform(xml_doc) result_tree.write(gpxfile, xml_declaration=True) - Modified: pytrainer/trunk/plugins/googleearth/main.py =================================================================== --- pytrainer/trunk/plugins/googleearth/main.py 2010-04-15 08:49:07 UTC (rev 565) +++ pytrainer/trunk/plugins/googleearth/main.py 2010-04-15 09:07:55 UTC (rev 566) @@ -27,9 +27,10 @@ class googleearth(): def __init__(self, parent = None, validate=False): self.parent = parent + self.pytrainer_main = parent.pytrainer_main self.validate = validate self.data_path = os.path.dirname(__file__) - self.tmpdir = self.parent.profile.tmpdir + self.tmpdir = self.pytrainer_main.profile.tmpdir def run(self): logging.debug(">>") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-15 08:49:07 UTC (rev 565) +++ pytrainer/trunk/pytrainer/main.py 2010-04-15 09:07:55 UTC (rev 566) @@ -59,7 +59,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#565" + self.version ="1.7.2_svn#566" self.DB_version = 3 #Process command line options self.startup_options = self.get_options() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-15 08:49:17
|
Revision: 565 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=565&view=rev Author: jblance Date: 2010-04-15 08:49:07 +0000 (Thu, 15 Apr 2010) Log Message: ----------- Bug fixes for global variables, thanks to Druzee and DGranda Modified Paths: -------------- pytrainer/trunk/plugins/garmintools/garmintools.py pytrainer/trunk/plugins/garmintools_full/garmintools_full.py pytrainer/trunk/pytrainer/gui/windowprofile.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/plugins.py Removed Paths: ------------- pytrainer/trunk/pytrainer/lib/system.py Modified: pytrainer/trunk/plugins/garmintools/garmintools.py =================================================================== --- pytrainer/trunk/plugins/garmintools/garmintools.py 2010-04-14 11:11:42 UTC (rev 564) +++ pytrainer/trunk/plugins/garmintools/garmintools.py 2010-04-15 08:49:07 UTC (rev 565) @@ -31,7 +31,8 @@ class garmintools(): def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.profile.tmpdir + self.pytrainer_main = parent.pytrainer_main + self.tmpdir = self.pytrainer_main.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.sport = self.getConfValue("Force_sport_to") @@ -39,7 +40,7 @@ def getConfValue(self, confVar): info = XMLParser(self.data_path+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): value = None else: @@ -93,7 +94,7 @@ def inDatabase(self, tree): #comparing date and start time (sport may have been changed in DB after import) time = self.detailsFromFile(tree) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): return True else: return False Modified: pytrainer/trunk/plugins/garmintools_full/garmintools_full.py =================================================================== --- pytrainer/trunk/plugins/garmintools_full/garmintools_full.py 2010-04-14 11:11:42 UTC (rev 564) +++ pytrainer/trunk/plugins/garmintools_full/garmintools_full.py 2010-04-15 08:49:07 UTC (rev 565) @@ -43,8 +43,9 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.confdir = self.parent.profile.confdir - self.tmpdir = self.parent.conf.profile.tmpdir + self.pytrainer_main = parent.pytrainer_main + self.confdir = self.pytrainer_main.profile.confdir + self.tmpdir = self.pytrainer_main.profile.tmpdir # Tell garmintools where to save retrieved data from GPS device os.environ['GARMIN_SAVE_RUNS']=self.tmpdir self.data_path = os.path.dirname(__file__) @@ -64,7 +65,7 @@ def getConfValue(self, confVar): info = XMLParser(self.data_path+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): value = None else: @@ -93,7 +94,7 @@ if len(selectedFiles) > 0: logging.info("Dumping "+str(len(selectedFiles))+" binary files found") dumpFiles = self.dumpBinaries(selectedFiles) - self.listStringDBUTC = self.parent.parent.ddbb.select("records","date_time_utc") + self.listStringDBUTC = self.pytrainer_main.ddbb.select("records","date_time_utc") if self.maxGap > 0: logging.info("Starting import. Comparison will be made with "+str(self.maxGap)+" seconds interval") else: Modified: pytrainer/trunk/pytrainer/gui/windowprofile.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-14 11:11:42 UTC (rev 564) +++ pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-15 08:49:07 UTC (rev 565) @@ -31,7 +31,8 @@ self.pytrainer_main = pytrainer_main self.data_path = data_path SimpleGladeApp.__init__(self, data_path+glade_path, root, domain) - self.conf_options = [ + self.conf_options = parent.profile_options + ''''self.conf_options = [ "prf_name", "prf_gender", "prf_weight", @@ -46,7 +47,7 @@ "prf_minhr", "prf_hrzones_karvonen", "prf_us_system" - ] + ]''' def new(self): self.gender_options = { @@ -76,10 +77,13 @@ def setValues(self,list_options): - for i in self.conf_options: + for i in self.conf_options.keys(): if not list_options.has_key(i): continue - var = getattr(self,i) + try: + var = getattr(self,i) + except AttributeError as e: + continue if i != "prf_gender" and i != "prf_ddbb" and i !="prf_hrzones_karvonen" and i!="prf_us_system": var.set_text(list_options[i]) elif i == "prf_hrzones_karvonen" or i == "prf_us_system": @@ -99,18 +103,25 @@ self._ddbb_value_active() def saveOptions(self): - list_options = [] - for i in self.conf_options: - var = getattr(self,i) + list_options = {} + for i in self.conf_options.keys(): + try: + var = getattr(self,i) + except AttributeError as e: + continue if i != "prf_gender" and i != "prf_ddbb" and i != "prf_hrzones_karvonen" and i != "prf_us_system": - list_options.append((i,var.get_text())) + #list_options.append((i,var.get_text())) + list_options[i] = var.get_text() elif i == "prf_hrzones_karvonen" or i == "prf_us_system": if var.get_active(): - list_options.append((i,"True")) + #list_options.append((i,"True")) + list_options[i] = "True" else: - list_options.append((i,"False")) + #list_options.append((i,"False")) + list_options[i] = "False" else: - list_options.append((i,var.get_active_text())) + #list_options.append((i,var.get_active_text())) + list_options[i] = var.get_active_text() self.parent.setProfile(list_options) def on_calendar_clicked(self,widget): Deleted: pytrainer/trunk/pytrainer/lib/system.py =================================================================== --- pytrainer/trunk/pytrainer/lib/system.py 2010-04-14 11:11:42 UTC (rev 564) +++ pytrainer/trunk/pytrainer/lib/system.py 2010-04-15 08:49:07 UTC (rev 565) @@ -1,25 +0,0 @@ -# -*- 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 os -import sys - -class checkConf: - def __init__(self): - print "ERROR system.py not used anymore" - raise Exception Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-14 11:11:42 UTC (rev 564) +++ pytrainer/trunk/pytrainer/main.py 2010-04-15 08:49:07 UTC (rev 565) @@ -59,7 +59,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#564" + self.version ="1.7.2_svn#565" self.DB_version = 3 #Process command line options self.startup_options = self.get_options() Modified: pytrainer/trunk/pytrainer/plugins.py =================================================================== --- pytrainer/trunk/pytrainer/plugins.py 2010-04-14 11:11:42 UTC (rev 564) +++ pytrainer/trunk/pytrainer/plugins.py 2010-04-15 08:49:07 UTC (rev 565) @@ -103,7 +103,7 @@ def getPluginConfParams(self,pathPlugin): info = XMLParser(pathPlugin+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): params = info.getAllValues("conf-values") params.append(("status","0")) @@ -119,7 +119,7 @@ def setPluginConfParams(self,pathPlugin,savedOptions): info = XMLParser(pathPlugin+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.conf.getValue("plugindir")+"/"+code + plugindir = self.pytrainer_main.profile.plugindir+"/"+code if not os.path.isdir(plugindir): os.mkdir(plugindir) if not os.path.isfile(plugindir+"/conf.xml"): @@ -129,6 +129,6 @@ info.createXMLFile("pytrainer-plugin",savedOptions) def getCodeConfValue(self,code,value): - plugindir = self.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir info = XMLParser(plugindir+"/"+code+"/conf.xml") return info.getValue("pytrainer-plugin",value) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-14 11:11:48
|
Revision: 564 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=564&view=rev Author: jblance Date: 2010-04-14 11:11:42 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Fixes to heartrate graphing after changes to profile and config variables Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/heartrategraph.py pytrainer/trunk/pytrainer/lib/heartrate.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-14 10:59:25 UTC (rev 563) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-14 11:11:42 UTC (rev 564) @@ -141,7 +141,7 @@ def createGraphs(self,RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph): self.drawarearecord = RecordGraph(self.record_graph_vbox, self.window1, self.record_combovalue, self.record_combovalue2, self.btnShowLaps, self.tableConfig) - self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2) + self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2, pytrainer_main=self.pytrainer_main) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() self.drawareaweek = WeekGraph(self.weekview, self.window1, self.week_combovalue, self.week_combovalue2) Modified: pytrainer/trunk/pytrainer/heartrategraph.py =================================================================== --- pytrainer/trunk/pytrainer/heartrategraph.py 2010-04-14 10:59:25 UTC (rev 563) +++ pytrainer/trunk/pytrainer/heartrategraph.py 2010-04-14 11:11:42 UTC (rev 564) @@ -23,15 +23,16 @@ import logging class HeartRateGraph: - def __init__(self, vbox = None, window = None, vbox2 = None): + def __init__(self, vbox = None, window = None, vbox2 = None, pytrainer_main = None): logging.debug('>>') self.drawarea = DrawArea(vbox, window) self.drawarea2 = DrawArea(vbox2, window) + self.pytrainer_main = pytrainer_main logging.debug('<<') def drawgraph(self,values): logging.debug('>>') - zones = getZones() + zones = getZones(self.pytrainer_main) #TODO from lib/heartrate.py import - can this file be consolidated? xvalues, yvalues = self.get_values(values) #logging.debug('xvalues: '+str(xvalues)) #logging.debug('yvalues: '+str(yvalues)) Modified: pytrainer/trunk/pytrainer/lib/heartrate.py =================================================================== --- pytrainer/trunk/pytrainer/lib/heartrate.py 2010-04-14 10:59:25 UTC (rev 563) +++ pytrainer/trunk/pytrainer/lib/heartrate.py 2010-04-14 11:11:42 UTC (rev 564) @@ -18,14 +18,14 @@ from xmlUtils import XMLParser -def getZones(): - conf = checkConf() - filename = conf.getValue("conffile") - configuration = XMLParser(filename) - maxhr = int(configuration.getValue("pytraining","prf_maxhr")) - resthr = int(configuration.getValue("pytraining","prf_minhr")) +def getZones(pytrainer_main=None): + #conf = checkConf() + #filename = conf.getValue("conffile") + #configuration = XMLParser(filename) + maxhr = int(pytrainer_main.profile.getValue("pytraining","prf_maxhr")) + resthr = int(pytrainer_main.profile.getValue("pytraining","prf_minhr")) - if configuration.getValue("pytraining","prf_hrzones_karvonen")=="True": + if pytrainer_main.profile.getValue("pytraining","prf_hrzones_karvonen")=="True": #if karvonen method targethr1 = ((maxhr - resthr) * 0.50) + resthr targethr2 = ((maxhr - resthr) * 0.60) + resthr Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-14 10:59:25 UTC (rev 563) +++ pytrainer/trunk/pytrainer/main.py 2010-04-14 11:11:42 UTC (rev 564) @@ -59,7 +59,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#563" + self.version ="1.7.2_svn#564" self.DB_version = 3 #Process command line options self.startup_options = self.get_options() @@ -307,8 +307,8 @@ gpx = Gpx(self.data_path,gpxfile) gpx_tracklist = gpx.getTrackList() self.windowmain.actualize_heartrategraph(gpx_tracklist) - zones = getZones() #TODO Huh, what is supposed to happen here??? - karvonen_method = self.profile.configuration.getValue("pytraining","prf_hrzones_karvonen") + zones = getZones(self) #TODO from lib/heartrate.py import - can this file be consolidated? + karvonen_method = self.profile.getValue("pytraining","prf_hrzones_karvonen") self.windowmain.actualize_hrview(record_list,zones,karvonen_method) logging.debug('<<') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-14 10:59:33
|
Revision: 563 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=563&view=rev Author: jblance Date: 2010-04-14 10:59:25 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Allow Y1 axis customisation - min, max, line color and line weight Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade 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 2010-04-14 08:56:33 UTC (rev 562) +++ pytrainer/trunk/glade/pytrainer.glade 2010-04-14 10:59:25 UTC (rev 563) @@ -1188,107 +1188,325 @@ <property name="can_focus">True</property> <property name="position_set">True</property> <child> - <widget class="GtkTable" id="tableConfig"> + <widget class="GtkVBox" id="vboxGraphYConfig"> <property name="visible">True</property> - <property name="n_rows">5</property> - <property name="n_columns">3</property> + <property name="orientation">vertical</property> <child> - <widget class="GtkLabel" id="labelY1Axis"> + <widget class="GtkLabel" id="labelGraphConfig"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes"><small>Y Axis</small></property> + <property name="label" translatable="yes"><small>Graph Display Options</small></property> <property name="use_markup">True</property> </widget> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> + <property name="expand">False</property> + <property name="position">0</property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spinbuttonY1Min"> + <widget class="GtkFrame" id="frameYAxisLimits"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - <property name="width_chars">4</property> - <property name="adjustment">0 -500 1000 1 10 0</property> - <signal name="value_changed" handler="on_spinbuttonY1_value_changed"/> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="left_padding">10</property> + <child> + <widget class="GtkTable" id="tableConfig"> + <property name="visible">True</property> + <property name="n_rows">4</property> + <property name="n_columns">3</property> + <child> + <widget class="GtkLabel" id="labelY1AxisLimits"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="xpad">1</property> + <property name="label" translatable="yes"><small>Limits</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelYMin"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Min</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelYMax"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Max</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1Min"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 -500 1000 1 10 0</property> + <signal name="value_changed" handler="on_spinbuttonY1_value_changed"/> + </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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1Max"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 -500 1000 1 10 0</property> + <signal name="value_changed" handler="on_spinbuttonY1_value_changed"/> + </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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelY1LineColor"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Line Color</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkColorButton" id="colorbuttonY1LineColor"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="xalign">0</property> + <property name="color">#000000000000</property> + <signal name="color_set" handler="on_colorbuttonY1LineColor_color_set"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelY1LineWeight"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes"><small>Line Weight</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1LineWeight"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="max_length">2</property> + <property name="invisible_char">●</property> + <property name="adjustment">1 0 10 1 1 0</property> + <signal name="value_changed" handler="on_spinbuttonY1LineWeight_value_changed"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelY1Axis"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Y1 Axis</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</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">GTK_SHRINK</property> - <property name="y_options">GTK_SHRINK</property> + <property name="position">1</property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spinbuttonY1Max"> + <widget class="GtkFrame" id="frameY2Axis"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - <property name="width_chars">4</property> - <property name="adjustment">0 -500 1000 1 10 0</property> - <signal name="value_changed" handler="on_spinbuttonY1_value_changed"/> + <property name="sensitive">False</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="left_padding">10</property> + <child> + <widget class="GtkTable" id="tableConfig1"> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">3</property> + <child> + <widget class="GtkLabel" id="labelY1AxisLimits1"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes"><small>Limits</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelYMin1"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Min</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelYMax1"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Max</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1Min2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 -500 1000 1 10 0</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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1Max2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 -500 1000 1 10 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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelY2Axis"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small>Y2 Axis</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </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">GTK_SHRINK</property> - <property name="y_options">GTK_SHRINK</property> + <property name="position">2</property> </packing> </child> <child> - <widget class="GtkLabel" id="labelGraphConfig"> - <property name="visible">True</property> - <property name="label" translatable="yes"><small>Graph Display Options</small></property> - <property name="use_markup">True</property> - </widget> - <packing> - <property name="right_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkButton" id="buttonResetGraph"> <property name="label" translatable="yes">Reset Graph</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="tooltip" translatable="yes">Reset Graph display to original settings</property> + <property name="has_tooltip">True</property> <property name="yalign">1</property> <signal name="clicked" handler="on_buttonResetGraph_clicked"/> </widget> <packing> - <property name="right_attach">3</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options"></property> - <property name="y_options">GTK_EXPAND</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">3</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </widget> <packing> <property name="resize">False</property> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2010-04-14 08:56:33 UTC (rev 562) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2010-04-14 10:59:25 UTC (rev 563) @@ -273,7 +273,7 @@ logging.debug('<<') - def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None,xzones=None, ylimits=None): + def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None,xzones=None, ylimits=None, y1_linewidth=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)) @@ -284,7 +284,10 @@ for value in xvalues: if i<1: axis = figure.add_subplot(111) - axis.plot(xvalues[i],yvalues[i], color=color[i]) + line = axis.plot(xvalues[i],yvalues[i], color=color[i]) + if y1_linewidth is not None: + line[0].set_linewidth(y1_linewidth) + linewidth = line[0].get_linewidth() axis.grid(True) for tl in axis.get_yticklabels(): @@ -334,7 +337,7 @@ logging.debug('Child available: '+str(child)) logging.debug('<<') - return (ylim_min, ylim_max) + return {'y1_min': ylim_min, 'y1_max': ylim_max, 'y1_linewidth': linewidth} def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-14 08:56:33 UTC (rev 562) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-14 10:59:25 UTC (rev 563) @@ -55,6 +55,9 @@ self.gpxDir = gpxDir self.record_list = None self.laps = None + self.y1_limits = None + self.y1_color = None + self.y1_linewidth = 1 def new(self): self.testimport = self.pytrainer_main.startup_options.testimport @@ -809,10 +812,10 @@ def createWaypointEditor(self,WaypointEditor,waypoint, parent=None): self.waypointeditor = WaypointEditor(self.data_path, self.waypointvbox,waypoint,parent) - def zoom_graph(self, ylimits=None): + def zoom_graph(self, y1limits=None, y1color=None, y1_linewidth=1): logging.debug(">>") - logging.debug("Reseting graph Y axis with ylimits: %s" % str(ylimits) ) - self.drawarearecord.drawgraph(self.record_list,self.laps, ylimits=ylimits) + logging.debug("Reseting graph Y axis with ylimits: %s" % str(y1limits) ) + self.drawarearecord.drawgraph(self.record_list,self.laps, y1limits=y1limits, y1color=y1color, y1_linewidth=y1_linewidth) logging.debug("<<") ###################### @@ -820,18 +823,34 @@ ###################### def on_spinbuttonY1_value_changed(self, widget): - ymin = self.spinbuttonY1Min.get_value() - ymax = self.spinbuttonY1Max.get_value() + y1min = self.spinbuttonY1Min.get_value() + y1max = self.spinbuttonY1Max.get_value() #Check to see if the min and max have the same... - if ymin == ymax: + if y1min == y1max: if widget.get_name() == "spinbuttonY1Min": #User was changing the min spinbutton, so move max up - ymax += 1 + y1max += 1 else: #Move min down - ymin -= 1 - self.zoom_graph(ylimits=(ymin, ymax)) + y1min -= 1 + self.y1_limits=(y1min, y1max) + self.zoom_graph(y1limits=self.y1_limits, y1color=self.y1_color, y1_linewidth=self.y1_linewidth) def on_buttonResetGraph_clicked(self, widget): + #self.zoom_graph() + #Reset stored values + self.y1_limits = None + self.y1_color = None + self.y1_linewidth = 1 self.zoom_graph() + + def on_colorbuttonY1LineColor_color_set(self, widget): + y1color = widget.get_color() + cs = y1color.to_string() + self.y1_color = cs[0:3] + cs[5:7] + cs[9:11] + self.drawarearecord.drawgraph(self.record_list,self.laps, y1limits=self.y1_limits, y1color=self.y1_color, y1_linewidth=self.y1_linewidth) + + def on_spinbuttonY1LineWeight_value_changed(self, widget): + self.y1_linewidth = self.spinbuttonY1LineWeight.get_value_as_int() + self.drawarearecord.drawgraph(self.record_list,self.laps, y1limits=self.y1_limits, y1color=self.y1_color, y1_linewidth=self.y1_linewidth) def on_edit_clicked(self,widget): selected,iter = self.recordTreeView.get_selection().get_selected() Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-14 08:56:33 UTC (rev 562) +++ pytrainer/trunk/pytrainer/main.py 2010-04-14 10:59:25 UTC (rev 563) @@ -59,7 +59,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#562" + self.version ="1.7.2_svn#563" self.DB_version = 3 #Process command line options self.startup_options = self.get_options() Modified: pytrainer/trunk/pytrainer/recordgraph.py =================================================================== --- pytrainer/trunk/pytrainer/recordgraph.py 2010-04-14 08:56:33 UTC (rev 562) +++ pytrainer/trunk/pytrainer/recordgraph.py 2010-04-14 10:59:25 UTC (rev 563) @@ -30,7 +30,7 @@ self.config_table = tableConfig logging.debug("<<") - def drawgraph(self,values,laps=None, ylimits=None): + def drawgraph(self,values,laps=None, y1limits=None, y1color=None, y1_linewidth=1): logging.debug(">>") #Get the config options for child in self.config_table.get_children(): @@ -38,6 +38,11 @@ spinbuttonY1Max = child elif child.get_name() == "spinbuttonY1Min": spinbuttonY1Min = child + elif child.get_name() == "colorbuttonY1LineColor": + colorbuttonY1LineColor = child + elif child.get_name() == "spinbuttonY1LineWeight": + spinbuttonY1LineWeight = child + xval = [] yval = [] xlab = [] @@ -72,6 +77,11 @@ max_yvalue = max(yvalues) min_yvalue = min(yvalues) xlabel,ylabel,title,color = self.get_value_params(value_selected) + if y1color is not None: + _color = gtk.gdk.Color(y1color) + color = y1color + else: + _color = gtk.gdk.Color(color) xval.append(xvalues) yval.append(yvalues) @@ -83,6 +93,9 @@ tit.append(title) col.append(color) + #_color = gtk.gdk.Color(color) + colorbuttonY1LineColor.set_color(_color) + if value_selected2 > 0: value_selected2 = value_selected2-1 xlabel,ylabel,title,color = self.get_value_params(value_selected2) @@ -97,7 +110,10 @@ col.append(color) logging.info("To show: tit: "+str(tit)+" | col: "+str(col)+" | xlab: "+str(xlab)+" | ylab: "+str(ylab)) #self.drawPlot(xvalues,yvalues,xlabel,ylabel,title,color,zones) - ymin, ymax = self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues, ylimits=ylimits) + plot_stats = self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues, ylimits=y1limits, y1_linewidth=y1_linewidth) + ymin = plot_stats['y1_min'] + ymax = plot_stats['y1_max'] + y1_linewidth = plot_stats['y1_linewidth'] max_yvalue = max(max_yvalue, ymax) min_yvalue = min(min_yvalue, ymin) @@ -107,6 +123,8 @@ spinbuttonY1Max.set_adjustment(adjY1Max) spinbuttonY1Min.set_value(ymin) spinbuttonY1Max.set_value(ymax) + spinbuttonY1LineWeight.set_value(y1_linewidth) + 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-04-14 08:56:39
|
Revision: 562 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=562&view=rev Author: jblance Date: 2010-04-14 08:56:33 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Fix of plugins have refactor of global vars Modified Paths: -------------- pytrainer/trunk/import/file_garmintcxv1.py pytrainer/trunk/import/file_garmintcxv2.py pytrainer/trunk/import/file_garmintools.py pytrainer/trunk/import/file_gpxplus.py pytrainer/trunk/import/file_kml20.py pytrainer/trunk/import/tool_gant.py pytrainer/trunk/import/tool_garmintools.py pytrainer/trunk/import/tool_gpsbabel.py 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/plugins/garmintools_full/garmintools_full.py pytrainer/trunk/plugins/googleearth/main.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/import/file_garmintcxv1.py =================================================================== --- pytrainer/trunk/import/file_garmintcxv1.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/file_garmintcxv1.py 2010-04-14 08:56:33 UTC (rev 562) @@ -22,15 +22,14 @@ from lxml import etree from pytrainer.lib.xmlUtils import XMLParser -from pytrainer.lib.system import checkConf from pytrainer.lib.date import Date -#from pytrainer.gui.dialogs import fileChooserDialog, guiFlush class garmintcxv1(): def __init__(self, parent = None, data_path = None): + logging.debug("init") self.parent = parent - self.conf = checkConf() - self.tmpdir = self.conf.getValue("tmpdir") + self.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) self.xmldoc = None Modified: pytrainer/trunk/import/file_garmintcxv2.py =================================================================== --- pytrainer/trunk/import/file_garmintcxv2.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/file_garmintcxv2.py 2010-04-14 08:56:33 UTC (rev 562) @@ -23,14 +23,12 @@ from pytrainer.lib.date import Date from pytrainer.lib.xmlUtils import XMLParser -from pytrainer.lib.system import checkConf -#from pytrainer.gui.dialogs import fileChooserDialog, guiFlush class garmintcxv2(): def __init__(self, parent = None, data_path = None): self.parent = parent - self.conf = checkConf() - self.tmpdir = self.conf.getValue("tmpdir") + self.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) self.xmldoc = None Modified: pytrainer/trunk/import/file_garmintools.py =================================================================== --- pytrainer/trunk/import/file_garmintools.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/file_garmintools.py 2010-04-14 08:56:33 UTC (rev 562) @@ -26,15 +26,11 @@ from lxml import etree from pytrainer.lib.date import Date -#from pytrainer.lib.xmlUtils import XMLParser -#from pytrainer.gui.dialogs import fileChooserDialog, guiFlush -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.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) self.xmldoc = None Modified: pytrainer/trunk/import/file_gpxplus.py =================================================================== --- pytrainer/trunk/import/file_gpxplus.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/file_gpxplus.py 2010-04-14 08:56:33 UTC (rev 562) @@ -23,15 +23,11 @@ from lxml import etree from pytrainer.lib.date import Date -#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.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) self.xmldoc = None Modified: pytrainer/trunk/import/file_kml20.py =================================================================== --- pytrainer/trunk/import/file_kml20.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/file_kml20.py 2010-04-14 08:56:33 UTC (rev 562) @@ -25,16 +25,13 @@ from StringIO import StringIO from lxml import etree -from pytrainer.lib.xmlUtils import XMLParser -from pytrainer.lib.system import checkConf from pytrainer.lib.date import Date -#from pytrainer.gui.dialogs import fileChooserDialog, guiFlush class kml20(): def __init__(self, parent = None, data_path = None): self.parent = parent - self.conf = checkConf() - self.tmpdir = self.conf.getValue("tmpdir") + self.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) self.xmldoc = None Modified: pytrainer/trunk/import/tool_gant.py =================================================================== --- pytrainer/trunk/import/tool_gant.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/tool_gant.py 2010-04-14 08:56:33 UTC (rev 562) @@ -24,13 +24,12 @@ 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.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) Modified: pytrainer/trunk/import/tool_garmintools.py =================================================================== --- pytrainer/trunk/import/tool_garmintools.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/tool_garmintools.py 2010-04-14 08:56:33 UTC (rev 562) @@ -24,13 +24,12 @@ 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.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) Modified: pytrainer/trunk/import/tool_gpsbabel.py =================================================================== --- pytrainer/trunk/import/tool_gpsbabel.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/import/tool_gpsbabel.py 2010-04-14 08:56:33 UTC (rev 562) @@ -24,13 +24,12 @@ 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.pytrainer_main = parent.parent + self.tmpdir = self.pytrainer_main.profile.tmpdir self.main_data_path = data_path self.data_path = os.path.dirname(__file__) Modified: pytrainer/trunk/plugins/garmin-gpx/garmingpx.py =================================================================== --- pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2010-04-14 08:56:33 UTC (rev 562) @@ -33,7 +33,7 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") + self.tmpdir = self.parent.profile.tmpdir self.validate = validate self.data_path = os.path.dirname(__file__) self.sport = self.getConfValue("Force_sport_to") Modified: pytrainer/trunk/plugins/garmin-hr/garminhr.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr/garminhr.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/plugins/garmin-hr/garminhr.py 2010-04-14 08:56:33 UTC (rev 562) @@ -33,7 +33,7 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") + self.tmpdir = self.parent.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.input_dev = self.getConfValue("device") Modified: pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2010-04-14 08:56:33 UTC (rev 562) @@ -37,7 +37,7 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") + self.tmpdir = self.parent.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.sport = self.getConfValue("Force_sport_to") Modified: pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2010-04-14 08:56:33 UTC (rev 562) @@ -26,7 +26,7 @@ class garminTCXv2(): def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") + self.tmpdir = self.parent.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.sport = self.getConfValue("Force_sport_to") Modified: pytrainer/trunk/plugins/garmintools/garmintools.py =================================================================== --- pytrainer/trunk/plugins/garmintools/garmintools.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/plugins/garmintools/garmintools.py 2010-04-14 08:56:33 UTC (rev 562) @@ -31,7 +31,7 @@ class garmintools(): def __init__(self, parent = None, validate=False): self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") + self.tmpdir = self.parent.profile.tmpdir self.data_path = os.path.dirname(__file__) self.validate = validate self.sport = self.getConfValue("Force_sport_to") Modified: pytrainer/trunk/plugins/garmintools_full/garmintools_full.py =================================================================== --- pytrainer/trunk/plugins/garmintools_full/garmintools_full.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/plugins/garmintools_full/garmintools_full.py 2010-04-14 08:56:33 UTC (rev 562) @@ -43,8 +43,8 @@ """ def __init__(self, parent = None, validate=False): self.parent = parent - self.confdir = self.parent.conf.getValue("confdir") - self.tmpdir = self.parent.conf.getValue("tmpdir") + self.confdir = self.parent.profile.confdir + self.tmpdir = self.parent.conf.profile.tmpdir # Tell garmintools where to save retrieved data from GPS device os.environ['GARMIN_SAVE_RUNS']=self.tmpdir self.data_path = os.path.dirname(__file__) Modified: pytrainer/trunk/plugins/googleearth/main.py =================================================================== --- pytrainer/trunk/plugins/googleearth/main.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/plugins/googleearth/main.py 2010-04-14 08:56:33 UTC (rev 562) @@ -29,7 +29,7 @@ self.parent = parent self.validate = validate self.data_path = os.path.dirname(__file__) - self.tmpdir = self.parent.conf.getValue("tmpdir") + self.tmpdir = self.parent.profile.tmpdir def run(self): logging.debug(">>") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-14 08:33:10 UTC (rev 561) +++ pytrainer/trunk/pytrainer/main.py 2010-04-14 08:56:33 UTC (rev 562) @@ -59,7 +59,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#561" + self.version ="1.7.2_svn#562" self.DB_version = 3 #Process command line options self.startup_options = self.get_options() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-14 08:33:18
|
Revision: 561 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=561&view=rev Author: jblance Date: 2010-04-14 08:33:10 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Refactor of configuration and profile, so they are reused Modified Paths: -------------- pytrainer/trunk/pytrainer/extension.py pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/extensions/waypointeditor.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/gui/windowprofile.py pytrainer/trunk/pytrainer/lib/ddbb.py pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/lib/heartrate.py pytrainer/trunk/pytrainer/lib/mysqlUtils.py pytrainer/trunk/pytrainer/lib/sqliteUtils.py pytrainer/trunk/pytrainer/lib/system.py pytrainer/trunk/pytrainer/lib/xmlUtils.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/plugins.py pytrainer/trunk/pytrainer/profile.py pytrainer/trunk/pytrainer/record.py pytrainer/trunk/pytrainer/waypoint.py Modified: pytrainer/trunk/pytrainer/extension.py =================================================================== --- pytrainer/trunk/pytrainer/extension.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/extension.py 2010-04-14 08:33:10 UTC (rev 561) @@ -20,15 +20,16 @@ import logging from lib.xmlUtils import XMLParser -from lib.system import checkConf +#from lib.system import checkConf from gui.windowextensions import WindowExtensions class Extension: def __init__(self, data_path = None, parent = None): self.data_path=data_path - self.conf = checkConf() + #self.conf = checkConf() self.parent = parent + self.pytrainer_main = parent def getActiveExtensions(self): retorno = [] @@ -61,7 +62,7 @@ name = info.getValue("pytrainer-extension","name") description = info.getValue("pytrainer-extension","description") code = info.getValue("pytrainer-extension","extensioncode") - extensiondir = self.conf.getValue("extensiondir") + extensiondir = self.pytrainer_main.profile.extensiondir helpfile = pathExtension+"/"+info.getValue("pytrainer-extension","helpfile") type = info.getValue("pytrainer-extension","type") Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-04-14 08:33:10 UTC (rev 561) @@ -21,7 +21,7 @@ import re import logging -from pytrainer.lib.system import checkConf +#from pytrainer.lib.system import checkConf from pytrainer.lib.gpx import Gpx import pytrainer.lib.points as Points from pytrainer.lib.fileUtils import fileUtils @@ -31,15 +31,14 @@ def __init__(self, data_path = None, vbox = None, waypoint = None, pytrainer_main=None): logging.debug(">>") self.data_path = data_path - self.conf = checkConf() - gtkmozembed.set_profile_path("/tmp", "foobar") # http://faq.pygtk.org/index.py?req=show&file=faq19.018.htp + self.waypoint=waypoint + self.pytrainer_main = pytrainer_main + gtkmozembed.set_profile_path("/tmp", "foobar") # http://faq.pygtk.org/index.py?req=show&file=faq19.018.htp #TODO FIX??? self.moz = gtkmozembed.MozEmbed() vbox.pack_start(self.moz, True, True) vbox.show_all() - self.htmlfile = "%s/index.html" % (self.conf.getValue("tmpdir")) - self.waypoint=waypoint - self.pytrainer_main = pytrainer_main - self.record = Record() + self.htmlfile = "%s/index.html" % (self.pytrainer_main.profile.tmpdir) + logging.debug("<<") def drawMap(self,id_record): @@ -51,7 +50,7 @@ ''' logging.debug(">>") code = "googlemapsviewer" - extensiondir = self.conf.getValue("extensiondir")+"/"+code + extensiondir = self.pytrainer_main.profile.extensiondir+"/"+code if not os.path.isdir(extensiondir): os.mkdir(extensiondir) points = [] @@ -59,7 +58,7 @@ pointlist = [] polyline = [] - gpxfile = "%s/%s.gpx" % (self.conf.getValue("gpxdir"), id_record) + gpxfile = "%s/%s.gpx" % (self.pytrainer_main.profile.gpxdir, id_record) if os.path.isfile(gpxfile): gpx = Gpx(self.data_path,gpxfile) list_values = gpx.getTrackList() @@ -79,13 +78,13 @@ logging.debug("minlon: %s, maxlon: %s" % (minlon, maxlon)) points,levels = Points.encodePoints(pointlist) points = points.replace("\\","\\\\") - if self.pytrainer_main.gm3: + if self.pytrainer_main.startup_options.gm3: logging.debug("Using Google Maps version 3 API") #laps = gpx.getLaps() # [](elapsedTime, lat, lon, calories, distance) #"id_lap, record, elapsed_time, distance, start_lat, start_lon, end_lat, end_lon, calories", - laps = self.record.getLaps(id_record) + laps = self.pytrainer_main.record.getLaps(id_record) #"sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats" - info = self.record.getrecordInfo(id_record) + info = self.pytrainer_main.record.getrecordInfo(id_record) timeHours = int(info[0][3]) / 3600 timeMin = (float(info[0][3]) / 3600.0 - timeHours) * 60 time = "%d%s %02d%s" % (timeHours, _("h"), timeMin, _("min")) @@ -218,7 +217,7 @@ except: #Error processing lap lat or lon #dont show this lap - print "Error processing lap "+ str(lapNumber) + " id: " + lap(lap[0]) + " (lat,lon) ( " + str(lap[6]) + "," +str (lap[7]) + ")" + print "Error processing lap "+ str(lapNumber) + " id: " + str(lap[0]) + " (lat,lon) ( " + str(lap[6]) + "," +str (lap[7]) + ")" content += ''' Modified: pytrainer/trunk/pytrainer/extensions/waypointeditor.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/waypointeditor.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/extensions/waypointeditor.py 2010-04-14 08:33:10 UTC (rev 561) @@ -20,7 +20,6 @@ import os import re -from pytrainer.lib.system import checkConf from pytrainer.extension import Extension from pytrainer.lib.fileUtils import fileUtils @@ -33,7 +32,6 @@ def __init__(self, data_path = None, vbox = None, waypoint=None, parent=None): logging.debug(">>") self.data_path = data_path - self.conf = checkConf() self.extension = Extension() self.moz = gtkmozembed.MozEmbed() self.moz.connect('title', self.handle_title_changed) @@ -85,7 +83,7 @@ def drawMap(self): logging.debug(">>") #self.createHtml() - tmpdir = self.conf.getValue("tmpdir") + tmpdir = self.pytrainer_main.profile.tmpdir htmlfile = tmpdir+"/waypointeditor.html" logging.debug("HTML file: "+str(htmlfile)) self.moz.load_url("file://"+htmlfile) @@ -93,7 +91,7 @@ def createHtml(self,default_waypoint=None): logging.debug(">>") - tmpdir = self.conf.getValue("tmpdir") + tmpdir = self.pytrainer_main.profile.tmpdir filename = tmpdir+"/waypointeditor.html" points = self.waypoint.getAllWaypoints() Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-14 08:33:10 UTC (rev 561) @@ -29,7 +29,7 @@ from aboutdialog import About from pytrainer.lib.date import Date -from pytrainer.lib.system import checkConf +#from pytrainer.lib.system import checkConf from pytrainer.lib.xmlUtils import XMLParser from pytrainer.lib.gpx import Gpx from pytrainer.lib.unitsconversor import * @@ -42,6 +42,7 @@ gtk.about_dialog_set_url_hook(url_hook) self.version = version self.parent = parent + self.pytrainer_main = parent self.data_path = data_path glade_path="glade/pytrainer.glade" root = "window1" @@ -56,7 +57,7 @@ self.laps = None def new(self): - self.testimport = self.parent.testimport + self.testimport = self.pytrainer_main.startup_options.testimport self.menublocking = 0 self.selected_view="day" self.window1.set_title ("pyTrainer %s" % self.version) @@ -71,8 +72,8 @@ #create the columns for the waypoints treeview column_names=[_("id"),_("Waypoint")] self.create_treeview(self.waypointTreeView,column_names) - conf = checkConf() - self.fileconf = conf.getValue("confdir")+"/listviewmenu.xml" + #conf = checkConf() + self.fileconf = self.pytrainer_main.profile.confdir+"/listviewmenu.xml" if not os.path.isfile(self.fileconf): self._createXmlListView(self.fileconf) self.showAllRecordTreeViewColumns() @@ -176,10 +177,7 @@ def actualize_recordview(self,record_list): logging.debug(">>") - conf = checkConf() - filename = conf.getValue("conffile") - configuration = XMLParser(filename) - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": self.r_distance_unit.set_text(_("miles")) self.r_speed_unit.set_text(_("miles/h")) self.r_maxspeed_unit.set_text(_("miles/h")) @@ -227,7 +225,7 @@ recordTime = dateTime.strftime("%X") recordDateTimeOffset = dateTime.strftime("%z") - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": self.record_distance.set_text("%0.2f" %km2miles(distance)) self.record_upositive.set_text("%0.2f" %m2feet(upositive)) self.record_unegative.set_text("%0.2f" %m2feet(unegative)) @@ -314,10 +312,7 @@ def actualize_dayview(self,record_list): logging.debug(">>") - conf = checkConf() - filename = conf.getValue("conffile") - configuration = XMLParser(filename) - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": self.d_distance_unit.set_text(_("miles")) self.d_speed_unit.set_text(_("miles/h")) self.d_maxspeed_unit.set_text(_("miles/h")) @@ -353,7 +348,7 @@ if record[10] > maxbeats: maxbeats = self.parseFloat(record[10]) - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": distance = km2miles(distance) maxspeed = km2miles(maxspeed) @@ -418,10 +413,7 @@ maxpace = "0.00" maxbeats = 0 - conf = checkConf() - filename = conf.getValue("conffile") - configuration = XMLParser(filename) - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": self.w_distance_unit.set_text(_("miles")) self.w_speed_unit.set_text(_("miles/h")) self.w_maxspeed_unit.set_text(_("miles/h")) @@ -449,7 +441,7 @@ if record[8] > maxbeats: maxbeats = self.parseFloat(record[8]) - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": km = km2miles(km) maxspeed = km2miles(maxspeed) @@ -496,10 +488,7 @@ maxpace = "0.00" maxbeats = 0 - conf = checkConf() - filename = conf.getValue("conffile") - configuration = XMLParser(filename) - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": self.m_distance_unit.set_text(_("miles")) self.m_speed_unit.set_text(_("miles/h")) self.m_maxspeed_unit.set_text(_("miles/h")) @@ -527,7 +516,7 @@ if record[8] > maxbeats: maxbeats = self.parseFloat(record[8]) - if configuration.getValue("pytraining","prf_us_system") == "True": + if self.pytrainer_main.profile.getValue("pytraining","prf_us_system") == "True": km = km2miles(km) maxspeed = km2miles(maxspeed) Modified: pytrainer/trunk/pytrainer/gui/windowprofile.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-14 08:33:10 UTC (rev 561) @@ -159,99 +159,90 @@ def init_params_tab(self): #Show log level - if self.pytrainer_main.log_level == logging.ERROR: + if self.pytrainer_main.startup_options.log_level == logging.ERROR: self.comboboxLogLevel.set_active(0) - elif self.pytrainer_main.log_level == logging.WARNING: + elif self.pytrainer_main.startup_options.log_level == logging.WARNING: self.comboboxLogLevel.set_active(1) - elif self.pytrainer_main.log_level == logging.INFO: + elif self.pytrainer_main.startup_options.log_level == logging.INFO: self.comboboxLogLevel.set_active(2) - elif self.pytrainer_main.log_level == logging.DEBUG: + elif self.pytrainer_main.startup_options.log_level == logging.DEBUG: self.comboboxLogLevel.set_active(3) else: self.comboboxLogLevel.set_active(0) print "Unknown logging level specified" #Show if validation requested - if self.pytrainer_main.validate: + if self.pytrainer_main.startup_options.validate: self.checkbuttonValidate.set_active(True) else: self.checkbuttonValidate.set_active(False) #Show if database and config check requested - if self.pytrainer_main.check: + if self.pytrainer_main.startup_options.check: self.checkbuttonCheck.set_active(True) else: self.checkbuttonCheck.set_active(False) #Show if using Googlemaps API v3 - if self.pytrainer_main.gm3: + if self.pytrainer_main.startup_options.gm3: self.checkbuttonGM3.set_active(True) else: self.checkbuttonGM3.set_active(False) #Show if unified import activated - if self.pytrainer_main.testimport: + if self.pytrainer_main.startup_options.testimport: self.checkbuttonUnifiedImport.set_active(True) else: self.checkbuttonUnifiedImport.set_active(False) - #TODO Allow changes to settings!!! - #Disable editing as processing of changes not yet implemented - #self.comboboxLogLevel.set_sensitive(0) - #logging.getLogger('').setLevel(self.log_level) - #self.checkbuttonValidate.set_sensitive(0) - #self.checkbuttonCheck.set_sensitive(0) - #self.checkbuttonGM3.set_sensitive(0) - #self.checkbuttonUnifiedImport.set_sensitive(0) - def on_comboboxLogLevel_changed(self, widget): active = self.comboboxLogLevel.get_active() if active == 1: logging.debug("Setting log level to WARNING") - self.pytrainer_main.log_level = logging.WARNING + self.pytrainer_main.startup_options.log_level = logging.WARNING elif active == 2: logging.debug("Setting log level to INFO") - self.pytrainer_main.log_level = logging.INFO + self.pytrainer_main.startup_options.log_level = logging.INFO elif active == 3: logging.debug("Setting log level to DEBUG") - self.pytrainer_main.log_level = logging.DEBUG + self.pytrainer_main.startup_options.log_level = logging.DEBUG else: logging.debug("Setting log level to ERROR") - self.pytrainer_main.log_level = logging.ERROR - self.pytrainer_main.set_logging_level(self.pytrainer_main.log_level) + self.pytrainer_main.startup_options.log_level = logging.ERROR + self.pytrainer_main.set_logging_level(self.pytrainer_main.startup_options.log_level) def on_checkbuttonValidate_toggled(self, widget): if self.checkbuttonValidate.get_active(): logging.debug( "Validate activated") - self.pytrainer_main.validate = True + self.pytrainer_main.startup_options.validate = True else: logging.debug("Validate deactivated") - self.pytrainer_main.validate = False + self.pytrainer_main.startup_options.validate = False def on_checkbuttonCheck_toggled(self, widget): if self.checkbuttonCheck.get_active(): logging.debug( "Check activated") - if self.pytrainer_main.check is not True: + if self.pytrainer_main.startup_options.check is not True: #Need to do sanitycheck logging.debug("Need to do sanitycheck") self.pytrainer_main.sanityCheck() - self.pytrainer_main.check = True + self.pytrainer_main.startup_options.check = True else: logging.debug("Check deactivated") - self.pytrainer_main.check = False + self.pytrainer_main.startup_options.check = False def on_checkbuttonGM3_toggled(self, widget): if self.checkbuttonGM3.get_active(): logging.debug("GM3 activated") - self.pytrainer_main.gm3 = True + self.pytrainer_main.startup_options.gm3 = True else: logging.debug("GM3 deactivated") - self.pytrainer_main.gm3 = False + self.pytrainer_main.startup_options.gm3 = False def on_checkbuttonUnifiedImport_toggled(self, widget): if self.checkbuttonUnifiedImport.get_active(): logging.debug("Unified Import activated") - if self.pytrainer_main.testimport is not True: + if self.pytrainer_main.startup_options.testimport is not True: #Need to enable unified import logging.debug("Need to enable unified import") self.pytrainer_main.windowmain.set_unified_import(True) @@ -260,7 +251,7 @@ logging.debug("No change to unified import") else: logging.debug("Unified Import deactivated") - if self.pytrainer_main.testimport is True: + if self.pytrainer_main.startup_options.testimport is True: logging.debug("Need to deactivate unified import") self.pytrainer_main.windowmain.set_unified_import(False) else: Modified: pytrainer/trunk/pytrainer/lib/ddbb.py =================================================================== --- pytrainer/trunk/pytrainer/lib/ddbb.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/lib/ddbb.py 2010-04-14 08:33:10 UTC (rev 561) @@ -22,26 +22,28 @@ import logging import traceback import commands, os -from system import checkConf +#from system import checkConf from pytrainer.lib.date import Date class DDBB: - def __init__(self, configuration): + def __init__(self, configuration, pytrainer_main=None): + self.pytrainer_main = pytrainer_main + self.configuration = configuration self.ddbb_type = configuration.getValue("pytraining","prf_ddbb") if self.ddbb_type == "mysql": #TODO no longer supported? from mysqlUtils import Sql else: from sqliteUtils import Sql - self.conf = checkConf() - self.confdir = self.conf.getValue("confdir") + #self.conf = checkConf() + self.confdir = configuration.confdir self.ddbb_path = "%s/pytrainer.ddbb" %self.confdir ddbb_host = configuration.getValue("pytraining","prf_ddbbhost") ddbb = configuration.getValue("pytraining","prf_ddbbname") ddbb_user = configuration.getValue("pytraining","prf_ddbbuser") ddbb_pass = configuration.getValue("pytraining","prf_ddbbpass") - self.ddbbObject = Sql(ddbb_host,ddbb,ddbb_user,ddbb_pass) + self.ddbbObject = Sql(ddbb_host,ddbb,ddbb_user,ddbb_pass,configuration) def connect(self): #si devolvemos 1 ha ido todo con exito : return 1 if all successful @@ -196,7 +198,7 @@ logging.debug("Found %d records in DB without date_time_local field populated" % (len(listOfRecords) ) ) for record in listOfRecords: try: - gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx"%(record[0]) + gpxfile = configuration.gpxdir+"/%s.gpx"%(record[0]) dateFromUTC = Date().getDateTime(record[2]) if os.path.isfile(gpxfile) : #GPX file exists for this record - probably not a manual record date_time_local = str(dateFromUTC[1]) Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2010-04-14 08:33:10 UTC (rev 561) @@ -21,12 +21,10 @@ import math import re import os -from system import checkConf import time from datetime import datetime import logging -from xmlUtils import XMLParser from lxml import etree from pytrainer.lib.date import Date @@ -58,7 +56,6 @@ self.filename = filename self.trkname = trkname logging.debug(str(data_path)+"|"+str(filename)+"|"+str(trkname)) - self.conf = checkConf() self.total_dist = 0 self.total_time = 0 self.upositive = 0 Modified: pytrainer/trunk/pytrainer/lib/heartrate.py =================================================================== --- pytrainer/trunk/pytrainer/lib/heartrate.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/lib/heartrate.py 2010-04-14 08:33:10 UTC (rev 561) @@ -16,7 +16,6 @@ #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -from system import checkConf from xmlUtils import XMLParser def getZones(): Modified: pytrainer/trunk/pytrainer/lib/mysqlUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/mysqlUtils.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/lib/mysqlUtils.py 2010-04-14 08:33:10 UTC (rev 561) @@ -24,7 +24,7 @@ # Fixed some issues with MySql tables creation (email from Jonas Liljenfeldt) class Sql: - def __init__(self,host=None, ddbb = None, user = None, password = None): + def __init__(self,host=None, ddbb = None, user = None, password = None, configuration = None): self.ddbb_user = user self.ddbb_pass = password self.ddbb_host = host Modified: pytrainer/trunk/pytrainer/lib/sqliteUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2010-04-14 08:33:10 UTC (rev 561) @@ -26,14 +26,13 @@ logging.error('Not able to find sqlite2 module (new in python 2.5)') from pysqlite2 import dbapi2 as sqlite logging.info('Using pysqlite2 module to access DB. Think about upgrading to python 2.5!') -from system import checkConf + from logs import Log class Sql: - def __init__(self,host=None, ddbb = None, user = None, password = None): + def __init__(self,host=None, ddbb = None, user = None, password = None, configuration = None): self.db = None - conf = checkConf() - confdir = conf.getValue("confdir") + confdir = configuration.confdir self.ddbb = "%s/pytrainer.ddbb" %confdir self.log = Log() Modified: pytrainer/trunk/pytrainer/lib/system.py =================================================================== --- pytrainer/trunk/pytrainer/lib/system.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/lib/system.py 2010-04-14 08:33:10 UTC (rev 561) @@ -21,82 +21,5 @@ class checkConf: def __init__(self): - self.home = None - self.tmpdir = None - self.confdir = None - self.conffile = None - self.gpxdir = None - self.extensiondir = None - self.plugindir = None - - self._setHome() - self._setConfFiles() - self._setTempDir() - self._setExtensionDir() - self._setPluginDir() - self._setGpxDir() - - def _setHome(self): - if sys.platform == "linux2": - variable = 'HOME' - elif sys.platform == "win32": - variable = 'USERPROFILE' - else: - print "Unsupported sys.platform: %s." % sys.platform - sys.exit(1) - self.home = os.environ[variable] - - def _setTempDir(self): - self.tmpdir = self.confdir+"/tmp" - if not os.path.isdir(self.tmpdir): - os.mkdir(self.tmpdir) - - def clearTempDir(self): - """Function to clear out the tmp directory that pytrainer uses - will only remove files - """ - if not os.path.isdir(self.tmpdir): - return - else: - files = os.listdir(self.tmpdir) - for name in files: - fullname = (os.path.join(self.tmpdir, name)) - if os.path.isfile(fullname): - os.remove(os.path.join(self.tmpdir, name)) - - def _setConfFiles(self): - if sys.platform == "win32": - self.confdir = self.home+"/pytrainer" - elif sys.platform == "linux2": - self.confdir = self.home+"/.pytrainer" - else: - print "Unsupported sys.platform: %s." % sys.platform - sys.exit(1) - self.conffile = self.confdir+"/conf.xml" - if not os.path.isdir(self.confdir): - os.mkdir(self.confdir) - - def _setGpxDir(self): - self.gpxdir = self.confdir+"/gpx" - if not os.path.isdir(self.gpxdir): - os.mkdir(self.gpxdir) - - def _setExtensionDir(self): - self.extensiondir = self.confdir+"/extensions" - if not os.path.isdir(self.extensiondir): - os.mkdir(self.extensiondir) - - def _setPluginDir(self): - self.plugindir = self.confdir+"/plugins" - if not os.path.isdir(self.plugindir): - os.mkdir(self.plugindir) - - def getConfFile(self): - if not os.path.isfile(self.conffile): - return False - else: - return self.conffile - - def getValue(self,variable): - method = getattr(self, variable) - return method + print "ERROR system.py not used anymore" + raise Exception Modified: pytrainer/trunk/pytrainer/lib/xmlUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/xmlUtils.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/lib/xmlUtils.py 2010-04-14 08:33:10 UTC (rev 561) @@ -38,6 +38,7 @@ self._load() def _load(self): + logging.debug("Loading %s" % self.filename) try: self.xmldoc = xml.dom.minidom.parse(self.filename) except: @@ -48,7 +49,7 @@ self.createXMLFile(self,"pytraining",list_item) def getOptions(self): - self._load() + #self._load() root = self.xmldoc.getElementsByTagName("pytraining")[0] list_options = {} list_keys = root.attributes.keys() @@ -74,7 +75,7 @@ self._saveFile(content) def getValue(self,tagname,variable): - self._load() + #self._load() try: root = self.xmldoc.getElementsByTagName(tagname)[0] value = root.attributes[variable].value @@ -83,7 +84,7 @@ return value def getAllValues(self,tagname): - self._load() + #self._load() root = self.xmldoc.getElementsByTagName(tagname) retorno = [] for i in root: @@ -108,79 +109,3 @@ out = open(self.filename, 'w') out.write(xmlcontent) out.close() - - def shortFromGPS(self, gtrnctrFile, getSport=True): - """23.03.2008 - dgranda - Retrieves sport, date and start time from each entry coming from GPS - args: - gtrnctrFile: file with data from GPS file (garmin format) - getSport: indicates if sport info should be added - returns: list with dictionaries (just a list in case of sport is not retrieved) SPORT|DATE_STARTTIME""" - logging.debug('>>') - listTracksGPS = [] - # http://gnosis.cx/publish/programming/parser-benchmarks.png - # Using ElementTree -> http://effbot.org/zone/element-index.htm - # cElementTree -> http://mike.hostetlerhome.com/present_files/pyxml.html - logging.debug('parsing '+gtrnctrFile) - if getSport is True: - logging.debug('Retrieving sport info') - else: - logging.debug('Discarding sport info') - listTracksGPS = [] - tree = xml.etree.cElementTree.parse(gtrnctrFile).getroot() - history = tree.findall(".//History") - for sport in history: - #print "Element: "+sport.tag - if sport.getchildren(): - for child in sport: - #print "\tSport found: "+child.tag - if child.getchildren(): - for entry in child: - logging.debug("Entry found: "+entry.tag) - tracks = entry.findall(".//Track") - num_tracks = len(tracks) - #print 'Tracks found: '+str(num_tracks) - if num_tracks>0: - for track in tracks: - # we are looking for date and time for the first trackpoint - date_time = track.findtext(".//Time") #returns first instance found - track_sport = entry.tag - logging.info('Found: '+track_sport+' | '+date_time) - if getSport is True: - listTracksGPS.append((track_sport,date_time)) - else: - listTracksGPS.append(date_time) - else: - logging.debug("No entry found for "+child.tag) - logging.debug('Retrieved info: '+str(listTracksGPS)) - logging.debug('<<') - return listTracksGPS - - - def getTrackFromDates(self, source_file , entry , isGpx): - """23.03.2008 - dgranda - Retrieves track given sport, date and start time - args: - - source_file: absolute path to source file - - entry: dictionary with SPORT|DATE_START_TIME - - isGpx: 1 if source file is GPX, 0 if garmin format - returns: path to selected entry file""" - logging.debug('>>') - selectedEntry = "" - # 23.03.2008 Only source from garmin files are supported right now (isGpx = 0) - # this is intended to work in the future with variables instead of hardcoded field names - #dom = xml.dom.minidom.parse(source_file) - trks = self.xmldoc.getElementsByTagName("Track") - for trk in trks: - trkpoints = trk.getElementsByTagName("Trackpoint") - # we just need to check first one's date - date_time = trkpoints[0].getElementsByTagName("Time")[0].firstChild.data - if date_time == entry[1]: - #this is the track we are looking for - selectedEntry = "/tmp/track"+date_time - logging.debug('Writing selected track to '+selectedEntry) - f = open(selectedEntry,'w') - f.write(trk.toxml()) - f.close() - logging.debug('<<') - return selectedEntry Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/main.py 2010-04-14 08:33:10 UTC (rev 561) @@ -48,88 +48,45 @@ from extensions.googlemaps import Googlemaps from extensions.waypointeditor import WaypointEditor -#from gui.windowextensions import WindowExtensions from gui.windowimportdata import WindowImportdata from gui.windowmain import Main from gui.warning import Warning from lib.date import Date from lib.gpx import Gpx -#from lib.soapUtils import webService from lib.ddbb import DDBB -from lib.xmlUtils import XMLParser -from lib.system import checkConf from lib.heartrate import * class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2" + self.version ="1.7.2_svn#561" self.DB_version = 3 - - #Setup usage and permitted options - usage = '''usage: %prog [options] - - For more help on valid options try: - %prog -h ''' - parser = OptionParser(usage=usage) - 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("--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() - #Populate startup options - self.log_level = options.log_level - self.validate = options.validate - self.check = options.check - self.gm3 = options.gm3 - self.testimport = options.testimport - - PATH = os.environ['HOME']+"/.pytrainer" - if not os.path.exists(PATH): - os.mkdir(PATH) - LOG_FILENAME = PATH + "/log.out" - - # Adding rotating support to default logger with customized format - rotHandler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=100000, backupCount=5) - formatter = logging.Formatter('%(asctime)s|%(levelname)s|%(module)s|%(funcName)s|%(message)s') - rotHandler.setFormatter(formatter) - logging.getLogger('').addHandler(rotHandler) - logging.getLogger('').setLevel(self.log_level) - + #Process command line options + self.startup_options = self.get_options() + #Setup logging + self.set_logging(self.startup_options.log_level) logging.debug('>>') self.data_path = data_path self.date = Date() + self.ddbb = None # Checking profile - #TODO configuration is first checked within profile, needs to be centralized - dgranda 2010.04.09 + logging.debug('Checking configuration and profile...') self.profile = Profile(self.data_path,self) - self.profile.isProfileConfigured() - self.windowmain = None - logging.debug('checking configuration...') - self.conf = checkConf() #TODO set this up so other modules can reference this and not have to duplicate this - logging.debug("clearing tmp directory %s" % self.conf.getValue("tmpdir")) - self.conf.clearTempDir() - self.filename = self.conf.getValue("conffile") - logging.debug('retrieving data from '+ self.filename) - self.configuration = XMLParser(self.filename) #TODO set this up so other modules can reference this and not have to duplicate this - if self.configuration.getValue("pytraining","prf_us_system") == "True": + if self.profile.getValue("pytraining","prf_us_system") == "True": #TODO perhaps move to use dict? self.prf_us_system = True else: self.prf_us_system = False - self.ddbb = DDBB(self.configuration) #TODO set this up so other modules can reference this and not have to duplicate this + self.ddbb = DDBB(self.profile) #TODO set this up so other modules can reference this and not have to duplicate this logging.debug('connecting to DDBB') self.ddbb.connect() #Get user's DB version - currentDB_version = self.configuration.getValue("pytraining","DB_version") + currentDB_version = self.profile.getValue("pytraining","DB_version") logging.debug("Current DB version: "+str(currentDB_version)) # DB check can be triggered either via new version (mandatory) or as runtime parameter (--check) - if self.check: # User requested check + if self.startup_options.check: # User requested check self.sanityCheck() elif currentDB_version is None: # No stored DB version - check DB etc self.sanityCheck() @@ -137,23 +94,14 @@ self.sanityCheck() else: logging.info('No sanity check requested') - self.record = Record(data_path,self) - #preparamos la ventana principal - self.windowmain = Main(data_path,self,self.version, gpxDir=self.conf.getValue("gpxdir")) + self.windowmain = Main(data_path,self,self.version, gpxDir=self.profile.gpxdir) self.date = Date(self.windowmain.calendar) - - #Preparamos el webservice - #TODO check reason for webservice - remove / change to optional start if not needed - #gtk.gdk.threads_init() - #self.webservice = webService(data_path,self.refreshWaypointView,self.newRecord) - #self.webservice.start() - self.waypoint = Waypoint(data_path,self) self.extension = Extension(data_path, self) self.plugins = Plugins(data_path, self) - self.importdata = Importdata(data_path, self, self.configuration) + self.importdata = Importdata(data_path, self, self.profile) self.loadPlugins() self.loadExtensions() self.windowmain.createGraphs(RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph) @@ -163,8 +111,44 @@ self.refreshMainSportList() self.windowmain.run() logging.debug('<<') + + + def get_options(self): + ''' + Define usage and accepted options for command line startup - def set_logging_level(self,level): + returns: options - dict with option: value pairs + ''' + usage = '''usage: %prog [options] + + For more help on valid options try: + %prog -h ''' + parser = OptionParser(usage=usage) + 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("--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() + return options + + def set_logging(self,level): + '''Setup rotating log file with customized format''' + PATH = os.environ['HOME']+"/.pytrainer" + if not os.path.exists(PATH): + os.mkdir(PATH) + LOG_FILENAME = PATH + "/log.out" + rotHandler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=100000, backupCount=5) + formatter = logging.Formatter('%(asctime)s|%(levelname)s|%(module)s|%(funcName)s|%(message)s') + rotHandler.setFormatter(formatter) + logging.getLogger('').addHandler(rotHandler) + self.set_logging_level(self.startup_options.log_level) + + def set_logging_level(self, level): + '''Set level of information written to log''' logging.debug("Setting logger to level: "+ str(level)) logging.getLogger('').setLevel(level) @@ -301,7 +285,7 @@ gpx_laps = None if iter: id_record = selected.get_value(iter,0) - gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx" %id_record + gpxfile = self.profile.gpxdir+"/%s.gpx" %id_record if os.path.isfile(gpxfile): gpx = Gpx(self.data_path,gpxfile) gpx_tracklist = gpx.getTrackList() @@ -318,15 +302,13 @@ if iter: id_record = selected.get_value(iter,0) record_list = self.record.getrecordInfo(id_record) - gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx" %id_record + gpxfile = self.profile.gpxdir+"/%s.gpx" %id_record if os.path.isfile(gpxfile): gpx = Gpx(self.data_path,gpxfile) gpx_tracklist = gpx.getTrackList() self.windowmain.actualize_heartrategraph(gpx_tracklist) - zones = getZones() - filename = self.conf.getValue("conffile") - configuration = XMLParser(filename) - karvonen_method = configuration.getValue("pytraining","prf_hrzones_karvonen") + zones = getZones() #TODO Huh, what is supposed to happen here??? + karvonen_method = self.profile.configuration.getValue("pytraining","prf_hrzones_karvonen") self.windowmain.actualize_hrview(record_list,zones,karvonen_method) logging.debug('<<') @@ -496,8 +478,8 @@ logging.debug('>>') logging.info('Checking database integrity') self.ddbb.checkDBIntegrity() - logging.info('Checking configuration file integrity') - self.profile.checkProfile() + #logging.info('Checking configuration file integrity') + #self.profile.checkProfile() logging.info('Setting DB version to: ' + str(self.DB_version)) - self.configuration.setValue("pytraining","DB_version", str(self.DB_version)) + self.profile.configuration.setValue("pytraining","DB_version", str(self.DB_version)) logging.debug('<<') Modified: pytrainer/trunk/pytrainer/plugins.py =================================================================== --- pytrainer/trunk/pytrainer/plugins.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/plugins.py 2010-04-14 08:33:10 UTC (rev 561) @@ -21,15 +21,15 @@ import logging from lib.xmlUtils import XMLParser -from lib.system import checkConf +#from lib.system import checkConf from gui.windowplugins import WindowPlugins class Plugins: def __init__(self, data_path = None, parent = None): self.data_path=data_path - self.conf = checkConf() - self.parent = parent + #self.conf = checkConf() + self.pytrainer_main = parent def getActivePlugins(self): retorno = [] @@ -61,35 +61,13 @@ pluginMain = getattr(module, plugin_classname) logging.debug('<<') #Only validate files if enabled at startup - if self.parent.validate: + if self.pytrainer_main.startup_options.validate: validate_inputfiles=True print "validating plugin input files enabled" else: validate_inputfiles=False return pluginMain(self, validate_inputfiles) - - - #def runPlugin(self,pathPlugin): - """ - logging.debug('>>') - info = XMLParser(pathPlugin+"/conf.xml") - bin = info.getValue("pytrainer-plugin","executable") - binary = pathPlugin+"/"+bin - params = "" - for opt in self.getPluginConfParams(pathPlugin): - if opt[0]!="status": - params += " --%s %s" %(opt[0],opt[1]) - logging.debug('Executing '+binary+' '+params) - gpxfile = os.popen("%s %s" %(binary,params)).read() - gpxfile = gpxfile.replace("\n","") - gpxfile = gpxfile.replace("\r","") - logging.debug('<<') - if gpxfile == "0": - return False - return gpxfile""" - - def managePlugins(self): pluginsList = self.getPluginsList() windowplugins = WindowPlugins(self.data_path, self) @@ -114,7 +92,7 @@ name = info.getValue("pytrainer-plugin","name") description = info.getValue("pytrainer-plugin","description") code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.conf.getValue("plugindir") + plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): status = 0 else: Modified: pytrainer/trunk/pytrainer/profile.py =================================================================== --- pytrainer/trunk/pytrainer/profile.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/profile.py 2010-04-14 08:33:10 UTC (rev 561) @@ -17,128 +17,201 @@ #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -import os +import os, sys import logging -from lib.system import checkConf -from lib.xmlUtils import XMLParser +#from lib.system import checkConf +#from lib.xmlUtils import XMLParser +from lxml import etree from lib.ddbb import DDBB class Profile: def __init__(self, data_path = None, parent = None): logging.debug(">>") - self.parent = parent - self.version = None + self.pytrainer_main = parent self.data_path = data_path - self.conf = checkConf() - self.filename = self.conf.getValue("conffile") - self.configuration = XMLParser(self.filename) - # Checks if configuration file is empty - if self.configuration.xmldoc is None: - logging.error("Seems no data available in local configuration file: "+self.filename+", please check") - logging.error("Fatal error, exiting") - exit(-3) - else: - logging.debug("Configuration retrieved: "+str(self.configuration.getOptions())) + self.xml_tree = None + self.home = None + self.tmpdir = None + self.confdir = None + self.conffile = None + self.gpxdir = None + self.extensiondir = None + self.plugindir = None + #Set configuration parameters - old system.checkConf() + self._setHome() + self._setConfFiles() + self._setTempDir() + self._setExtensionDir() + self._setPluginDir() + self._setGpxDir() + + #Clear temp dir + logging.debug("clearing tmp directory %s" % self.tmpdir) + self._clearTempDir() + + #Profile Options and Defaults + self.profile_options = { + "prf_name":"default", + "prf_gender":"", + "prf_weight":"", + "prf_height":"", + "prf_age":"", + "prf_ddbb":"sqlite", + "prf_ddbbhost":"", + "prf_ddbbname":"", + "prf_ddbbuser":"", + "prf_ddbbpass":"", + "version":"0.0", + "DB_version":"0", + "prf_us_system":"False", + "prf_hrzones_karvonen":"False", + "prf_maxhr":"", + "prf_minhr":"", + "auto_launch_file_selection":"False", + "import_default_tab":"0", + } + + #Parse pytrainer configuration file + self.config_file = self.conffile + self.configuration = self._parse_config_file(self.config_file) + logging.debug("Configuration retrieved: "+str(self.configuration)) + self.pytrainer_main.ddbb = DDBB(self, pytrainer_main=self.pytrainer_main) logging.debug("<<") - def isProfileConfigured(self): - logging.debug(">>") - if self.conf.getConfFile(): - #logging.debug("Profile found. ToDo: check integrity") - #self.checkProfile() - self.configuration = XMLParser(self.filename) - self.ddbb = DDBB(self.configuration) + def _setHome(self): + if sys.platform == "linux2": + variable = 'HOME' + elif sys.platform == "win32": + variable = 'USERPROFILE' else: - logging.debug("No profile found. Creating default one") - self.createDefaultConf() - logging.debug("<<") - return True + print "Unsupported sys.platform: %s." % sys.platform + sys.exit(1) + self.home = os.environ[variable] + + def _setTempDir(self): + self.tmpdir = self.confdir+"/tmp" + if not os.path.isdir(self.tmpdir): + os.mkdir(self.tmpdir) - def createDefaultConf(self): - logging.debug(">>") - conf_options = [ - ("prf_name","default"), - ("prf_gender",""), - ("prf_weight",""), - ("prf_height",""), - ("prf_age",""), - ("prf_ddbb","sqlite"), - ("prf_ddbbhost",""), - ("prf_ddbbname",""), - ("prf_ddbbuser",""), - ("prf_ddbbpass",""), - ("version","0.0"), - ("prf_us_system","False")] - self.setProfile(conf_options) - logging.debug("<<") + def _clearTempDir(self): + """Function to clear out the tmp directory that pytrainer uses + will only remove files + """ + if not os.path.isdir(self.tmpdir): + return + else: + files = os.listdir(self.tmpdir) + for name in files: + fullname = (os.path.join(self.tmpdir, name)) + if os.path.isfile(fullname): + os.remove(os.path.join(self.tmpdir, name)) + + def _setConfFiles(self): + if sys.platform == "win32": + self.confdir = self.home+"/pytrainer" + elif sys.platform == "linux2": + self.confdir = self.home+"/.pytrainer" + else: + print "Unsupported sys.platform: %s." % sys.platform + sys.exit(1) + self.conffile = self.confdir+"/conf.xml" + if not os.path.isdir(self.confdir): + os.mkdir(self.confdir) + + def _setGpxDir(self): + self.gpxdir = self.confdir+"/gpx" + if not os.path.isdir(self.gpxdir): + os.mkdir(self.gpxdir) + + def _setExtensionDir(self): + self.extensiondir = self.confdir+"/extensions" + if not os.path.isdir(self.extensiondir): + os.mkdir(self.extensiondir) + + def _setPluginDir(self): + self.plugindir = self.confdir+"/plugins" + if not os.path.isdir(self.plugindir): + os.mkdir(self.plugindir) - def setVersion(self,version): - logging.debug("--") - self.version = version + def getConfFile(self): + if not os.path.isfile(self.conffile): + return False + else: + return self.conffile - def setProfile(self,list_options): + def _parse_config_file(self, config_file): + ''' + Parse the xml configuration file and convert to a dict + + returns: dict with option as key + ''' + if config_file is None: + logging.error("Configuration file value not set") + elif not os.path.isfile(config_file): + logging.error("Configuration '%s' file does not exist" % config_file) + logging.info("No profile found. Creating default one") + self.setProfile(self.profile_options) + else: + logging.debug("Attempting to parse content from "+ config_file) + try: + self.xml_tree = etree.ElementTree(file=config_file) + #TODO check here for empty file.... + # Checks if configuration file is empty + #if self.configuration.xmldoc is None: + # logging.error("Seems no data available in local configuration file: "+self.filename+", please check") + # logging.error("Fatal error, exiting") + # exit(-3) + #Have a populated xml tree, get pytraining node (root) and convert it to a dict + pytraining_tag = self.xml_tree.getroot() + config = {} + config_needs_update = False + for key, default in self.profile_options.items(): + value = pytraining_tag.get(key) + #If property is not found, set it to the default + if value is None: + config_needs_update = True + value = default + config[key] = value + #Added a property, so update config + if config_needs_update: + self.setProfile(config) + return config + except Exception as e: + logging.error("Error parsing file: %s. Exiting" % config_file) + logging.error(str(e)) + logging.error("Fatal error, exiting") + exit(-3) + + def getValue(self, tag, variable): + if tag != "pytraining": + print "ERROR - pytraining is the only profile tag supported" + return None + elif not self.configuration.has_key(variable): + return None + return self.configuration[variable] + + def setValue(self, tag, variable, value): logging.debug(">>") - logging.debug("Retrieving data from "+ self.filename) - self.configuration = XMLParser(self.filename) - #list_options.append(("version",self.version)) - if not os.path.isfile(self.filename): - self.configuration.createXMLFile("pytraining",list_options) - for option in list_options: - logging.debug("Adding "+option[0]+"|"+option[1]) - self.configuration.setValue("pytraining",option[0],option[1]) - self.ddbb = DDBB(self.configuration) + if tag != "pytraining": + print "ERROR - pytraining is the only profile tag supported" + self.xml_tree.getroot().set(variable, value) logging.debug("<<") - def checkProfile(self): - """ 31.07.2008 - dgranda - Checks if all needed properties are in the configuration file - If not, property is created with default value - args: none - returns: none""" + def setProfile(self,list_options): logging.debug(">>") - logging.debug("Retrieving data from "+ self.filename) - self.configuration = XMLParser(self.filename) - currentList = self.configuration.getOptions() - currentListKeys = currentList.keys() - #logging.debug("Values retrieved from conf file: "+ str(currentList)) - logging.debug("Current keys: "+ str(currentListKeys)) - defaultList = [ - ("prf_name","default"), - ("prf_gender",""), - ("prf_weight",""), - ("prf_height",""), - ("prf_age",""), - ("prf_ddbb","sqlite"), - ("prf_ddbbhost",""), - ("prf_ddbbname",""), - ("prf_ddbbuser",""), - ("prf_ddbbpass",""), - ("prf_us_system","False"), - ("DB_version","0")] - defaultListKeys = [] - for entry in defaultList: - defaultListKeys.append(unicode(entry[0])) - logging.debug("Default values: "+ str(defaultList)) - #logging.debug("Default keys: "+ str(defaultListKeys)) - # Comparing fields - # http://mail.python.org/pipermail/python-list/2002-May/141458.html - tempDict = dict(zip(currentListKeys,currentListKeys)) - resultList = [x for x in defaultListKeys if x not in tempDict] - logging.info('Fields to be added: '+str(resultList)) - # Adding missing fields if necessary - for field in resultList: - pos = defaultListKeys.index(field) - logging.debug("Adding "+ str(defaultList[pos])) - self.configuration.setValue("pytraining",defaultList[pos][0],defaultList[pos][1]) + for option, value in list_options.items(): + logging.debug("Adding "+option+"|"+value) + self.setValue("pytraining",option,value) + self.xml_tree.write(self.config_file, xml_declaration=True) logging.debug("<<") def getSportList(self): logging.debug("--") - connection = self.ddbb.connect() + connection = self.pytrainer_main.ddbb.connect() if (connection == 1): logging.debug("retrieving sports info") - return self.ddbb.select("sports","name,met,weight,id_sports",None) + return self.pytrainer_main.ddbb.select("sports","name,met,weight,id_sports",None) else: return connection @@ -153,44 +226,45 @@ logging.debug(">>") logging.debug("Adding new sport: "+sport+"|"+weight+"|"+met) sport = [sport,met,weight] - self.ddbb.insert("sports","name,met,weight",sport) - sport_id = self.ddbb.select("sports","id_sports","name=\"%s\"" %(sport)) + self.pytrainer_main.ddbb.insert("sports","name,met,weight",sport) + sport_id = self.pytrainer_main.ddbb.select("sports","id_sports","name=\"%s\"" %(sport)) logging.debug("<<") return sport_id def delSport(self,sport): logging.debug(">>") condition = "name=\"%s\"" %sport - id_sport = self.ddbb.select("sports","id_sports",condition)[0][0] + id_sport = self.pytrainer_main.ddbb.select("sports","id_sports",condition)[0][0] logging.debug("removing records from sport "+ sport + " (id_sport: "+str(id_sport)+")") - self.ddbb.delete("records","sport=\"%d\""%id_sport) - self.ddbb.delete("sports","id_sports=\"%d\""%id_sport) + self.pytrainer_main.ddbb.delete("records","sport=\"%d\""%id_sport) + self.pytrainer_main.ddbb.delete("sports","id_sports=\"%d\""%id_sport) logging.debug("<<") def updateSport(self,oldnamesport,newnamesport,newmetsport,newweightsport): logging.debug("--") - self.ddbb.update("sports","name,met,weight",[newnamesport,newmetsport,newweightsport],"name=\"%s\""%oldnamesport) + self.pytrainer_main.ddbb.update("sports","name,met,weight",[newnamesport,newmetsport,newweightsport],"name=\"%s\""%oldnamesport) def getSportInfo(self,namesport): logging.debug("--") - return self.ddbb.select("sports","name,met,weight","name=\"%s\""%namesport)[0] + return self.pytrainer_main.ddbb.select("sports","name,met,weight","name=\"%s\""%namesport)[0] def build_ddbb(self): logging.debug("--") - self.ddbb.build_ddbb() + self.pytrainer_main.ddbb.build_ddbb() def editProfile(self): logging.debug(">>") from gui.windowprofile import WindowProfile logging.debug("retrieving configuration data") - list_options = self.configuration.getOptions() - profilewindow = WindowProfile(self.data_path, self, pytrainer_main=self.parent) + #Refresh configuration + self.configuration = self._parse_config_file(self.config_file) + profilewindow = WindowProfile(self.data_path, self, pytrainer_main=self.pytrainer_main) logging.debug("setting data values") - profilewindow.setValues(list_options) + profilewindow.setValues(self.configuration) profilewindow.run() logging.debug("<<") def actualize_mainsportlist(self): logging.debug("--") - self.parent.refreshMainSportList() + self.pytrainer_main.refreshMainSportList() Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2010-04-11 19:26:32 UTC (rev 560) +++ pytrainer/trunk/pytrainer/record.py 2010-04-14 08:33:10 UTC (rev 561) @@ -34,17 +34,10 @@ def __init__(self, data_path = None, parent = None): logging.debug('>>') self.parent = parent + self.pytrainer_main = parent self.data_path = data_path logging.debug('setting date...') self.date = Date() - logging.debug('Checking current configuration...') - self.conf = checkConf() #TODO change to reference main versions of these - self.filename = self.conf.getValue("conffile") # - logging.debug('Retrieving data from '+ self.filename) # - self.configuration = XMLParser(self.filename) # - self.ddbb = DDBB(self.configuration) # - logging.debug('connecting to DDBB') # - self.ddbb.connect() # logging.debug('<<') def newRecord(self, list_sport, date, title=None, distance=None, time=None, upositive=None, unegative=None, bpm=None, calories=None, comment=None): @@ -64,10 +57,9 @@ def editRecord(self,id_record,list_sport): logging.debug('>>') - #record = self.ddbb.select("records", "*", "id_record=\"%s\"" %id_record) - record = self.ddbb.select("records", "id_record, date, sport, distance, time, beats, average, calories, comments, gpslog, title, upositive, unegative, maxspeed, maxpace, pace, maxbeats, date_time_utc, date_time_local", "id_record=\"%s\"" %id_record) + record = self.pytrainer_main.ddbb.select("records", "id_record, date, sport, distance, time, beats, average, calories, comments, gpslog, title, upositive, unegative, maxspeed, maxpace, pace, maxbeats, date_time_utc, date_time_local", "id_record=\"%s\"" %id_record) logging.debug('retrieving data from DB: '+str(record)) - gpxfile = self.conf.getValue("gpxdir")+"/%d.gpx"%int(id_record) + gpxfile = self.pytrainer_main.profile.gpxdir+"/%d.gpx"%int(id_record) logging.debug('gpx file associated: '+gpxfile) self.recordwindow = WindowRecord(self.data_path, list_sport,self, None, windowTitle=_("Edit Entry")) if os.path.isfile(gpxfile): @@ -82,10 +74,10 @@ def removeRecord(self,id_record): logging.debug('>>') - record = self.ddbb.delete("records", "id_record=\"%s\"" %id_record) - laps = self.ddbb.delete("laps", "record=\"%s\"" %id_record) + record = self.pytrainer_main.ddbb.delete("records", "id_record=\"%s\"" %id_record) + laps = self.pytrainer_main.ddbb.delete("laps", "record=\"%s\"" %id_record) logging.debug('removed record '+str(id_record)+' (and associated laps) from DB') - gpxfile = self.conf.getValue("gpxdir")+"/%d.gpx"%int(id_record) + gpxfile = self.pytrainer_main.profile.gpxdir+"/%d.gpx"%int(id_record) if os.path.isfile(gpxfile): os.remove(gpxfile) logging.debug('removed gpxfile '+gpxfile) @@ -100,7 +92,7 @@ list_options["rcd_beats"] = 0 #calculate the sport id - sport_id = self.ddbb.select("sports","id_sports","name=\"%s\"" %list_options["rcd_sport"])[0][0] + sport_id = self.pytrainer_main.ddbb.select("sports","id_sports","name=\"%s\"" %list_options["rcd_sport"])[0][0] values= ( list_options["rcd_date"], @@ -167,9 +159,9 @@ return None logging.debug('list_options: '+str(list_options)) cells,values = self._formatRecordNew(list_options) - self.ddbb.insert("records",cells,values) + self.pytrainer_main.ddbb.insert("records",cells,values) logging.debug('DB updated: '+str(cells)+' | '+str(values)) - id_record = self.ddbb.lastRecord("records") + id_record = self.pytrainer_main.ddbb.lastRecord("records") #Create entry(s) for activity in laps table if laps is not None: for lap in laps: @@ -179,13 +171,13 @@ self.insertLaps(lap_keys,lap.values()) gpxOrig = list_options["rcd_gpxfile"] if os.path.isfile(gpxOrig): - gpxDest = self.conf.getValue("gpxdir") + gpxDest = self.pytrainer_main.profile.gpxdir gpxNew = gpxDest+"/%d.gpx"%id_record shutil.move(gpxOrig, gpxNew) logging.debug('Moving '+gpxOrig+' to '+gpxNew) #self.parent.refreshListRecords() logging.debug('<<') - return self.ddbb.lastRecord("records") + return self.pytrainer_main.ddbb.lastRecord("records") def insertNewRecord(self, gpxOrig, entry): #TODO consolidate with insertRecord """29.03.2008 - dgranda @@ -272,7 +264,7 @@ def updateRecord(self, list_options, id_record): logging.debug('>>') - gpxfile = self.conf.getValue("gpxdir")+"/%d.gpx"%int(id_record) + gpxfile = self.pytrainer_main.profile.gpxdir+"/%d.gpx"%int(id_record) gpxOrig = list_options["rcd_gpxfile"] if os.path.isfile(gpxOrig): if gpxfile != gpxOrig: @@ -282,7 +274,7 @@ logging.debug('removing gpxfile') # ein? logging.debug('updating bbdd') #ein? cells,values = self._formatRecord(list_options) - self.ddbb.update("records",cells,values," id_record=%d" %int(id_record)) + self.pytrainer_main.ddbb.update("records",cells,values," id_record=%d" %int(id_record)) self.parent.refreshListView() logging.debug('<<') @@ -298,24 +290,24 @@ def getrecordInfo(self,id_record): logging.debug('--') - return self.ddbb.select("records,sports", + return self.pytrainer_main.ddbb.select("records,sports", "sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats,date_time_utc,date_time_local", "id_record=\"%s\" and records.sport=sports.id_sports" %id_record) def getrecordList(self,date): logging.debug('--') - return self.ddbb.select("records,sports", + return self.pytrainer_main.ddbb.select("records,sports", "sports.name,date,distance,time,beats,comments,average,calories,id_record,maxspeed,maxbeats,date_time_utc,date_time_local", "date=\"%s\" and records.sport=sports.id_sports" %date) def getLaps(self, id_record): logging.debug('--') - laps = self.ddbb.select("laps", + laps = self.pytraine... [truncated message content] |
From: <dg...@us...> - 2010-04-11 19:26:38
|
Revision: 560 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=560&view=rev Author: dgranda Date: 2010-04-11 19:26:32 +0000 (Sun, 11 Apr 2010) Log Message: ----------- Tagging 1.7.2 release Added Paths: ----------- pytrainer/tags/1.7.2/ Property changes on: pytrainer/tags/1.7.2 ___________________________________________________________________ Added: svn:mergeinfo + /pytrainer/branches/plugins-v2:345-382 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-11 19:21:19
|
Revision: 559 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=559&view=rev Author: dgranda Date: 2010-04-11 19:21:13 +0000 (Sun, 11 Apr 2010) Log Message: ----------- Updated changelog for version 1.7.2 Modified Paths: -------------- pytrainer/trunk/CHANGES Modified: pytrainer/trunk/CHANGES =================================================================== --- pytrainer/trunk/CHANGES 2010-04-11 19:01:56 UTC (rev 558) +++ pytrainer/trunk/CHANGES 2010-04-11 19:21:13 UTC (rev 559) @@ -1,5 +1,38 @@ See the pytrainer roadmap for more information http://sourceforge.net/apps/trac/pytrainer/roadmap +- PyTrainer changes for 1.7.2: + + * Lap DB table created and code changed to populate and use the table [507] [508] [509] + * Moved some global variables to class variables in main.py [513] + * Google Earth plugin modified to work with new plugin architecture [515] + * Waypoint editor modified to use handle_title_changed() call back instead of SOAP calls (thanks to David Fraser) and a few bugs fixed [516] [524] [543] + * Firefox removed as a dependency [518] + * Shebang tidied to be compatible with all python versions [520] + * Extension code refactored to run extensions as internal classes [527] + * Webservice / SOAP code removed [527] [531] + * Incomplete webpublish extension removed from svn [528] + * Upload to Openstreetmap extension added [536], [540] + * pytrainer startup script modified to work with different install locations [532] [533] + * Misc fixes and patches to pytrainer (thanks to David Fraser) [524] [530] [535] + * Add support for with command for python versions <2.6 [541] + * Removed bug that caused errors for activities with no GPX file [542] + * Localisation updates [539] + * New tab in preferences displays and allows changes to be made to pytrainer startup options [544] [545] [546] + * Move individual screens into separate glade files [547] + * Full screen map view reinstated [548] + * Removed DB field order bug [549] + * Removed fake error when importing entries [550] + * Minor fixes to graph display options [551] + * Minor cosmetic changes [552] [553] [554] + * Added check for early detection of empty local configuration file [555] + * EXPERIMENTAL Unified Import GUI modifications (disabled by default, enabled on startup with --testimport) [526] + o file import supports multiple files at once [510] [511] + o option to have file import window automatically start with a file selection dialog [519] + o activities can be edited before import [514] [517] [521] [522] [534] [537] [538] + o kml file import support [523] [525] + o plugins tab added - provides alternative way of viewing and running import plugins [512] + o device import NOT functional + - PyTrainer changes for 1.7.1: * New import plugin - Garmintools - svn [430], [431], [436], [452], [453], [459], [460], [461], [463], [464], [486], [487], [488] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-11 19:02:02
|
Revision: 558 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=558&view=rev Author: dgranda Date: 2010-04-11 19:01:56 +0000 (Sun, 11 Apr 2010) Log Message: ----------- Updating version to 1.7.2 Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py pytrainer/trunk/setup.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-11 19:01:06 UTC (rev 557) +++ pytrainer/trunk/pytrainer/main.py 2010-04-11 19:01:56 UTC (rev 558) @@ -63,7 +63,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.1_svn#555" + self.version ="1.7.2" self.DB_version = 3 #Setup usage and permitted options Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2010-04-11 19:01:06 UTC (rev 557) +++ pytrainer/trunk/setup.py 2010-04-11 19:01:56 UTC (rev 558) @@ -15,7 +15,7 @@ return "share/pytrainer/extensions/%s"%extension_name, glob("extensions/%s/*"%extension_name) setup( name="pytrainer", - version="1.7.1", + version="1.7.2", description="The free sport tracking center", long_description="Pytrainer is a tool to log all your sport excursion coming from GPS devices (with a focus on ForeRunner 205, 305 and 405) or GPX (http://www.topografix.com) files. Pytrainer supports GPS track files and displays it in graphs, maps... ", author="Fiz Vazquez, John Blance, David Garcia Granda", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-11 19:01:12
|
Revision: 557 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=557&view=rev Author: dgranda Date: 2010-04-11 19:01:06 +0000 (Sun, 11 Apr 2010) Log Message: ----------- Removing old entries and updating reference version to 1.7.2 Modified Paths: -------------- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo =================================================================== (Binary files differ) Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2010-04-10 12:48:06 UTC (rev 556) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2010-04-11 19:01:06 UTC (rev 557) @@ -5,11 +5,11 @@ # msgid "" msgstr "" -"Project-Id-Version: pytrainer 1.7.1\n" +"Project-Id-Version: pytrainer 1.7.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-10 14:27+0200\n" -"PO-Revision-Date: 2010-04-10 14:42+0100\n" -"Last-Translator: David García Granda <dg...@gm...>\n" +"POT-Creation-Date: 2010-04-11 19:56+0200\n" +"PO-Revision-Date: 2010-04-11 19:59+0100\n" +"Last-Translator: David Garcia Granda <dg...@gm...>\n" "Language-Team: Spanish <es...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1663,240 +1663,3 @@ msgid "Please add any additional information for this upload" msgstr "Por favor indique información adicional para este envío" -#~ msgid "_Import" -#~ msgstr "_Importar" - -#~ msgid "_Export as Text Separated by Commas" -#~ msgstr "_Exportar como texto separado por comas" - -#~ msgid "Edit Record" -#~ msgstr "Editar registro" - -#~ msgid "Show graph in classic view" -#~ msgstr "Mostrar en vista clásica" - -#~ msgid "Clear" -#~ msgstr "Limpiar" - -#~ msgid "<b>Select a file to import</b>" -#~ msgstr "<b>Seleccionar fichero a importar</b>" - -#~ msgid "Velocity (km/h)" -#~ msgstr "Velocidad (km/h)" - -#~ msgid "<b>Velocity</b>" -#~ msgstr "<b>Velocidad</b>" - -#~ msgid "Unknown file type" -#~ msgstr "Tipo de fichero desconocido" - -#~ msgid "Import Success" -#~ msgstr "Importación satisfactoria" - -#~ msgid "<b>Date Time:</b>" -#~ msgstr "<b>Fecha:</b>" - -#~ msgid " " -#~ msgstr " " - -#~ msgid " " -#~ msgstr " " - -#~ msgid "<b>Time:</b>" -#~ msgstr "<b>Tiempo:</b>" - -#~ msgid "Time:" -#~ msgstr "Tiempo:" - -#~ msgid "January" -#~ msgstr "Enero" - -#~ msgid "Febrary" -#~ msgstr "Febrero" - -#~ msgid "March" -#~ msgstr "Marzo" - -#~ msgid "April" -#~ msgstr "Abril" - -#~ msgid "May" -#~ msgstr "Mayo" - -#~ msgid "June" -#~ msgstr "Junio" - -#~ msgid "July" -#~ msgstr "Julio" - -#~ msgid "August" -#~ msgstr "Agosto" - -#~ msgid "September" -#~ msgstr "Septiembre" - -#~ msgid "October" -#~ msgstr "Octubre" - -#~ msgid "November" -#~ msgstr "Noviembre" - -#~ msgid "December" -#~ msgstr "Diciembre" - -#, fuzzy -#~ msgid "Kilometers" -#~ msgstr "Kilómetros" - -#, fuzzy -#~ msgid "Daily kilometers" -#~ msgstr "Kilómetros diarios" - -#, fuzzy -#~ msgid "Beats per Minute" -#~ msgstr "pulsaciones por minuto" - -#, fuzzy -#~ msgid "Daily Beats" -#~ msgstr "pulsaciones diarias" - -#~ msgid "kilometers" -#~ msgstr "Kilometros" - -#~ msgid "monthly kilometers" -#~ msgstr "Kilometros mensuales" - -#~ msgid "time in hours" -#~ msgstr "Tiempo en horas" - -#~ msgid "beats per minute" -#~ msgstr "pulsaciones por minuto" - -#~ msgid "monthly beats" -#~ msgstr "pulsaciones mensuales" - -#~ msgid "calories" -#~ msgstr "calorias" - -#~ msgid "Week View" -#~ msgstr "Vista semanal" - -#~ msgid " Km" -#~ msgstr "km" - -#~ msgid " km/h" -#~ msgstr "Km/h" - -#~ msgid "<b>Positive:</b>" -#~ msgstr "<b>Positivo:</b>" - -#~ msgid "<b>Negative:</b>" -#~ msgstr "<b>Negativo:</b>" - -#~ msgid " <b>Name:</b>" -#~ msgstr "<b>Nombre:</b>" - -#~ msgid " <b>Description:</b>" -#~ msgstr "<b>Descripción:</b>" - -#~ msgid "Calculate Distance" -#~ msgstr "Calcular Distancia" - -#~ msgid "Calculate Average" -#~ msgstr "Calcular Media" - -#~ msgid "Profile" -#~ msgstr "Perfil" - -#~ msgid "Age" -#~ msgstr "Edad" - -#~ msgid "Database" -#~ msgstr "Base de datos" - -#~ 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 "" -#~ "Estás a punto de borrar un deporte. Cuando tu borras \n" -#~ "un deporte borras también la lista de registros asociados\n" -#~ "en la base de datos. ¿Estás seguro de que es ésto lo que \n" -#~ "quieres hacer?" - -#~ msgid "pytrainer" -#~ msgstr "pytrainer" - -#~ msgid "(c) Fiz Vazquez <vu...@si...>" -#~ msgstr " " - -#~ msgid "The free sport trainning center" -#~ msgstr "El centro de entrenamiento libre" - -#~ msgid "pytrainer.e-oss.net" -#~ msgstr " " - -#~ 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 " " - -#~ msgid "window2" -#~ msgstr "window2" - -#~ msgid "No Active Plugins" -#~ msgstr "No hay plugins activos" - -#~ msgid "No Active Extensions" -#~ msgstr "No hay extensiones activas" - -#~ msgid "" -#~ "You are going to remove one database entry. Are you sure yo want do it?" -#~ msgstr "" -#~ "Estás a punto de borrar una entrada en la base de datos. Estás seguro de " -#~ "que quieres hacer eso?" - -#~ msgid "You are going to remove one waypoint. Are you sure yo want do it?" -#~ msgstr "" -#~ "Estás a punto de borrar una entrada en la base de datos. Estás seguro de " -#~ "que quieres hacer eso?" - -#~ msgid "unActive" -#~ msgstr "inActivo" - -#~ 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 "" -#~ "Parece que el archivo gpx contiene varios registros de rutas. Presione " -#~ "Cancelar para seleccionar una ruta. Selecciona aceptar para " -#~ "seleccionarlos todos como una unica ruta." - -#~ msgid "Km/day" -#~ msgstr "Km/dia" - -#~ msgid "bpm/day" -#~ msgstr "ppm/dia" - -#~ msgid "km/h/day" -#~ msgstr "km/h/dia" - -#~ msgid "cal/day" -#~ msgstr "cal/dia" - -#~ msgid "time/day" -#~ msgstr "tiempo/dia" - -#~ msgid "Export " -#~ msgstr "Exportar" - -#~ msgid "Kj/day" -#~ msgstr "Kj/dia" - -#~ msgid "Press Here to create the database" -#~ msgstr "Presiona aqui para crear la base de datos" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-10 12:48:13
|
Revision: 556 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=556&view=rev Author: dgranda Date: 2010-04-10 12:48:06 +0000 (Sat, 10 Apr 2010) Log Message: ----------- Updated ES localization Modified Paths: -------------- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo =================================================================== (Binary files differ) Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2010-04-09 17:32:16 UTC (rev 555) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2010-04-10 12:48:06 UTC (rev 556) @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: pytrainer 1.7.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-20 17:33+0100\n" -"PO-Revision-Date: 2010-03-20 17:33+0100\n" +"POT-Creation-Date: 2010-04-10 14:27+0200\n" +"PO-Revision-Date: 2010-04-10 14:42+0100\n" "Last-Translator: David García Granda <dg...@gm...>\n" "Language-Team: Spanish <es...@li...>\n" "MIME-Version: 1.0\n" @@ -21,7 +21,7 @@ msgstr "Calendario" #: glade/extensions.glade:9 -#: glade/pytrainer.glade:201 +#: glade/pytrainer.glade:162 msgid "Extensions" msgstr "Extensiones" @@ -35,7 +35,7 @@ #: glade/extensions.glade:82 #: glade/plugins.glade:144 -#: glade/profile.glade:1279 +#: glade/profile.glade:744 msgid "Name:" msgstr "Nombre:" @@ -46,7 +46,7 @@ #: glade/extensions.glade:110 #: glade/plugins.glade:86 -#: glade/pytrainer.glade:8163 +#: glade/pytrainer.glade:4728 msgid "Description:" msgstr "<b>Descripción:</b>" @@ -198,7 +198,7 @@ #: glade/newrecord.glade:560 #: glade/newrecord.glade:698 #: glade/newrecord.glade:959 -#: glade/profile.glade:2417 +#: glade/profile.glade:1404 msgid "Calculate" msgstr "Calcular" @@ -208,16 +208,16 @@ #: glade/newrecord.glade:281 #: glade/newrecord.glade:308 -#: glade/pytrainer.glade:1475 -#: glade/pytrainer.glade:1525 -#: glade/pytrainer.glade:3271 -#: glade/pytrainer.glade:3321 -#: glade/pytrainer.glade:4399 -#: glade/pytrainer.glade:4449 -#: glade/pytrainer.glade:5541 -#: glade/pytrainer.glade:5591 -#: glade/pytrainer.glade:6836 -#: glade/pytrainer.glade:6886 +#: glade/pytrainer.glade:833 +#: glade/pytrainer.glade:855 +#: glade/pytrainer.glade:2038 +#: glade/pytrainer.glade:2060 +#: glade/pytrainer.glade:2651 +#: glade/pytrainer.glade:2673 +#: glade/pytrainer.glade:3276 +#: glade/pytrainer.glade:3298 +#: glade/pytrainer.glade:3976 +#: glade/pytrainer.glade:3998 msgid ":" msgstr ":" @@ -226,8 +226,8 @@ msgstr "Fecha:" #: glade/newrecord.glade:406 -#: glade/pytrainer.glade:4763 -#: glade/pytrainer.glade:5905 +#: glade/pytrainer.glade:2843 +#: glade/pytrainer.glade:3468 msgid " " msgstr " " @@ -240,7 +240,7 @@ msgstr "12:00:00" #: glade/newrecord.glade:488 -#: glade/profile.glade:2467 +#: glade/profile.glade:1442 msgid "<b>General</b>" msgstr "<b>General:</b>" @@ -293,7 +293,7 @@ msgstr "Pulsaciones" #: glade/newrecord.glade:903 -#: pytrainer/gui/windowmain.py:730 +#: pytrainer/gui/windowmain.py:755 #: pytrainer/monthgraph.py:77 #: pytrainer/yeargraph.py:78 #: pytrainer/weekgraph.py:123 @@ -332,120 +332,120 @@ msgid "nameEntry" msgstr "Nombre entrada" -#: glade/profile.glade:8 +#: glade/profile.glade:7 msgid "Preferences" msgstr "Preferencias" -#: glade/profile.glade:82 +#: glade/profile.glade:43 msgid "Metric system" msgstr "Sistema métrico" -#: glade/profile.glade:104 +#: glade/profile.glade:57 msgid "U.S. customary units" msgstr "Sistema americano" -#: glade/profile.glade:130 +#: glade/profile.glade:79 msgid "<b>System of Measurement</b>" msgstr "<b>Sistema de medida</b>" -#: glade/profile.glade:190 +#: glade/profile.glade:115 msgid "Database type:" msgstr "Tipo de base de datos" -#: glade/profile.glade:218 +#: glade/profile.glade:126 msgid "Database host:" msgstr "Servidor base de datos" -#: glade/profile.glade:267 +#: glade/profile.glade:152 msgid "Database name:" msgstr "Nombre base de datos" -#: glade/profile.glade:335 +#: glade/profile.glade:191 msgid "Database user:" msgstr "Usuario base de datos" -#: glade/profile.glade:363 +#: glade/profile.glade:206 msgid "Database pass:" msgstr "Contraseña base de datos" -#: glade/profile.glade:437 +#: glade/profile.glade:257 msgid "<b>Database</b>" msgstr "<b>Base de datos:</b>" -#: glade/profile.glade:497 +#: glade/profile.glade:293 msgid "Use this port for internal connections: " msgstr "Use este puerto para conexiones internas" -#: glade/profile.glade:548 +#: glade/profile.glade:318 msgid "<small><b>Note:</b> Change this only if you know what you are doing</small>" msgstr "<small><b>Nota:</b> cambie esto solamente si sabe lo que hace</small>" -#: glade/profile.glade:580 +#: glade/profile.glade:336 msgid "<b>Port Connnection</b>" msgstr "<b>Puerto de conexión:</b>" -#: glade/profile.glade:616 +#: glade/profile.glade:355 msgid "General" msgstr "General" -#: glade/profile.glade:669 +#: glade/profile.glade:384 msgid "User name:" msgstr "Nombre de usuario:" -#: glade/profile.glade:697 +#: glade/profile.glade:395 msgid "Gender:" msgstr "Género:" -#: glade/profile.glade:743 +#: glade/profile.glade:422 msgid "Height:" msgstr "Altura:" -#: glade/profile.glade:814 +#: glade/profile.glade:462 msgid "Date of birth:" msgstr "Fecha de nacimiento:" -#: glade/profile.glade:926 +#: glade/profile.glade:535 msgid "Weight:" msgstr "Peso:" -#: glade/profile.glade:958 +#: glade/profile.glade:557 msgid "<b>Athlete Details</b>" msgstr "<b>Datos personales</b>" -#: glade/profile.glade:987 +#: glade/profile.glade:572 msgid "Athlete" msgstr "Atleta" -#: glade/profile.glade:1170 +#: glade/profile.glade:687 msgid "<b>Sport List</b>" msgstr "<b>Lista de deportes</b>" -#: glade/profile.glade:1199 +#: glade/profile.glade:699 msgid "llist" msgstr "lista" -#: glade/profile.glade:1307 +#: glade/profile.glade:755 msgid "M.E.T.:" msgstr "M.E.T.:" -#: glade/profile.glade:1356 +#: glade/profile.glade:782 msgid "Extra Weight:" msgstr "Peso extra:" -#: glade/profile.glade:1430 -#: glade/profile.glade:2028 +#: glade/profile.glade:818 +#: glade/profile.glade:1171 msgid "More information on determining yor M.E.T sport coefficient on Wikipedia" msgstr "Más información sobre el coeficiente M.E.T. en Wikipedia" -#: glade/profile.glade:1534 +#: glade/profile.glade:900 msgid "<b>Add New Sport</b>" msgstr "<b>Añadir nuevo deporte</b>" -#: glade/profile.glade:1563 +#: glade/profile.glade:915 msgid "new" msgstr "nuevo" -#: glade/profile.glade:1623 +#: glade/profile.glade:948 msgid "" "Deleting a sport removes associated records.\n" "Continue?" @@ -453,306 +453,378 @@ "Si borra un deporte elimina sus registros asociados.\n" "¿Desea continuar?" -#: glade/profile.glade:1763 +#: glade/profile.glade:1030 msgid "<b>Delete Sport</b>" msgstr "<b>Borrar deporte</b>" -#: glade/profile.glade:1787 -#: glade/pytrainer.glade:2975 -#: glade/pytrainer.glade:8368 +#: glade/profile.glade:1041 +#: glade/pytrainer.glade:1884 +#: glade/pytrainer.glade:4857 msgid "label-2147483648" msgstr " " -#: glade/profile.glade:1823 +#: glade/profile.glade:1062 msgid "delete" msgstr "borrar" -#: glade/profile.glade:1882 +#: glade/profile.glade:1096 msgid "Name" msgstr "Nombre" -#: glade/profile.glade:1931 +#: glade/profile.glade:1119 msgid "M.E.T." msgstr "M.E.T." -#: glade/profile.glade:1980 -#: pytrainer/gui/windowprofile.py:69 +#: glade/profile.glade:1146 +#: pytrainer/gui/windowprofile.py:71 msgid "Extra Weight" msgstr "Peso extra" -#: glade/profile.glade:2138 +#: glade/profile.glade:1252 msgid "<b>Edit Sport</b>" msgstr "<b>Editar deporte</b>" -#: glade/profile.glade:2162 +#: glade/profile.glade:1263 msgid "<b>lalaal</b>" msgstr "<b>lalaal</b>" -#: glade/profile.glade:2198 +#: glade/profile.glade:1285 msgid "edit" msgstr "editar" -#: glade/profile.glade:2227 +#: glade/profile.glade:1301 msgid "Sports" msgstr "Deportes" -#: glade/profile.glade:2286 +#: glade/profile.glade:1335 msgid "Maximum heart rate:" msgstr "Pulsaciones máximas:" -#: glade/profile.glade:2314 +#: glade/profile.glade:1346 msgid "Resting heart rate:" msgstr "Pulsaciones en reposo:" -#: glade/profile.glade:2388 +#: glade/profile.glade:1391 msgid "<small><b>Note:</b> Maximum heart rate is calculated by subtracting the number 220 minus your age. </small>" msgstr "<small><b>Nota:</b> el número máximo de pulsaciones se calcula con la siguiente fórmula: 220 menos su edad. </small>" -#: glade/profile.glade:2527 +#: glade/profile.glade:1478 msgid "<small><b>NOTE:</b> in order to use the Karvonen method you must cover the Resting hr field.</small>" msgstr "<small><b>Nota:</b> rellene todos los campos relativos a pulsaciones si usa el método Karvonen</small>" -#: glade/profile.glade:2556 +#: glade/profile.glade:1491 msgid "Percentages based method" msgstr "Basado en porcentajes" -#: glade/profile.glade:2578 -#: pytrainer/gui/windowmain.py:301 +#: glade/profile.glade:1507 +#: pytrainer/gui/windowmain.py:308 msgid "Karvonen method" msgstr "Karvonen" -#: glade/profile.glade:2600 +#: glade/profile.glade:1528 msgid "Select how to calculate your heart rate zones." msgstr "Seleccione cómo calcular las zonas de frecuencia cardiaca" -#: glade/profile.glade:2632 +#: glade/profile.glade:1567 msgid "<b>Heart Rate Zones</b>" msgstr "<b>Zonas de frecuencia cardiaca</b>" -#: glade/profile.glade:2668 -#: pytrainer/recordgraph.py:99 +#: glade/profile.glade:1589 +#: pytrainer/recordgraph.py:120 #: pytrainer/heartrategraph.py:38 #: pytrainer/daygraph.py:56 msgid "Heart Rate" msgstr "Pulsaciones" -#: glade/pytrainer.glade:8 +#: glade/profile.glade:1616 +msgid "Log Level" +msgstr "Nivel de log" + +#: glade/profile.glade:1624 +msgid "" +"Error\n" +"Warning\n" +"Info\n" +"Debug" +msgstr "" +"Error\n" +"Advertencia\n" +"Información\n" +"Depuración" + +#: glade/profile.glade:1642 +msgid "<small>What level of detail is written to the log?</small>" +msgstr "<small>¿Qué nivel de detalle existe en el fichero de log?</small>" + +#: glade/profile.glade:1656 +msgid "Validate" +msgstr "Validar" + +#: glade/profile.glade:1665 +msgid "--valid" +msgstr "--valid" + +#: glade/profile.glade:1686 +msgid "<small>Do the plugins attempt to validate the input file before processing?</small>" +msgstr "<small>¿Intentan los plugins validar el fichero de entrada antes de procesarlo?</small>" + +#: glade/profile.glade:1702 +msgid "Check" +msgstr "Comprobación" + +#: glade/profile.glade:1711 +msgid "--check" +msgstr "--check" + +#: glade/profile.glade:1731 +msgid "<small>Was a configuration and database check requested?</small>" +msgstr "<small>¿Existió una petición para comprobar la configuración y la base de datos?</small>" + +#: glade/profile.glade:1747 +msgid "Googlemaps v3" +msgstr "Googlemaps v3" + +#: glade/profile.glade:1757 +msgid "--gmaps2*" +msgstr "--gmaps2*" + +#: glade/profile.glade:1779 +msgid "<small>Is the Googlemaps API version 3 in use?</small>" +msgstr "<small>¿Se usa la versión 3 de la API de Googlemaps?</small>" + +#: glade/profile.glade:1795 +msgid "Unified Import" +msgstr "Importar" + +#: glade/profile.glade:1804 +msgid "--testimport" +msgstr "--testimport" + +#: glade/profile.glade:1825 +msgid "<small>Is the Unified Importer active?</small>" +msgstr "<small>¿Está habilitado el importador unificado?</small>" + +#: glade/profile.glade:1850 +msgid "<small>This screen shows the state of command line configurable options for pytrainer. These options can be changed here which will affect the current instance of pytrainer, they will not be remembered next time though</small>" +msgstr "<small>Esta pantalla muestra el estado de las opciones que se pueden configurar mediante línea de comandos para PyTrainer. Los cambios que se hagan únicamente tendrán efecto en la presente ejecución de pytrainer y no serán recordados en el futuro</small>" + +#: glade/profile.glade:1866 +msgid "<small>* Note Googlemaps API version 3 is on by default, use --gmaps2 to switch it off</small>" +msgstr "<small>* Se usa por defecto la versión 3 de la API de Googlemaps, utilice --gmaps2 para desactivarla</small>" + +#: glade/profile.glade:1882 +msgid "Startup Parameters" +msgstr "Configuración inicio" + +#: glade/pytrainer.glade:7 msgid "window1" msgstr "Ventana1" -#: glade/pytrainer.glade:48 +#: glade/pytrainer.glade:24 msgid "_File" msgstr "_Archivo" -#: glade/pytrainer.glade:66 -msgid "_Import" -msgstr "_Importar" - -#: glade/pytrainer.glade:81 -msgid "_Export as Text Separated by Commas" -msgstr "_Exportar como texto separado por comas" - -#: glade/pytrainer.glade:121 +#: glade/pytrainer.glade:93 msgid "_Edit" msgstr "_Editar" -#: glade/pytrainer.glade:143 +#: glade/pytrainer.glade:113 msgid "_View" msgstr "_Ver" -#: glade/pytrainer.glade:152 +#: glade/pytrainer.glade:120 msgid " _Classic View" msgstr "Vista _clásica" -#: glade/pytrainer.glade:163 +#: glade/pytrainer.glade:130 msgid " _List View" msgstr "_Listado de registros" -#: glade/pytrainer.glade:175 +#: glade/pytrainer.glade:140 msgid " _Waypoints Editor" msgstr "Editor de _waypoints" -#: glade/pytrainer.glade:191 +#: glade/pytrainer.glade:154 msgid "Tools" msgstr "Herramientas" -#: glade/pytrainer.glade:211 +#: glade/pytrainer.glade:171 msgid "GPS Device Plugins" msgstr "Plugins de dispositivos GPS" -#: glade/pytrainer.glade:225 +#: glade/pytrainer.glade:184 msgid "_Help" msgstr "_Ayuda" -#: glade/pytrainer.glade:345 -#: pytrainer/gui/windowmain.py:63 -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:726 +#: glade/pytrainer.glade:276 +#: pytrainer/gui/windowmain.py:65 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:751 #: pytrainer/gui/windowimportdata.py:333 #: pytrainer/gui/windowrecord.py:147 -#: pytrainer/gui/windowprofile.py:69 +#: pytrainer/gui/windowprofile.py:71 msgid "Sport" msgstr "Deporte" -#: glade/pytrainer.glade:371 +#: glade/pytrainer.glade:288 msgid "All Sports" msgstr "Todos los deportes" -#: glade/pytrainer.glade:564 +#: glade/pytrainer.glade:395 msgid "<b>Sport:</b>" msgstr "<b>Deporte:</b>" -#: glade/pytrainer.glade:592 -#: glade/pytrainer.glade:3212 -#: glade/pytrainer.glade:4340 -#: glade/pytrainer.glade:5482 -#: glade/pytrainer.glade:6777 +#: glade/pytrainer.glade:407 +#: glade/pytrainer.glade:2013 +#: glade/pytrainer.glade:2626 +#: glade/pytrainer.glade:3251 +#: glade/pytrainer.glade:3952 msgid "<b>Duration:</b>" msgstr "<b>Duración:</b>" -#: glade/pytrainer.glade:621 -#: glade/pytrainer.glade:3409 -#: glade/pytrainer.glade:4510 -#: glade/pytrainer.glade:5652 -#: glade/pytrainer.glade:7001 +#: glade/pytrainer.glade:422 +#: glade/pytrainer.glade:2103 +#: glade/pytrainer.glade:2705 +#: glade/pytrainer.glade:3330 +#: glade/pytrainer.glade:4054 msgid "<b>Speed:</b>" msgstr "<b>Velocidad:</b>" -#: glade/pytrainer.glade:649 -#: glade/pytrainer.glade:3718 -#: glade/pytrainer.glade:4874 -#: glade/pytrainer.glade:6016 -#: glade/pytrainer.glade:7171 +#: glade/pytrainer.glade:436 +#: glade/pytrainer.glade:2271 +#: glade/pytrainer.glade:2900 +#: glade/pytrainer.glade:3525 +#: glade/pytrainer.glade:4149 msgid "<b>Pace:</b>" msgstr "<b>Ritmo:</b>" -#: glade/pytrainer.glade:677 +#: glade/pytrainer.glade:450 msgid "<b>Ascent:</b>" msgstr "<b>Ascenso:</b>" -#: glade/pytrainer.glade:705 +#: glade/pytrainer.glade:464 msgid "<b>Calories:</b>" msgstr "<b>Calorías: </b>" -#: glade/pytrainer.glade:732 +#: glade/pytrainer.glade:478 msgid "<b>Comments:</b>" msgstr "<b>Comentarios:</b>" -#: glade/pytrainer.glade:760 -#: glade/pytrainer.glade:1585 -#: glade/pytrainer.glade:3465 -#: glade/pytrainer.glade:3522 -#: glade/pytrainer.glade:4566 -#: glade/pytrainer.glade:4735 -#: glade/pytrainer.glade:5708 -#: glade/pytrainer.glade:5877 -#: glade/pytrainer.glade:7057 -#: glade/pytrainer.glade:7085 -#: pytrainer/gui/windowmain.py:186 -#: pytrainer/gui/windowmain.py:187 -#: pytrainer/gui/windowmain.py:321 -#: pytrainer/gui/windowmain.py:322 -#: pytrainer/gui/windowmain.py:422 -#: pytrainer/gui/windowmain.py:423 -#: pytrainer/gui/windowmain.py:500 -#: pytrainer/gui/windowmain.py:501 +#: glade/pytrainer.glade:493 +#: glade/pytrainer.glade:890 +#: glade/pytrainer.glade:2133 +#: glade/pytrainer.glade:2166 +#: glade/pytrainer.glade:2735 +#: glade/pytrainer.glade:2828 +#: glade/pytrainer.glade:3360 +#: glade/pytrainer.glade:3453 +#: glade/pytrainer.glade:4084 +#: glade/pytrainer.glade:4100 +#: pytrainer/gui/windowmain.py:192 +#: pytrainer/gui/windowmain.py:193 +#: pytrainer/gui/windowmain.py:328 +#: pytrainer/gui/windowmain.py:329 +#: pytrainer/gui/windowmain.py:432 +#: pytrainer/gui/windowmain.py:433 +#: pytrainer/gui/windowmain.py:510 +#: pytrainer/gui/windowmain.py:511 msgid "km/h" msgstr "Km/h" -#: glade/pytrainer.glade:788 -#: glade/pytrainer.glade:1267 -#: glade/pytrainer.glade:3746 -#: glade/pytrainer.glade:3802 -#: glade/pytrainer.glade:4930 -#: glade/pytrainer.glade:4958 -#: glade/pytrainer.glade:6072 -#: glade/pytrainer.glade:6100 -#: glade/pytrainer.glade:7228 -#: glade/pytrainer.glade:7256 -#: pytrainer/gui/windowmain.py:188 -#: pytrainer/gui/windowmain.py:189 -#: pytrainer/gui/windowmain.py:323 -#: pytrainer/gui/windowmain.py:324 -#: pytrainer/gui/windowmain.py:424 -#: pytrainer/gui/windowmain.py:425 -#: pytrainer/gui/windowmain.py:502 -#: pytrainer/gui/windowmain.py:503 +#: glade/pytrainer.glade:509 +#: glade/pytrainer.glade:721 +#: glade/pytrainer.glade:2286 +#: glade/pytrainer.glade:2318 +#: glade/pytrainer.glade:2931 +#: glade/pytrainer.glade:2947 +#: glade/pytrainer.glade:3556 +#: glade/pytrainer.glade:3572 +#: glade/pytrainer.glade:4181 +#: glade/pytrainer.glade:4197 +#: pytrainer/gui/windowmain.py:194 +#: pytrainer/gui/windowmain.py:195 +#: pytrainer/gui/windowmain.py:330 +#: pytrainer/gui/windowmain.py:331 +#: pytrainer/gui/windowmain.py:434 +#: pytrainer/gui/windowmain.py:435 +#: pytrainer/gui/windowmain.py:512 +#: pytrainer/gui/windowmain.py:513 msgid "min/km" msgstr "min/km" -#: glade/pytrainer.glade:816 -#: glade/pytrainer.glade:1323 -#: pytrainer/gui/windowmain.py:190 -#: pytrainer/gui/windowmain.py:191 -#: pytrainer/gui/windowmain.py:1002 -#: pytrainer/gui/windowmain.py:1004 +#: glade/pytrainer.glade:525 +#: glade/pytrainer.glade:752 +#: pytrainer/gui/windowmain.py:196 +#: pytrainer/gui/windowmain.py:197 +#: pytrainer/gui/windowmain.py:1047 +#: pytrainer/gui/windowmain.py:1049 msgid "m" msgstr "m" -#: glade/pytrainer.glade:985 +#: glade/pytrainer.glade:613 msgid "<b>Date:</b>" msgstr "<b>Fecha:</b>" -#: glade/pytrainer.glade:1013 -#: glade/pytrainer.glade:3184 -#: glade/pytrainer.glade:4312 -#: glade/pytrainer.glade:5454 -#: glade/pytrainer.glade:6749 +#: glade/pytrainer.glade:627 +#: glade/pytrainer.glade:1999 +#: glade/pytrainer.glade:2612 +#: glade/pytrainer.glade:3237 +#: glade/pytrainer.glade:3938 msgid "<b>Distance:</b>" msgstr "<b>Distancia:</b>" -#: glade/pytrainer.glade:1042 +#: glade/pytrainer.glade:644 msgid "<b>Max Speed</b>" msgstr "<b>Pico velocidad:</b>" -#: glade/pytrainer.glade:1070 -#: glade/pytrainer.glade:3774 -#: glade/pytrainer.glade:4902 -#: glade/pytrainer.glade:6044 -#: glade/pytrainer.glade:7200 +#: glade/pytrainer.glade:660 +#: glade/pytrainer.glade:2301 +#: glade/pytrainer.glade:2914 +#: glade/pytrainer.glade:3539 +#: glade/pytrainer.glade:4164 msgid "<b>Max Pace:</b>" msgstr "<b>Pico ritmo:</b>" -#: glade/pytrainer.glade:1098 +#: glade/pytrainer.glade:676 msgid "<b>Descent:</b>" msgstr "<b>Descenso:</b>" -#: glade/pytrainer.glade:1351 -#: glade/pytrainer.glade:3606 -#: glade/pytrainer.glade:4650 -#: glade/pytrainer.glade:5792 -#: glade/pytrainer.glade:6608 +#: glade/pytrainer.glade:768 +#: glade/pytrainer.glade:2211 +#: glade/pytrainer.glade:2780 +#: glade/pytrainer.glade:3405 +#: glade/pytrainer.glade:3864 msgid "Cal" msgstr "Cal" -#: glade/pytrainer.glade:1417 -#: glade/pytrainer.glade:3128 -#: glade/pytrainer.glade:4256 -#: glade/pytrainer.glade:5398 -#: glade/pytrainer.glade:6973 +#: glade/pytrainer.glade:807 +#: glade/pytrainer.glade:1973 +#: glade/pytrainer.glade:2586 +#: glade/pytrainer.glade:3211 +#: glade/pytrainer.glade:4041 msgid "Km" msgstr "km" -#: glade/pytrainer.glade:1450 -#: glade/pytrainer.glade:1500 -#: glade/pytrainer.glade:1550 -#: glade/pytrainer.glade:3246 -#: glade/pytrainer.glade:3296 -#: glade/pytrainer.glade:3346 -#: glade/pytrainer.glade:4424 -#: glade/pytrainer.glade:4474 -#: glade/pytrainer.glade:5566 -#: glade/pytrainer.glade:5616 -#: glade/pytrainer.glade:6861 -#: glade/pytrainer.glade:6911 +#: glade/pytrainer.glade:824 +#: glade/pytrainer.glade:844 +#: glade/pytrainer.glade:867 +#: glade/pytrainer.glade:2028 +#: glade/pytrainer.glade:2049 +#: glade/pytrainer.glade:2071 +#: glade/pytrainer.glade:2662 +#: glade/pytrainer.glade:2684 +#: glade/pytrainer.glade:3287 +#: glade/pytrainer.glade:3309 +#: glade/pytrainer.glade:3987 +#: glade/pytrainer.glade:4009 msgid "00" msgstr "00" -#: glade/pytrainer.glade:1726 +#: glade/pytrainer.glade:1041 msgid " <b>Title:</b>" msgstr "<b>Título:</b>" -#: glade/pytrainer.glade:1840 +#: glade/pytrainer.glade:1098 msgid "" "Profile\n" "Speed\n" @@ -765,14 +837,14 @@ "Ritmo\n" "Pulsaciones" -#: glade/pytrainer.glade:1860 -#: glade/pytrainer.glade:5256 -#: glade/pytrainer.glade:6398 -#: glade/pytrainer.glade:7554 +#: glade/pytrainer.glade:1113 +#: glade/pytrainer.glade:3121 +#: glade/pytrainer.glade:3746 +#: glade/pytrainer.glade:4370 msgid "Versus" msgstr "contra" -#: glade/pytrainer.glade:1885 +#: glade/pytrainer.glade:1124 msgid "" "None\n" "Profile\n" @@ -787,114 +859,130 @@ "Ritmo\n" "Pulsaciones\n" -#: glade/pytrainer.glade:1905 +#: glade/pytrainer.glade:1141 msgid "Show Laps" msgstr "Mostras vueltas" -#: glade/pytrainer.glade:2061 +#: glade/pytrainer.glade:1199 +msgid "<small>Y Axis</small>" +msgstr "<small>Eje vertical (Y)</small>" + +#: glade/pytrainer.glade:1248 +msgid "<small>Graph Display Options</small>" +msgstr "<small>Opciones de visualización gráfica</small>" + +#: glade/pytrainer.glade:1258 +msgid "Reset Graph" +msgstr "Resetear" + +#: glade/pytrainer.glade:1262 +msgid "Reset Graph display to original settings" +msgstr "Volver a la configuración por defecto de la visualización gráfica" + +#: glade/pytrainer.glade:1381 msgid "<b>Beats:</b>" msgstr "<b>Pulsaciones:</b>" -#: glade/pytrainer.glade:2089 -#: glade/pytrainer.glade:3550 -#: glade/pytrainer.glade:4594 -#: glade/pytrainer.glade:5736 -#: glade/pytrainer.glade:6552 +#: glade/pytrainer.glade:1393 +#: glade/pytrainer.glade:2181 +#: glade/pytrainer.glade:2750 +#: glade/pytrainer.glade:3375 +#: glade/pytrainer.glade:3834 msgid "<b>Calories: </b>" msgstr "<b>Calorías: </b>" -#: glade/pytrainer.glade:2117 -#: glade/pytrainer.glade:3830 -#: glade/pytrainer.glade:5014 -#: glade/pytrainer.glade:6156 -#: glade/pytrainer.glade:7284 +#: glade/pytrainer.glade:1407 +#: glade/pytrainer.glade:2333 +#: glade/pytrainer.glade:2978 +#: glade/pytrainer.glade:3603 +#: glade/pytrainer.glade:4212 msgid "<b>Max Beats:</b>" msgstr "<b>Pico pulsaciones:</b>" -#: glade/pytrainer.glade:2145 +#: glade/pytrainer.glade:1421 msgid "<b>HR Zones Method:</b>" msgstr "<b>Método de cálculo:</b>" -#: glade/pytrainer.glade:2174 +#: glade/pytrainer.glade:1436 msgid "<b>HR Zone5:</b>" msgstr "<b>Máximo esfuerzo:</b>" -#: glade/pytrainer.glade:2202 -#: glade/pytrainer.glade:2566 +#: glade/pytrainer.glade:1451 +#: glade/pytrainer.glade:1650 msgid " bpm" msgstr "ppm" -#: glade/pytrainer.glade:2230 +#: glade/pytrainer.glade:1467 msgid " Cal" msgstr "Cal" -#: glade/pytrainer.glade:2342 +#: glade/pytrainer.glade:1525 msgid "<b>HR Zone4:</b>" msgstr "<b>Anaeróbica:</b>" -#: glade/pytrainer.glade:2370 +#: glade/pytrainer.glade:1541 msgid "<b>HR Zone3:</b>" msgstr "<b>Aeróbica:</b>" -#: glade/pytrainer.glade:2398 +#: glade/pytrainer.glade:1557 msgid "<b>HR Zone2:</b>" msgstr "<b>Quemagrasas:</b>" -#: glade/pytrainer.glade:2426 +#: glade/pytrainer.glade:1573 msgid "<b>HR Zone1:</b>" msgstr "<b>Recuperación:</b>" -#: glade/pytrainer.glade:2621 -#: glade/pytrainer.glade:2648 -#: glade/pytrainer.glade:2676 -#: glade/pytrainer.glade:2704 -#: glade/pytrainer.glade:2732 -#: glade/pytrainer.glade:3690 -#: glade/pytrainer.glade:3858 -#: glade/pytrainer.glade:4846 -#: glade/pytrainer.glade:4986 -#: glade/pytrainer.glade:5988 -#: glade/pytrainer.glade:6128 -#: glade/pytrainer.glade:6692 -#: glade/pytrainer.glade:7113 +#: glade/pytrainer.glade:1675 +#: glade/pytrainer.glade:1687 +#: glade/pytrainer.glade:1702 +#: glade/pytrainer.glade:1717 +#: glade/pytrainer.glade:1732 +#: glade/pytrainer.glade:2256 +#: glade/pytrainer.glade:2350 +#: glade/pytrainer.glade:2885 +#: glade/pytrainer.glade:2963 +#: glade/pytrainer.glade:3510 +#: glade/pytrainer.glade:3588 +#: glade/pytrainer.glade:3909 +#: glade/pytrainer.glade:4116 msgid "bpm" msgstr "ppm" -#: glade/pytrainer.glade:2798 +#: glade/pytrainer.glade:1777 msgid " <b>Heart Rate:</b>" msgstr "<b>Pulsaciones:</b>" -#: glade/pytrainer.glade:3013 +#: glade/pytrainer.glade:1905 msgid "label-2147483647" msgstr " " -#: glade/pytrainer.glade:3069 +#: glade/pytrainer.glade:1939 msgid "Record" msgstr "Registro" -#: glade/pytrainer.glade:3494 -#: glade/pytrainer.glade:4679 -#: glade/pytrainer.glade:5821 -#: glade/pytrainer.glade:7142 +#: glade/pytrainer.glade:2149 +#: glade/pytrainer.glade:2796 +#: glade/pytrainer.glade:3421 +#: glade/pytrainer.glade:4132 msgid "<b>Max Speed:</b>" msgstr "<b>Velocidad máxima:</b>" -#: glade/pytrainer.glade:3634 -#: glade/pytrainer.glade:4790 -#: glade/pytrainer.glade:5932 -#: glade/pytrainer.glade:6636 +#: glade/pytrainer.glade:2226 +#: glade/pytrainer.glade:2855 +#: glade/pytrainer.glade:3480 +#: glade/pytrainer.glade:3879 msgid "<b>Beats avg:</b>" msgstr "<b>Media pulsaciones:</b>" -#: glade/pytrainer.glade:4008 +#: glade/pytrainer.glade:2440 msgid " <b>Date:</b>" msgstr "<b>Fecha:</b>" -#: glade/pytrainer.glade:4083 +#: glade/pytrainer.glade:2484 msgid "Value" msgstr "Valor" -#: glade/pytrainer.glade:4108 +#: glade/pytrainer.glade:2495 msgid "" "Stage Profile\n" "Stage Velocity\n" @@ -904,23 +992,23 @@ "Velocidad de Etapa\n" "Perfil/Velocidad de Etapa" -#: glade/pytrainer.glade:4197 +#: glade/pytrainer.glade:2551 msgid "Day" msgstr "Día" -#: glade/pytrainer.glade:4374 -#: glade/pytrainer.glade:5516 -#: glade/pytrainer.glade:6811 +#: glade/pytrainer.glade:2641 +#: glade/pytrainer.glade:3266 +#: glade/pytrainer.glade:3966 msgid "000" msgstr "000" -#: glade/pytrainer.glade:5136 +#: glade/pytrainer.glade:3054 msgid " <b>Week:</b>" msgstr "<b>Semana:</b>" -#: glade/pytrainer.glade:5236 -#: glade/pytrainer.glade:6378 -#: glade/pytrainer.glade:7534 +#: glade/pytrainer.glade:3106 +#: glade/pytrainer.glade:3731 +#: glade/pytrainer.glade:4355 msgid "" "Distance\n" "Time\n" @@ -934,9 +1022,9 @@ "Velocidad media\n" "Calorías" -#: glade/pytrainer.glade:5281 -#: glade/pytrainer.glade:6423 -#: glade/pytrainer.glade:7579 +#: glade/pytrainer.glade:3132 +#: glade/pytrainer.glade:3757 +#: glade/pytrainer.glade:4381 msgid "" "None\n" "Distance\n" @@ -952,51 +1040,51 @@ "Velocidad media\n" "Calorías" -#: glade/pytrainer.glade:5350 +#: glade/pytrainer.glade:3176 msgid "Week" msgstr "Semana" -#: glade/pytrainer.glade:6278 +#: glade/pytrainer.glade:3679 msgid " <b>Month:</b>" msgstr "<b>Mes:</b>" -#: glade/pytrainer.glade:6493 +#: glade/pytrainer.glade:3800 msgid "Month" msgstr "Mes" -#: glade/pytrainer.glade:7434 +#: glade/pytrainer.glade:4303 msgid " <b>Year:</b>" msgstr "<b>Año:</b>" -#: glade/pytrainer.glade:7649 +#: glade/pytrainer.glade:4424 msgid "Year" msgstr "Año" -#: glade/pytrainer.glade:7692 +#: glade/pytrainer.glade:4447 msgid "label154" msgstr " " -#: glade/pytrainer.glade:7729 +#: glade/pytrainer.glade:4467 msgid "<b>Title:</b>" msgstr "<b>Título:</b>" -#: glade/pytrainer.glade:7774 +#: glade/pytrainer.glade:4490 msgid "Search" msgstr "Buscar" -#: glade/pytrainer.glade:7821 +#: glade/pytrainer.glade:4517 msgid "Columns" msgstr "Columnas" -#: glade/pytrainer.glade:7896 +#: glade/pytrainer.glade:4573 msgid "label155" msgstr " " -#: glade/pytrainer.glade:8030 +#: glade/pytrainer.glade:4657 msgid "Type:" msgstr "Tipo:" -#: glade/pytrainer.glade:8058 +#: glade/pytrainer.glade:4670 msgid "" "Font\n" "Restaurant\n" @@ -1008,39 +1096,31 @@ "Mirador\n" "Cumbre" -#: glade/pytrainer.glade:8079 +#: glade/pytrainer.glade:4686 msgid "Latitude: " msgstr "<b>Latitud:</b>" -#: glade/pytrainer.glade:8107 +#: glade/pytrainer.glade:4700 msgid " Name:" msgstr "Nombre:" -#: glade/pytrainer.glade:8135 +#: glade/pytrainer.glade:4712 msgid "Longitude:" msgstr "<b>Longitud:</b>" -#: glade/pytrainer.glade:8283 +#: glade/pytrainer.glade:4804 msgid "<b> Waypoint: </b>" msgstr "<b> Waypoint: </b>" -#: glade/pytrainer.glade:8416 +#: glade/pytrainer.glade:4885 msgid "label162" msgstr " " -#: glade/pytrainer.glade:8556 +#: glade/pytrainer.glade:4972 msgid "label163" msgstr " " -#: glade/pytrainer.glade:8659 -msgid "Edit Record" -msgstr "Editar registro" - -#: glade/pytrainer.glade:8680 -msgid "Show graph in classic view" -msgstr "Mostrar en vista clásica" - -#: glade/pytrainer.glade:8718 +#: glade/selecttrackdialog.glade:7 msgid "Select track record" msgstr "Seleccione uno de los tracks" @@ -1049,117 +1129,117 @@ msgid "Warning" msgstr "Advertencia" -#: pytrainer/gui/windowmain.py:63 -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:70 +#: pytrainer/gui/windowmain.py:65 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:72 msgid "id" msgstr "id" -#: pytrainer/gui/windowmain.py:63 +#: pytrainer/gui/windowmain.py:65 msgid "Start" msgstr "Comienzo" -#: pytrainer/gui/windowmain.py:63 +#: pytrainer/gui/windowmain.py:65 msgid "Kilometer" msgstr "Kilómetros" -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:723 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:748 msgid "Title" msgstr "Título" -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:724 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:749 #: pytrainer/gui/dialogselecttrack.py:40 msgid "Date" msgstr "Fecha" -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:725 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:750 #: pytrainer/gui/windowimportdata.py:333 #: pytrainer/gui/windowrecord.py:147 #: pytrainer/extensions/googlemaps.py:93 msgid "Distance" msgstr "Distancia" -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:727 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:752 #: pytrainer/extensions/googlemaps.py:93 msgid "Time" msgstr "Tiempo" -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:728 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:753 msgid "Beats" msgstr "Pulsaciones" -#: pytrainer/gui/windowmain.py:66 -#: pytrainer/gui/windowmain.py:729 +#: pytrainer/gui/windowmain.py:68 +#: pytrainer/gui/windowmain.py:754 msgid "Average" msgstr "Media" -#: pytrainer/gui/windowmain.py:70 +#: pytrainer/gui/windowmain.py:72 msgid "Waypoint" msgstr "Waypoint" -#: pytrainer/gui/windowmain.py:177 -#: pytrainer/gui/windowmain.py:314 -#: pytrainer/gui/windowmain.py:415 -#: pytrainer/gui/windowmain.py:493 +#: pytrainer/gui/windowmain.py:183 +#: pytrainer/gui/windowmain.py:321 +#: pytrainer/gui/windowmain.py:425 +#: pytrainer/gui/windowmain.py:503 msgid "miles" msgstr "millas" -#: pytrainer/gui/windowmain.py:178 -#: pytrainer/gui/windowmain.py:179 -#: pytrainer/gui/windowmain.py:315 -#: pytrainer/gui/windowmain.py:316 -#: pytrainer/gui/windowmain.py:416 -#: pytrainer/gui/windowmain.py:417 -#: pytrainer/gui/windowmain.py:494 -#: pytrainer/gui/windowmain.py:495 +#: pytrainer/gui/windowmain.py:184 +#: pytrainer/gui/windowmain.py:185 +#: pytrainer/gui/windowmain.py:322 +#: pytrainer/gui/windowmain.py:323 +#: pytrainer/gui/windowmain.py:426 +#: pytrainer/gui/windowmain.py:427 +#: pytrainer/gui/windowmain.py:504 +#: pytrainer/gui/windowmain.py:505 msgid "miles/h" msgstr "millas/h" -#: pytrainer/gui/windowmain.py:180 -#: pytrainer/gui/windowmain.py:181 -#: pytrainer/gui/windowmain.py:317 -#: pytrainer/gui/windowmain.py:318 -#: pytrainer/gui/windowmain.py:418 -#: pytrainer/gui/windowmain.py:419 -#: pytrainer/gui/windowmain.py:496 -#: pytrainer/gui/windowmain.py:497 +#: pytrainer/gui/windowmain.py:186 +#: pytrainer/gui/windowmain.py:187 +#: pytrainer/gui/windowmain.py:324 +#: pytrainer/gui/windowmain.py:325 +#: pytrainer/gui/windowmain.py:428 +#: pytrainer/gui/windowmain.py:429 +#: pytrainer/gui/windowmain.py:506 +#: pytrainer/gui/windowmain.py:507 msgid "min/mile" msgstr "min/milla" -#: pytrainer/gui/windowmain.py:182 -#: pytrainer/gui/windowmain.py:183 +#: pytrainer/gui/windowmain.py:188 +#: pytrainer/gui/windowmain.py:189 msgid "feet" msgstr "pies" -#: pytrainer/gui/windowmain.py:185 -#: pytrainer/gui/windowmain.py:320 -#: pytrainer/gui/windowmain.py:421 -#: pytrainer/gui/windowmain.py:499 +#: pytrainer/gui/windowmain.py:191 +#: pytrainer/gui/windowmain.py:327 +#: pytrainer/gui/windowmain.py:431 +#: pytrainer/gui/windowmain.py:509 #: pytrainer/extensions/googlemaps.py:93 msgid "km" msgstr "Km" -#: pytrainer/gui/windowmain.py:303 +#: pytrainer/gui/windowmain.py:310 msgid "Percentages method" msgstr "basado en porcentajes" -#: pytrainer/gui/windowmain.py:996 +#: pytrainer/gui/windowmain.py:1041 msgid "lap" msgstr "vuelta" -#: pytrainer/gui/windowmain.py:1002 +#: pytrainer/gui/windowmain.py:1047 #: pytrainer/gui/drawArea.py:143 #: pytrainer/extensions/googlemaps.py:91 msgid "h" msgstr "h" -#: pytrainer/gui/windowmain.py:1002 -#: pytrainer/gui/windowmain.py:1004 +#: pytrainer/gui/windowmain.py:1047 +#: pytrainer/gui/windowmain.py:1049 msgid "s" msgstr "s" @@ -1310,15 +1390,15 @@ msgid "GPX File" msgstr "Archivo GPX" -#: pytrainer/gui/windowprofile.py:51 +#: pytrainer/gui/windowprofile.py:53 msgid "Male" msgstr "Varón" -#: pytrainer/gui/windowprofile.py:52 +#: pytrainer/gui/windowprofile.py:54 msgid "Female" msgstr "Mujer" -#: pytrainer/gui/windowprofile.py:69 +#: pytrainer/gui/windowprofile.py:71 msgid "MET" msgstr "M.E.T." @@ -1331,11 +1411,11 @@ msgid "OK" msgstr "Ok" -#: pytrainer/recordgraph.py:93 -#: pytrainer/recordgraph.py:95 -#: pytrainer/recordgraph.py:97 -#: pytrainer/recordgraph.py:99 -#: pytrainer/recordgraph.py:101 +#: pytrainer/recordgraph.py:114 +#: pytrainer/recordgraph.py:116 +#: pytrainer/recordgraph.py:118 +#: pytrainer/recordgraph.py:120 +#: pytrainer/recordgraph.py:122 #: pytrainer/monthgraph.py:69 #: pytrainer/heartrategraph.py:38 #: pytrainer/yeargraph.py:70 @@ -1346,51 +1426,51 @@ msgid "Distance (km)" msgstr "Distancia (Km)" -#: pytrainer/recordgraph.py:93 +#: pytrainer/recordgraph.py:114 #: pytrainer/daygraph.py:52 msgid "Height (m)" msgstr "Altura (m)" -#: pytrainer/recordgraph.py:93 +#: pytrainer/recordgraph.py:114 #: pytrainer/daygraph.py:52 msgid "Stage Profile" msgstr "Perfil de Etapa" -#: pytrainer/recordgraph.py:95 +#: pytrainer/recordgraph.py:116 msgid "Speed (Km/h)" msgstr "Velocidad (km/h)" -#: pytrainer/recordgraph.py:95 +#: pytrainer/recordgraph.py:116 msgid "Speed" msgstr "Velocidad" -#: pytrainer/recordgraph.py:97 +#: pytrainer/recordgraph.py:118 msgid "Pace (min/km)" msgstr "Ritmo (min/km)" -#: pytrainer/recordgraph.py:97 +#: pytrainer/recordgraph.py:118 msgid "Pace" msgstr "Ritmo" -#: pytrainer/recordgraph.py:99 +#: pytrainer/recordgraph.py:120 #: pytrainer/heartrategraph.py:38 #: pytrainer/daygraph.py:56 msgid "Beats (bpm)" msgstr "Media pulsaciones (ppm)" -#: pytrainer/recordgraph.py:101 +#: pytrainer/recordgraph.py:122 msgid "Cadence (rpm)" msgstr "Cadencia (rpm)" -#: pytrainer/recordgraph.py:101 +#: pytrainer/recordgraph.py:122 msgid "Cadence" msgstr "Cadence" -#: pytrainer/lib/gpx.py:118 +#: pytrainer/lib/gpx.py:119 msgid "No Name" msgstr "Sin nombre" -#: pytrainer/lib/gpx.py:125 +#: pytrainer/lib/gpx.py:126 msgid "No Data" msgstr "Sin datos" @@ -1465,11 +1545,11 @@ msgid "Daily Calories" msgstr "Calorías diarias" -#: pytrainer/record.py:71 +#: pytrainer/record.py:72 msgid "Edit Entry" msgstr "Editar entrada" -#: pytrainer/record.py:452 +#: pytrainer/record.py:453 msgid "pyTrainer can't import data from your gpx file" msgstr "pyTrainer no puede importar datos de tu fichero gpx" @@ -1501,7 +1581,7 @@ msgid "Monthly Calories" msgstr "Calorías mensuales" -#: pytrainer/waypoint.py:90 +#: pytrainer/waypoint.py:94 msgid "The gpx file seems to be a several days records. Perhaps you will need to edit your gpx file" msgstr "Parece que el archivo gpx contiene actividades de varios días. Probablemente necesites editarlo" @@ -1513,11 +1593,11 @@ msgid "Velocity" msgstr "Velocidad" -#: pytrainer/main.py:447 +#: pytrainer/main.py:452 msgid "Delete this database entry?" msgstr "¿Borrar esta entrada de la base de datos?" -#: pytrainer/main.py:461 +#: pytrainer/main.py:466 msgid "Delete this waypoint?" msgstr "¿Borrar este waypoint?" @@ -1545,7 +1625,7 @@ msgid "Gant" msgstr "Gant" -#: import/file_garmintools.py:45 +#: import/file_garmintools.py:48 msgid "Garmin tools dump file" msgstr "Fichero de volcado de datos de Garmintools" @@ -1553,6 +1633,48 @@ msgid "Garmin training center database file version 2" msgstr "Versión 2 del fichero Garmin training center database" +#: extensions/openstreetmap/openstreetmap.py:27 +msgid "Must have username and password configured" +msgstr "Es obligatorio indicar nombre de usuario y contraseña" + +#: extensions/openstreetmap/openstreetmap.py:29 +msgid "Openstreetmap Extension Error" +msgstr "Error de la extensión OpenStreetMap" + +#: extensions/openstreetmap/openstreetmap.py:66 +msgid "" +"Posting GPX trace to Openstreetmap\n" +"\n" +"Please wait this could take several minutes" +msgstr "" +"Enviando traza GPX a OpenStreetMap\n" +"\n" +"Por favor espere, puede durar varios minutos" + +#: extensions/openstreetmap/openstreetmap.py:68 +msgid "Openstreetmap Extension Processing" +msgstr "Procesando extensión OpenStreetMap" + +#: extensions/openstreetmap/openstreetmap.py:86 +msgid "Openstreetmap Extension Upload Complete" +msgstr "Envío completo de la extensión OpenStreetMap" + +#: extensions/openstreetmap/openstreetmap.py:96 +msgid "Please add any additional information for this upload" +msgstr "Por favor indique información adicional para este envío" + +#~ msgid "_Import" +#~ msgstr "_Importar" + +#~ msgid "_Export as Text Separated by Commas" +#~ msgstr "_Exportar como texto separado por comas" + +#~ msgid "Edit Record" +#~ msgstr "Editar registro" + +#~ msgid "Show graph in classic view" +#~ msgstr "Mostrar en vista clásica" + #~ msgid "Clear" #~ msgstr "Limpiar" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-09 17:32:22
|
Revision: 555 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=555&view=rev Author: dgranda Date: 2010-04-09 17:32:16 +0000 (Fri, 09 Apr 2010) Log Message: ----------- Added check for early detection of empty local configuration file Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/profile.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-08 16:49:27 UTC (rev 554) +++ pytrainer/trunk/pytrainer/main.py 2010-04-09 17:32:16 UTC (rev 555) @@ -63,7 +63,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.1_svn#554" + self.version ="1.7.1_svn#555" self.DB_version = 3 #Setup usage and permitted options @@ -104,6 +104,7 @@ self.data_path = data_path self.date = Date() # Checking profile + #TODO configuration is first checked within profile, needs to be centralized - dgranda 2010.04.09 self.profile = Profile(self.data_path,self) self.profile.isProfileConfigured() Modified: pytrainer/trunk/pytrainer/profile.py =================================================================== --- pytrainer/trunk/pytrainer/profile.py 2010-04-08 16:49:27 UTC (rev 554) +++ pytrainer/trunk/pytrainer/profile.py 2010-04-09 17:32:16 UTC (rev 555) @@ -33,6 +33,13 @@ self.conf = checkConf() self.filename = self.conf.getValue("conffile") self.configuration = XMLParser(self.filename) + # Checks if configuration file is empty + if self.configuration.xmldoc is None: + logging.error("Seems no data available in local configuration file: "+self.filename+", please check") + logging.error("Fatal error, exiting") + exit(-3) + else: + logging.debug("Configuration retrieved: "+str(self.configuration.getOptions())) logging.debug("<<") def isProfileConfigured(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-08 16:49:33
|
Revision: 554 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=554&view=rev Author: dgranda Date: 2010-04-08 16:49:27 +0000 (Thu, 08 Apr 2010) Log Message: ----------- Removed logging to stdout and updated interim version Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-08 16:46:55 UTC (rev 553) +++ pytrainer/trunk/pytrainer/main.py 2010-04-08 16:49:27 UTC (rev 554) @@ -63,7 +63,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.1_svn#551" + self.version ="1.7.1_svn#554" self.DB_version = 3 #Setup usage and permitted options @@ -208,7 +208,6 @@ if os.path.isfile(pluginFile): logging.info('File exists. Size: %d. Sport: %s' % (os.path.getsize(pluginFile), sport)) if self.record.importFromGPX(pluginFile, sport) is None: - print "Error importing file "+pluginFile logging.error("Error importing file "+pluginFile) else: logging.error('File '+pluginFile+' not valid') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-08 16:47:01
|
Revision: 553 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=553&view=rev Author: dgranda Date: 2010-04-08 16:46:55 +0000 (Thu, 08 Apr 2010) Log Message: ----------- Making script executable to avoid confusion Property Changed: ---------------- pytrainer/trunk/utils/translator.sh Property changes on: pytrainer/trunk/utils/translator.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-04-08 16:45:21
|
Revision: 552 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=552&view=rev Author: dgranda Date: 2010-04-08 16:45:15 +0000 (Thu, 08 Apr 2010) Log Message: ----------- Updating credits in python installation script Modified Paths: -------------- pytrainer/trunk/setup.py Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2010-04-08 08:29:12 UTC (rev 551) +++ pytrainer/trunk/setup.py 2010-04-08 16:45:15 UTC (rev 552) @@ -16,10 +16,12 @@ setup( name="pytrainer", version="1.7.1", - author="Fiz Vazquez", + description="The free sport tracking center", + long_description="Pytrainer is a tool to log all your sport excursion coming from GPS devices (with a focus on ForeRunner 205, 305 and 405) or GPX (http://www.topografix.com) files. Pytrainer supports GPS track files and displays it in graphs, maps... ", + author="Fiz Vazquez, John Blance, David Garcia Granda", maintainer_email="pyt...@li...", - url="https://sourceforge.net/projects/pytrainer/", - license="GNU General Public License(GPL)", + url="http://sourceforge.net/projects/pytrainer/", + license="GNU General Public License (GPL)", packages=[ 'pytrainer', 'pytrainer.gui', 'pytrainer.extensions', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-08 08:29:21
|
Revision: 551 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=551&view=rev Author: jblance Date: 2010-04-08 08:29:12 +0000 (Thu, 08 Apr 2010) Log Message: ----------- Minor fixes to graph display options - to ensure functionality that exists actually works... Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade 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 2010-04-08 07:29:13 UTC (rev 550) +++ pytrainer/trunk/glade/pytrainer.glade 2010-04-08 08:29:12 UTC (rev 551) @@ -1212,7 +1212,8 @@ <property name="can_focus">True</property> <property name="invisible_char">●</property> <property name="width_chars">4</property> - <property name="adjustment">0 0 100 1 10 0</property> + <property name="adjustment">0 -500 1000 1 10 0</property> + <signal name="value_changed" handler="on_spinbuttonY1_value_changed"/> </widget> <packing> <property name="left_attach">1</property> @@ -1229,7 +1230,8 @@ <property name="can_focus">True</property> <property name="invisible_char">●</property> <property name="width_chars">4</property> - <property name="adjustment">0 0 100 1 10 0</property> + <property name="adjustment">0 -500 1000 1 10 0</property> + <signal name="value_changed" handler="on_spinbuttonY1_value_changed"/> </widget> <packing> <property name="left_attach">2</property> @@ -1243,8 +1245,7 @@ <child> <widget class="GtkLabel" id="labelGraphConfig"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes"><small>Graph Config Options</small></property> + <property name="label" translatable="yes"><small>Graph Display Options</small></property> <property name="use_markup">True</property> </widget> <packing> @@ -1253,19 +1254,21 @@ </packing> </child> <child> - <widget class="GtkButton" id="buttonRefreshGraph"> - <property name="label" translatable="yes">Refresh Graph Display</property> + <widget class="GtkButton" id="buttonResetGraph"> + <property name="label" translatable="yes">Reset Graph</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="tooltip" translatable="yes">Reset Graph display to original settings</property> + <property name="yalign">1</property> + <signal name="clicked" handler="on_buttonResetGraph_clicked"/> </widget> <packing> <property name="right_attach">3</property> <property name="top_attach">4</property> <property name="bottom_attach">5</property> <property name="x_options"></property> - <property name="y_options"></property> + <property name="y_options">GTK_EXPAND</property> </packing> </child> <child> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2010-04-08 07:29:13 UTC (rev 550) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2010-04-08 08:29:12 UTC (rev 551) @@ -273,7 +273,7 @@ logging.debug('<<') - def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None,xzones=None): + def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None,xzones=None, ylimits=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)) @@ -314,8 +314,16 @@ axis.set_title("%s vs %s" %(ylabel[0],ylabel[1])) else: axis.set_title("%s" %(ylabel[0])) - ylim = axis.get_ylim() + ylim_min, ylim_max = axis.get_ylim() + if ylimits is not None: + logging.debug("Using ylimits: %s" % str(ylimits)) + if ylimits[0] is not None: + ylim_min = ylimits[0] + if ylimits[1] is not None: + ylim_max = ylimits[1] + axis.set_ylim(ylim_min, ylim_max) + canvas = FigureCanvasGTK(figure) # a gtk.DrawingArea canvas.show() self.vbox.pack_start(canvas, True, True) @@ -326,7 +334,7 @@ logging.debug('Child available: '+str(child)) logging.debug('<<') - return ylim + return (ylim_min, ylim_max) def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-08 07:29:13 UTC (rev 550) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-08 08:29:12 UTC (rev 551) @@ -52,6 +52,8 @@ self.block = False self.activeSport = None self.gpxDir = gpxDir + self.record_list = None + self.laps = None def new(self): self.testimport = self.parent.testimport @@ -266,6 +268,8 @@ def actualize_recordgraph(self,record_list,laps=None): logging.debug(">>") + self.record_list = record_list + self.laps = laps if len(record_list)>0: self.record_vbox.set_sensitive(1) self.drawarearecord.drawgraph(record_list,laps) @@ -815,10 +819,30 @@ def createWaypointEditor(self,WaypointEditor,waypoint, parent=None): self.waypointeditor = WaypointEditor(self.data_path, self.waypointvbox,waypoint,parent) + + def zoom_graph(self, ylimits=None): + logging.debug(">>") + logging.debug("Reseting graph Y axis with ylimits: %s" % str(ylimits) ) + self.drawarearecord.drawgraph(self.record_list,self.laps, ylimits=ylimits) + logging.debug("<<") ###################### ## Lista de eventos ## ###################### + + def on_spinbuttonY1_value_changed(self, widget): + ymin = self.spinbuttonY1Min.get_value() + ymax = self.spinbuttonY1Max.get_value() + #Check to see if the min and max have the same... + if ymin == ymax: + if widget.get_name() == "spinbuttonY1Min": #User was changing the min spinbutton, so move max up + ymax += 1 + else: #Move min down + ymin -= 1 + self.zoom_graph(ylimits=(ymin, ymax)) + + def on_buttonResetGraph_clicked(self, widget): + self.zoom_graph() def on_edit_clicked(self,widget): selected,iter = self.recordTreeView.get_selection().get_selected() Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-08 07:29:13 UTC (rev 550) +++ pytrainer/trunk/pytrainer/main.py 2010-04-08 08:29:12 UTC (rev 551) @@ -63,7 +63,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.1_svn#550" + self.version ="1.7.1_svn#551" self.DB_version = 3 #Setup usage and permitted options Modified: pytrainer/trunk/pytrainer/recordgraph.py =================================================================== --- pytrainer/trunk/pytrainer/recordgraph.py 2010-04-08 07:29:13 UTC (rev 550) +++ pytrainer/trunk/pytrainer/recordgraph.py 2010-04-08 08:29:12 UTC (rev 551) @@ -30,7 +30,7 @@ self.config_table = tableConfig logging.debug("<<") - def drawgraph(self,values,laps=None): + def drawgraph(self,values,laps=None, ylimits=None): logging.debug(">>") #Get the config options for child in self.config_table.get_children(): @@ -97,7 +97,7 @@ col.append(color) logging.info("To show: tit: "+str(tit)+" | col: "+str(col)+" | xlab: "+str(xlab)+" | ylab: "+str(ylab)) #self.drawPlot(xvalues,yvalues,xlabel,ylabel,title,color,zones) - ymin, ymax = self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues) + ymin, ymax = self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues, ylimits=ylimits) max_yvalue = max(max_yvalue, ymax) min_yvalue = min(min_yvalue, ymin) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-08 07:29:20
|
Revision: 550 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=550&view=rev Author: jblance Date: 2010-04-08 07:29:13 +0000 (Thu, 08 Apr 2010) Log Message: ----------- Remove error on successful import as per David's suggestion Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-05 09:42:45 UTC (rev 549) +++ pytrainer/trunk/pytrainer/main.py 2010-04-08 07:29:13 UTC (rev 550) @@ -63,7 +63,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.1_svn#548" + self.version ="1.7.1_svn#550" self.DB_version = 3 #Setup usage and permitted options Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2010-04-05 09:42:45 UTC (rev 549) +++ pytrainer/trunk/pytrainer/record.py 2010-04-08 07:29:13 UTC (rev 550) @@ -511,6 +511,7 @@ Add a record from a valid pytrainer type GPX file """ logging.debug('>>') + entry_id = None if not os.path.isfile(gpxFile): logging.error("Invalid file: " +gpxFile) else: @@ -523,8 +524,8 @@ logging.error("Entry not created for file %s" % gpxFile) else: logging.info("Entry %d has been added" % entry_id) - logging.debug('<<') + return entry_id #def importFromGTRNCTR(self,gtrnctrFile): #TODO remove """22.03.2008 - dgranda This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-05 09:42:55
|
Revision: 549 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=549&view=rev Author: jblance Date: 2010-04-05 09:42:45 +0000 (Mon, 05 Apr 2010) Log Message: ----------- Fix to ensure correct order of DB records is returned Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowrecord.py pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/pytrainer/gui/windowrecord.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-04-05 05:04:17 UTC (rev 548) +++ pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-04-05 09:42:45 UTC (rev 549) @@ -261,6 +261,7 @@ def setValues(self,values): #(24, u'2009-12-26', 4, 23.48, u'9979', 0.0, 8.4716666232200009, 2210, u'', None, u'', 573.0, 562.0, 11.802745244400001, 5.0499999999999998, 7.04, 0.0, u'2009-12-25T19:41:48Z', u'2009-12-26 08:41:48+13:00') #(50, u'2006-10-13', 1, 25.0, u'5625', 0.0, 16.0, 0, u'', gpsfile, title,upositive,unegative,maxspeed|maxpace|pace|maxbeats + self.mode = "editrecord" self.id_record = values[0] self.setTime(values[4]) self.rcd_date.set_text(str(values[1])) @@ -287,7 +288,6 @@ buffer = self.rcd_comments.get_buffer() start,end = buffer.get_bounds() buffer.set_text(values[8]) - self.mode = "editrecord" def getSportPosition(self, sportID): """ Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2010-04-05 05:04:17 UTC (rev 548) +++ pytrainer/trunk/pytrainer/record.py 2010-04-05 09:42:45 UTC (rev 549) @@ -64,7 +64,8 @@ def editRecord(self,id_record,list_sport): logging.debug('>>') - record = self.ddbb.select("records", "*", "id_record=\"%s\"" %id_record) + #record = self.ddbb.select("records", "*", "id_record=\"%s\"" %id_record) + record = self.ddbb.select("records", "id_record, date, sport, distance, time, beats, average, calories, comments, gpslog, title, upositive, unegative, maxspeed, maxpace, pace, maxbeats, date_time_utc, date_time_local", "id_record=\"%s\"" %id_record) logging.debug('retrieving data from DB: '+str(record)) gpxfile = self.conf.getValue("gpxdir")+"/%d.gpx"%int(id_record) logging.debug('gpx file associated: '+gpxfile) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-05 05:04:23
|
Revision: 548 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=548&view=rev Author: jblance Date: 2010-04-05 05:04:17 +0000 (Mon, 05 Apr 2010) Log Message: ----------- Fix full screen map view Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade 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 2010-04-05 03:17:55 UTC (rev 547) +++ pytrainer/trunk/glade/pytrainer.glade 2010-04-05 05:04:17 UTC (rev 548) @@ -1159,11 +1159,12 @@ </child> <child> <widget class="GtkButton" id="button27"> + <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="receives_default">True</property> <signal name="clicked" handler="on_showmap_clicked"/> <child> - <widget class="GtkImage" id="image21"> + <widget class="GtkImage" id="image3"> <property name="visible">True</property> <property name="stock">gtk-fullscreen</property> </widget> @@ -1181,6 +1182,134 @@ <property name="position">0</property> </packing> </child> + <child> + <widget class="GtkHPaned" id="hpaned1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="position_set">True</property> + <child> + <widget class="GtkTable" id="tableConfig"> + <property name="visible">True</property> + <property name="n_rows">5</property> + <property name="n_columns">3</property> + <child> + <widget class="GtkLabel" id="labelY1Axis"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes"><small>Y Axis</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1Min"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 0 100 1 10 0</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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbuttonY1Max"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="width_chars">4</property> + <property name="adjustment">0 0 100 1 10 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">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelGraphConfig"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes"><small>Graph Config Options</small></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="right_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkButton" id="buttonRefreshGraph"> + <property name="label" translatable="yes">Refresh Graph Display</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </widget> + <packing> + <property name="right_attach">3</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="resize">False</property> + <property name="shrink">True</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="record_graph_vbox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="resize">True</property> + <property name="shrink">True</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> </widget> <packing> <property name="position">1</property> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2010-04-05 03:17:55 UTC (rev 547) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2010-04-05 05:04:17 UTC (rev 548) @@ -314,6 +314,7 @@ axis.set_title("%s vs %s" %(ylabel[0],ylabel[1])) else: axis.set_title("%s" %(ylabel[0])) + ylim = axis.get_ylim() canvas = FigureCanvasGTK(figure) # a gtk.DrawingArea canvas.show() @@ -323,8 +324,9 @@ for child in self.vbox.get_children(): logging.debug('Child available: '+str(child)) - + logging.debug('<<') + return ylim def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-05 03:17:55 UTC (rev 547) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-05 05:04:17 UTC (rev 548) @@ -134,7 +134,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.btnShowLaps) + self.drawarearecord = RecordGraph(self.record_graph_vbox, self.window1, self.record_combovalue, self.record_combovalue2, self.btnShowLaps, self.tableConfig) self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() @@ -144,6 +144,7 @@ def createMap(self,Googlemaps,waypoint): self.googlemaps = Googlemaps(self.data_path, self.map_vbox,waypoint, pytrainer_main=self.parent) + self.googlemaps_old = Googlemaps(self.data_path, self.map_vbox_old,waypoint, pytrainer_main=self.parent) def updateSportList(self,listSport): logging.debug(">>") @@ -389,9 +390,12 @@ self.drawareaday.drawgraph(record_list) logging.debug("<<") - def actualize_map(self,id_record): + def actualize_map(self,id_record, full_screen=False): logging.debug(">>") - self.googlemaps.drawMap(id_record) + if full_screen: + self.googlemaps_old.drawMap(id_record) + else: + self.googlemaps.drawMap(id_record) logging.debug("<<") def actualize_weekview(self, record_list, date_ini, date_end): @@ -874,7 +878,7 @@ def on_showmap_clicked(self,widget): self.infoarea.hide() self.maparea.show() - self.parent.refreshMapView() + self.parent.refreshMapView(full_screen=True) def on_hidemap_clicked(self,widget): self.maparea.hide() Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-05 03:17:55 UTC (rev 547) +++ pytrainer/trunk/pytrainer/main.py 2010-04-05 05:04:17 UTC (rev 548) @@ -63,7 +63,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.1_svn#547" + self.version ="1.7.1_svn#548" self.DB_version = 3 #Setup usage and permitted options @@ -330,12 +330,12 @@ self.windowmain.actualize_hrview(record_list,zones,karvonen_method) logging.debug('<<') - def refreshMapView(self): + def refreshMapView(self, full_screen=False): logging.debug('>>') selected,iter = self.windowmain.recordTreeView.get_selection().get_selected() id_record = selected.get_value(iter,0) logging.debug('Trying to show map for record '+str(id_record)) - self.windowmain.actualize_map(id_record) + self.windowmain.actualize_map(id_record, full_screen) logging.debug('<<') def refreshListRecords(self): Modified: pytrainer/trunk/pytrainer/recordgraph.py =================================================================== --- pytrainer/trunk/pytrainer/recordgraph.py 2010-04-05 03:17:55 UTC (rev 547) +++ pytrainer/trunk/pytrainer/recordgraph.py 2010-04-05 05:04:17 UTC (rev 548) @@ -18,18 +18,26 @@ import logging from gui.drawArea import DrawArea +import gtk class RecordGraph: - def __init__(self, vbox = None, window = None, combovalue = None, combovalue2 = None, btnShowLaps = None): + def __init__(self, vbox = None, window = None, combovalue = None, combovalue2 = None, btnShowLaps = None, tableConfig = None): logging.debug(">>") self.drawarea = DrawArea(vbox, window) self.combovalue = combovalue self.combovalue2 = combovalue2 self.showLaps = btnShowLaps + self.config_table = tableConfig logging.debug("<<") def drawgraph(self,values,laps=None): logging.debug(">>") + #Get the config options + for child in self.config_table.get_children(): + if child.get_name() == "spinbuttonY1Max": + spinbuttonY1Max = child + elif child.get_name() == "spinbuttonY1Min": + spinbuttonY1Min = child xval = [] yval = [] xlab = [] @@ -61,6 +69,8 @@ self.combovalue2.set_active(0) value_selected2 = 0 xvalues, yvalues = self.get_values(values,value_selected) + max_yvalue = max(yvalues) + min_yvalue = min(yvalues) xlabel,ylabel,title,color = self.get_value_params(value_selected) xval.append(xvalues) @@ -77,6 +87,8 @@ value_selected2 = value_selected2-1 xlabel,ylabel,title,color = self.get_value_params(value_selected2) xvalues,yvalues = self.get_values(values,value_selected2) + max_yvalue=max(max(yvalues), max_yvalue) + min_yvalue=min(min(yvalues), min_yvalue) xval.append(xvalues) yval.append(yvalues) xlab.append(xlabel) @@ -85,7 +97,16 @@ col.append(color) logging.info("To show: tit: "+str(tit)+" | col: "+str(col)+" | xlab: "+str(xlab)+" | ylab: "+str(ylab)) #self.drawPlot(xvalues,yvalues,xlabel,ylabel,title,color,zones) - self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues) + ymin, ymax = self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues) + + max_yvalue = max(max_yvalue, ymax) + min_yvalue = min(min_yvalue, ymin) + adjY1Min = gtk.Adjustment(value=ymin, lower=min_yvalue,upper=max_yvalue, step_incr=1, page_incr=10) + adjY1Max = gtk.Adjustment(value=ymax, lower=min_yvalue,upper=max_yvalue, step_incr=1, page_incr=10) + spinbuttonY1Min.set_adjustment(adjY1Min) + spinbuttonY1Max.set_adjustment(adjY1Max) + spinbuttonY1Min.set_value(ymin) + spinbuttonY1Max.set_value(ymax) 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-04-05 03:18:02
|
Revision: 547 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=547&view=rev Author: jblance Date: 2010-04-05 03:17:55 +0000 (Mon, 05 Apr 2010) Log Message: ----------- More refactoring to glade files. pytrainer.glade now displays in Glade Interface Designer for easier modification Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/dialogselecttrack.py pytrainer/trunk/pytrainer/gui/filechooser.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/glade/filechooserdialog.glade pytrainer/trunk/glade/selecttrackdialog.glade Added: pytrainer/trunk/glade/filechooserdialog.glade =================================================================== --- pytrainer/trunk/glade/filechooserdialog.glade (rev 0) +++ pytrainer/trunk/glade/filechooserdialog.glade 2010-04-05 03:17:55 UTC (rev 547) @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<glade-interface> + <widget class="GtkFileChooserDialog" id="filechooserdialog"> + <property name="visible">True</property> + <property name="border_width">5</property> + <property name="destroy_with_parent">True</property> + <property name="icon">logo_mini.png</property> + <property name="type_hint">dialog</property> + <property name="do_overwrite_confirmation">True</property> + <property name="local_only">False</property> + <signal name="destroy" handler="gtk_main_quit"/> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">24</property> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="layout_style">end</property> + <child> + <widget class="GtkButton" id="button13"> + <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="button14"> + <property name="label">gtk-open</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="has_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/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2010-04-05 02:34:40 UTC (rev 546) +++ pytrainer/trunk/glade/pytrainer.glade 2010-04-05 03:17:55 UTC (rev 547) @@ -1,8845 +1,4895 @@ -<?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="window1"> - <property name="visible">True</property> - <property name="title" translatable="yes">window1</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, 17 Jun 2007 20:02:27 GMT"/> - - <child> - <widget class="GtkNotebook" id="notebook7"> - <property name="visible">True</property> - <property name="show_tabs">False</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="infoarea"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkMenuBar" id="menubar1"> - <property name="visible">True</property> - <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property> - <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property> - - <child> - <widget class="GtkMenuItem" id="menuitem1"> - <property name="visible">True</property> - <property name="label" translatable="yes">_File</property> - <property name="use_underline">True</property> - - <child> - <widget class="GtkMenu" id="menuitem1_menu"> - - <child> - <widget class="GtkImageMenuItem" id="nuevo1"> - <property name="visible">True</property> - <property name="label">gtk-new</property> - <property name="use_stock">True</property> - <signal name="activate" handler="on_newrecord_clicked" last_modification_time="Sun, 26 Mar 2006 19:38:34 GMT"/> - </widget> - </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> - </child> - - <child> - <widget class="GtkImageMenuItem" id="export_csv"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Export as Text Separated by Commas</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_export_csv_activate" last_modification_time="Tue, 22 Aug 2006 18:22:41 GMT"/> - - <child internal-child="image"> - <widget class="GtkImage" id="image27"> - <property name="visible">True</property> - <property name="stock">gtk-go-down</property> - <property name="icon_size">1</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> - </child> - - <child> - <widget class="GtkSeparatorMenuItem" id="separatormenuitem1"> - <property name="visible">True</property> - </widget> - </child> - - <child> - <widget class="GtkImageMenuItem" id="salir1"> - <property name="visible">True</property> - <property name="label">gtk-quit</property> - <property name="use_stock">True</property> - <signal name="activate" handler="quit" last_modification_time="Sat, 01 Apr 2006 13:57:22 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem2"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Edit</property> - <property name="use_underline">True</property> - - <child> - <widget class="GtkMenu" id="menuitem2_menu"> - - <child> - <widget class="GtkImageMenuItem" id="preferencias1"> - <property name="visible">True</property> - <property name="label">gtk-preferences</property> - <property name="use_stock">True</property> - <signal name="activate" handler="on_edituser_activate" last_modification_time="Sat, 01 Apr 2006 13:54:19 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="view1"> - <property name="visible">True</property> - <property name="label" translatable="yes">_View</property> - <property name="use_underline">True</property> - - <child> - <widget class="GtkMenu" id="view1_menu"> - - <child> - <widget class="GtkRadioMenuItem" id="classicview_item"> - <property name="visible">True</property> - <property name="label" translatable="yes"> _Classic View</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <signal name="activate" handler="on_classicview_activate" last_modification_time="Thu, 19 Oct 2006 15:37:58 GMT"/> - <accelerator key="c" modifiers="GDK_CONTROL_MASK" signal="activate"/> - </widget> - </child> - - <child> - <widget class="GtkRadioMenuItem" id="listview_item"> - <property name="visible">True</property> - <property name="label" translatable="yes"> _List View</property> - <property name="use_underline">True</property> - <property name="active">False</property> - <property name="group">classicview_item</property> - <signal name="activate" handler="on_listview_activate" last_modification_time="Thu, 19 Oct 2006 15:37:47 GMT"/> - <accelerator key="l" modifiers="GDK_CONTROL_MASK" signal="activate"/> - </widget> - </child> - - <child> - <widget class="GtkRadioMenuItem" id="waipointsview_item"> - <property name="visible">True</property> - <property name="label" translatable="yes"> _Waypoints Editor</property> - <property name="use_underline">True</property> - <property name="active">False</property> - <property name="group">classicview_item</property> - <signal name="activate" handler="on_waypointsview_activate" last_modification_time="Tue, 26 Jun 2007 12:01:49 GMT"/> - <accelerator key="w" modifiers="GDK_CONTROL_MASK" signal="activate"/> - </widget> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="tools1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Tools</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_tools1_activate" last_modification_time="Mon, 30 Oct 2006 11:28:31 GMT"/> - - <child> - <widget class="GtkMenu" id="tools1_menu"> - - <child> - <widget class="GtkMenuItem" id="extensions1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Extensions</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_extensions_activate" last_modification_time="Mon, 30 Oct 2006 12:09:15 GMT"/> - <accelerator key="e" modifiers="GDK_CONTROL_MASK" signal="activate"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="gps_device_plugins1"> - <property name="visible">True</property> - <property name="label" translatable="yes">GPS Device Plugins</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_gpsplugins_activate" last_modification_time="Sun, 12 Nov 2006 17:37:52 GMT"/> - <accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/> - </widget> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem4"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Help</property> - <property name="use_underline">True</property> - - <child> - <widget class="GtkMenu" id="menuitem4_menu"> - - <child> - <widget class="GtkImageMenuItem" id="acerca_de1"> - <property name="visible">True</property> - <property name="label">gtk-about</property> - <property name="use_stock">True</property> - <signal name="activate" handler="on_about_activate" last_modification_time="Sun, 30 Apr 2006 13:09:08 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkNotebook" id="notebook6"> - <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="GtkHBox" id="classicarea"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVPaned" id="vpaned1"> - <property name="width_request">235</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="position">190</property> - - <child> - <widget class="GtkCalendar" id="calendar"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="display_options">GTK_CALENDAR_SHOW_HEADING|GTK_CALENDAR_SHOW_DAY_NAMES</property> - <signal name="day_selected" handler="on_calendar_selected" last_modification_time="Mon, 03 Apr 2006 18:54:54 GMT"/> - <signal name="day_selected_double_click" handler="on_calendar_doubleclick" last_modification_time="Mon, 03 Apr 2006 18:55:39 GMT"/> - <signal name="next_month" handler="on_calendar_changemonth" last_modification_time="Wed, 10 May 2006 19:28:36 GMT"/> - <signal name="next_year" handler="on_calendar_next_year" last_modification_time="Tue, 09 May 2006 17:13:10 GMT"/> - <signal name="prev_month" handler="on_calendar_changemonth" last_modification_time="Wed, 10 May 2006 19:28:44 GMT"/> - <signal name="prev_year" handler="on_calendar_next_year" last_modification_time="Wed, 10 May 2006 19:29:06 GMT"/> - </widget> - <packing> - <property name="shrink">True</property> - <property name="resize">False</property> - </packing> - </child> - - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> - <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="recordTreeView"> - <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> - <signal name="row_activated" handler="on_recordTree_clicked" last_modification_time="Wed, 10 May 2006 19:40:45 GMT"/> - <signal name="button_press_event" handler="on_allRecordTreeView_button_press" last_modification_time="Tue, 24 Oct 2006 18:59:19 GMT"/> - </widget> - </child> - </widget> - <packing> - <property name="shrink">True</property> - <property name="resize">True</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="GtkVBox" id="framework"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkHBox" id="hbox8"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">10</property> - - <child> - <widget class="GtkLabel" id="label47"> - <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.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="GtkComboBoxEntry" id="sportlist"> - <property name="width_request">52</property> - <property name="visible">True</property> - <property name="items" translatable="yes">All Sports</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_sportlist_changed" last_modification_time="Sun, 30 Apr 2006 19:35:58 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label48"> - <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> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkNotebook" id="notebook"> - <property name="border_width">6</property> - <property name="width_request">650</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">True</property> - <property name="enable_popup">True</property> - <signal name="switch_page" handler="on_page_change" last_modification_time="Thu, 13 Apr 2006 11:55:38 GMT"/> - - <child> - <widget class="GtkNotebook" id="recordview"> - <property name="border_width">6</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_LEFT</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> - <signal name="switch_page" handler="on_recordpage_change" last_modification_time="Thu, 10 Jan 2008 18:45:08 GMT"/> - - <child> - <widget class="GtkFrame" id="frame8"> - <property name="border_width">8</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="alignment8"> - <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="vbox22"> - <property name="border_width">10</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkTable" id="table13"> - <property name="visible">True</property> - <property name="n_rows">10</property> - <property name="n_columns">6</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">3</property> - - <child> - <widget class="GtkLabel" id="record_sport"> - <property name="visible">True</property> - <property name="label"> </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">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_upositive"> - <property name="visible">True</property> - <property name="label"> </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">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="record_calories"> - <property name="visible">True</property> - <property name="label"> </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> - <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">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="label11124"> - <property name="visible">True</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> - <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="GtkLabel" id="label11126"> - <property name="width_request">90</property> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Speed:</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">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="label11137"> - <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</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">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label11144"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Ascent:</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">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label11144"> - <property name="visible">True</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> - <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">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="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"> - <property name="visible">True</property> - <property name="label" translatable="yes">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">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">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="r_maxpace_unit"> - <property name="visible">True</property> - <property name="label" translatable="yes">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">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">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="r_descent_unit"> - <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">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="record_distance"> - <property name="visible">True</property> - <property name="label"> </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">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="record_maxspeed"> - <property name="visible">True</property> - <property name="label"> </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">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="record_maxpace"> - <property name="visible">True</property> - <property name="label"> </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">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="record_date"> - <property name="visible">True</property> - <property name="label"> </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">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_unegative"> - <property name="visible">True</property> - <property name="label"> </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">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</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"><b>Date:</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">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="label11123"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Distance:</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">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="label11134"> - <property name="width_request">90</property> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Max Speed</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">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="label11138"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Max 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</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">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label11145"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Descent:</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">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </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_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> - <property name="label"> </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"> </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">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="r_pace_unit"> - <property name="visible">True</property> - <property name="label" translatable="yes">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">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">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - ... [truncated message content] |
From: <jb...@us...> - 2010-04-05 02:34:46
|
Revision: 546 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=546&view=rev Author: jblance Date: 2010-04-05 02:34:40 +0000 (Mon, 05 Apr 2010) Log Message: ----------- Command line options can now be changed by preferences gui - do not persist across restarts Modified Paths: -------------- pytrainer/trunk/glade/profile.glade pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/gui/windowprofile.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/profile.glade =================================================================== --- pytrainer/trunk/glade/profile.glade 2010-04-05 01:11:05 UTC (rev 545) +++ pytrainer/trunk/glade/profile.glade 2010-04-05 02:34:40 UTC (rev 546) @@ -1624,8 +1624,8 @@ <property name="items" translatable="yes">Error Warning Info -Debug -Unknown</property> +Debug</property> + <signal name="changed" handler="on_comboboxLogLevel_changed"/> </widget> <packing> <property name="left_attach">1</property> @@ -1667,6 +1667,7 @@ <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_checkbuttonValidate_toggled"/> </widget> <packing> <property name="left_attach">1</property> @@ -1712,6 +1713,7 @@ <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_checkbuttonCheck_toggled"/> </widget> <packing> <property name="left_attach">1</property> @@ -1758,6 +1760,7 @@ <property name="receives_default">False</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_checkbuttonGM3_toggled"/> </widget> <packing> <property name="left_attach">1</property> @@ -1804,6 +1807,7 @@ <property name="receives_default">False</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_checkbuttonUnifiedImport_toggled"/> </widget> <packing> <property name="left_attach">1</property> @@ -1839,8 +1843,22 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label2"> + <widget class="GtkLabel" id="labelNotification"> <property name="visible">True</property> + <property name="xalign">0</property> + <property name="xpad">5</property> + <property name="label" translatable="yes"><small>This screen shows the state of command line configurable options for pytrainer. These options can be changed here which will affect the current instance of pytrainer, they will not be remembered next time though</small></property> + <property name="use_markup">True</property> + <property name="wrap">True</property> + <property name="width_chars">75</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelNote"> + <property name="visible">True</property> <property name="xalign">1</property> <property name="yalign">0</property> <property name="xpad">5</property> @@ -1849,7 +1867,7 @@ <property name="use_markup">True</property> </widget> <packing> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </widget> Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-04-05 01:11:05 UTC (rev 545) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2010-04-05 02:34:40 UTC (rev 546) @@ -28,7 +28,7 @@ from pytrainer.record import Record class Googlemaps: - def __init__(self, data_path = None, vbox = None, waypoint = None, useGM3 = False): + def __init__(self, data_path = None, vbox = None, waypoint = None, pytrainer_main=None): logging.debug(">>") self.data_path = data_path self.conf = checkConf() @@ -38,7 +38,7 @@ vbox.show_all() self.htmlfile = "%s/index.html" % (self.conf.getValue("tmpdir")) self.waypoint=waypoint - self.useGM3 = useGM3 + self.pytrainer_main = pytrainer_main self.record = Record() logging.debug("<<") @@ -79,7 +79,7 @@ logging.debug("minlon: %s, maxlon: %s" % (minlon, maxlon)) points,levels = Points.encodePoints(pointlist) points = points.replace("\\","\\\\") - if self.useGM3: + if self.pytrainer_main.gm3: logging.debug("Using Google Maps version 3 API") #laps = gpx.getLaps() # [](elapsedTime, lat, lon, calories, distance) #"id_lap, record, elapsed_time, distance, start_lat, start_lon, end_lat, end_lon, calories", Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-05 01:11:05 UTC (rev 545) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-04-05 02:34:40 UTC (rev 546) @@ -78,9 +78,12 @@ self.notebook.set_current_page(1) #Disable import menu item unless specified on startup - if not self.testimport: - self.menu_importdata.set_sensitive(0) + self.set_unified_import(self.testimport) + def set_unified_import(self, status=False): + self.menu_importdata.set_sensitive(status) + self.parent.testimport = status + def _createXmlListView(self,file): menufile = XMLParser(file) savedOptions = [] @@ -139,8 +142,8 @@ self.drawareamonth = MonthGraph(self.month_vbox, self.window1, self.month_combovalue,self.month_combovalue2) self.drawareayear = YearGraph(self.year_vbox, self.window1, self.year_combovalue,self.year_combovalue2) - def createMap(self,Googlemaps,waypoint, useGM3): - self.googlemaps = Googlemaps(self.data_path, self.map_vbox,waypoint, useGM3) + def createMap(self,Googlemaps,waypoint): + self.googlemaps = Googlemaps(self.data_path, self.map_vbox,waypoint, pytrainer_main=self.parent) def updateSportList(self,listSport): logging.debug(">>") Modified: pytrainer/trunk/pytrainer/gui/windowprofile.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-05 01:11:05 UTC (rev 545) +++ pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-05 02:34:40 UTC (rev 546) @@ -168,7 +168,7 @@ elif self.pytrainer_main.log_level == logging.DEBUG: self.comboboxLogLevel.set_active(3) else: - self.comboboxLogLevel.set_active(4) + self.comboboxLogLevel.set_active(0) print "Unknown logging level specified" #Show if validation requested @@ -197,13 +197,75 @@ #TODO Allow changes to settings!!! #Disable editing as processing of changes not yet implemented - self.comboboxLogLevel.set_sensitive(0) + #self.comboboxLogLevel.set_sensitive(0) #logging.getLogger('').setLevel(self.log_level) - self.checkbuttonValidate.set_sensitive(0) - self.checkbuttonCheck.set_sensitive(0) - self.checkbuttonGM3.set_sensitive(0) - self.checkbuttonUnifiedImport.set_sensitive(0) + #self.checkbuttonValidate.set_sensitive(0) + #self.checkbuttonCheck.set_sensitive(0) + #self.checkbuttonGM3.set_sensitive(0) + #self.checkbuttonUnifiedImport.set_sensitive(0) + + def on_comboboxLogLevel_changed(self, widget): + active = self.comboboxLogLevel.get_active() + if active == 1: + logging.debug("Setting log level to WARNING") + self.pytrainer_main.log_level = logging.WARNING + elif active == 2: + logging.debug("Setting log level to INFO") + self.pytrainer_main.log_level = logging.INFO + elif active == 3: + logging.debug("Setting log level to DEBUG") + self.pytrainer_main.log_level = logging.DEBUG + else: + logging.debug("Setting log level to ERROR") + self.pytrainer_main.log_level = logging.ERROR + self.pytrainer_main.set_logging_level(self.pytrainer_main.log_level) + + def on_checkbuttonValidate_toggled(self, widget): + if self.checkbuttonValidate.get_active(): + logging.debug( "Validate activated") + self.pytrainer_main.validate = True + else: + logging.debug("Validate deactivated") + self.pytrainer_main.validate = False + + def on_checkbuttonCheck_toggled(self, widget): + if self.checkbuttonCheck.get_active(): + logging.debug( "Check activated") + if self.pytrainer_main.check is not True: + #Need to do sanitycheck + logging.debug("Need to do sanitycheck") + self.pytrainer_main.sanityCheck() + self.pytrainer_main.check = True + else: + logging.debug("Check deactivated") + self.pytrainer_main.check = False + + def on_checkbuttonGM3_toggled(self, widget): + if self.checkbuttonGM3.get_active(): + logging.debug("GM3 activated") + self.pytrainer_main.gm3 = True + else: + logging.debug("GM3 deactivated") + self.pytrainer_main.gm3 = False + def on_checkbuttonUnifiedImport_toggled(self, widget): + if self.checkbuttonUnifiedImport.get_active(): + logging.debug("Unified Import activated") + if self.pytrainer_main.testimport is not True: + #Need to enable unified import + logging.debug("Need to enable unified import") + self.pytrainer_main.windowmain.set_unified_import(True) + else: + #No change + logging.debug("No change to unified import") + else: + logging.debug("Unified Import deactivated") + if self.pytrainer_main.testimport is True: + logging.debug("Need to deactivate unified import") + self.pytrainer_main.windowmain.set_unified_import(False) + else: + logging.debug("No change to unified import") + def on_sportlistbutton_clicked(self,widget): sport_list = self.parent.getSportList() if sport_list == 0: Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-04-05 01:11:05 UTC (rev 545) +++ pytrainer/trunk/pytrainer/main.py 2010-04-05 02:34:40 UTC (rev 546) @@ -63,7 +63,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.1_svn#544" + self.version ="1.7.1_svn#546" self.DB_version = 3 #Setup usage and permitted options @@ -156,12 +156,16 @@ self.loadPlugins() self.loadExtensions() self.windowmain.createGraphs(RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph) - self.windowmain.createMap(Googlemaps,self.waypoint, self.gm3) + self.windowmain.createMap(Googlemaps,self.waypoint) self.windowmain.createWaypointEditor(WaypointEditor,self.waypoint, parent=self) self.windowmain.on_calendar_selected(None) self.refreshMainSportList() self.windowmain.run() logging.debug('<<') + + def set_logging_level(self,level): + logging.debug("Setting logger to level: "+ str(level)) + logging.getLogger('').setLevel(level) def quit(self): logging.debug('--') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-05 01:11:20
|
Revision: 545 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=545&view=rev Author: jblance Date: 2010-04-05 01:11:05 +0000 (Mon, 05 Apr 2010) Log Message: ----------- Minor bug fix to checkin [544] Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowprofile.py Modified: pytrainer/trunk/pytrainer/gui/windowprofile.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-05 01:00:47 UTC (rev 544) +++ pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-04-05 01:11:05 UTC (rev 545) @@ -158,7 +158,6 @@ self.init_params_tab() def init_params_tab(self): - logging.debug( "log level:", self.pytrainer_main.log_level, "validate:", self.pytrainer_main.validate, "check:", self.pytrainer_main.check, "gm3:", self.pytrainer_main.gm3, "testimport:", self.pytrainer_main.testimport ) #Show log level if self.pytrainer_main.log_level == logging.ERROR: self.comboboxLogLevel.set_active(0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-04-05 01:00:54
|
Revision: 544 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=544&view=rev Author: jblance Date: 2010-04-05 01:00:47 +0000 (Mon, 05 Apr 2010) Log Message: ----------- New preferences tab which shows the settings of the pytrainer startup parameters Modified Paths: -------------- pytrainer/trunk/glade/profile.glade pytrainer/trunk/pytrainer/gui/windowprofile.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/profile.py Modified: pytrainer/trunk/glade/profile.glade =================================================================== --- pytrainer/trunk/glade/profile.glade 2010-04-04 10:30:47 UTC (rev 543) +++ pytrainer/trunk/glade/profile.glade 2010-04-05 01:00:47 UTC (rev 544) @@ -1,2771 +1,1930 @@ -<?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="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"></property> - </packing> - </child> - <child> - <widget class="GtkLinkButton" id="metlinkbutton"> - <property name="label" translatable="yes">More information on determining yor M.E.T sport coefficient on Wikipedia</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="has_tooltip">True</property> - <property name="relief">none</property> - <property name="uri">http://en.wikipedia.org/wiki/Metabolic_equivalent</property> - </widget> - <packing> - <property nam... [truncated message content] |