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: <nc...@us...> - 2010-11-20 22:15:50
|
Revision: 718 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=718&view=rev Author: ncjones Date: 2010-11-20 22:15:41 +0000 (Sat, 20 Nov 2010) Log Message: ----------- Prevent delete/edit when no equipment selected. ticket:12 Modified Paths: -------------- pytrainer/trunk/glade/equipment.glade pytrainer/trunk/pytrainer/gui/equipment.py Modified: pytrainer/trunk/glade/equipment.glade =================================================================== --- pytrainer/trunk/glade/equipment.glade 2010-11-20 21:08:03 UTC (rev 717) +++ pytrainer/trunk/glade/equipment.glade 2010-11-20 22:15:41 UTC (rev 718) @@ -30,6 +30,7 @@ <object class="GtkTreeView" id="treeviewEquipmentList"> <property name="visible">True</property> <property name="can_focus">True</property> + <signal name="cursor_changed" handler="equipment_cursor_changed"/> <signal name="row_activated" handler="equipment_row_activated"/> </object> </child> @@ -60,6 +61,7 @@ <child> <object class="GtkButton" id="buttonEquipmentEdit"> <property name="label">gtk-edit</property> + <property name="sensitive">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -76,6 +78,7 @@ <child> <object class="GtkButton" id="buttonEquipmentDelete"> <property name="label">gtk-delete</property> + <property name="sensitive">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> Modified: pytrainer/trunk/pytrainer/gui/equipment.py =================================================================== --- pytrainer/trunk/pytrainer/gui/equipment.py 2010-11-20 21:08:03 UTC (rev 717) +++ pytrainer/trunk/pytrainer/gui/equipment.py 2010-11-20 22:15:41 UTC (rev 718) @@ -49,8 +49,11 @@ self._append_row(added_equipment) def get_equipment_item(self, item_path): - item_id = self.get_value(self.get_iter(item_path), 0) - return self._equipment_service.get_equipment_item(item_id) + item = None + if item_path is not None: + item_id = self.get_value(self.get_iter(item_path), 0) + item = self._equipment_service.get_equipment_item(item_id) + return item def edit_equipment(self, item_path, equipment): updated_item = self._equipment_service.store_equipment(equipment) @@ -96,6 +99,7 @@ "add_equipment_clicked": self._add_equipment_clicked, "cancel_add_equipment_clicked": self._cancel_add_equipment_clicked, "confirm_add_equipment_clicked": self._confirm_add_equipment_clicked, + "equipment_cursor_changed": self._equipment_cursor_changed, "edit_equipment_clicked": self._edit_equipment_clicked, "equipment_row_activated": self._edit_equipment_clicked, "cancel_edit_equipment_clicked": self._cancel_edit_equipment_clicked, @@ -154,6 +158,11 @@ new_equipment.notes = unicode(notes) self._equipment_store.add_equipment(new_equipment) self.show_page_equipment_list() + + def _equipment_cursor_changed(self, widget, *args): + item_selected = self._get_selected_equipment_item() != None + self._builder.get_object("buttonEquipmentEdit").set_sensitive(item_selected) + self._builder.get_object("buttonEquipmentDelete").set_sensitive(item_selected) def _edit_equipment_clicked(self, widget, *args): item = self._get_selected_equipment_item() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nc...@us...> - 2010-11-20 21:08:09
|
Revision: 717 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=717&view=rev Author: ncjones Date: 2010-11-20 21:08:03 +0000 (Sat, 20 Nov 2010) Log Message: ----------- Reorder equipment buttons. The equipment "add", "edit" and "delete" buttons now have the same order as the equivalent sport buttons. ticket:12 Modified Paths: -------------- pytrainer/trunk/glade/equipment.glade Modified: pytrainer/trunk/glade/equipment.glade =================================================================== --- pytrainer/trunk/glade/equipment.glade 2010-11-19 18:08:53 UTC (rev 716) +++ pytrainer/trunk/glade/equipment.glade 2010-11-20 21:08:03 UTC (rev 717) @@ -42,19 +42,19 @@ <object class="GtkHBox" id="hboxEquipmentListButtons"> <property name="visible">True</property> <child> - <object class="GtkButton" id="buttonEquipmentDelete"> - <property name="label">gtk-delete</property> + <object class="GtkButton" id="buttonEquipmentAdd"> + <property name="label">gtk-add</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="use_stock">True</property> - <signal name="clicked" handler="delete_equipment_clicked"/> + <signal name="clicked" handler="add_equipment_clicked"/> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> <property name="pack_type">end</property> - <property name="position">2</property> + <property name="position">0</property> </packing> </child> <child> @@ -74,19 +74,19 @@ </packing> </child> <child> - <object class="GtkButton" id="buttonEquipmentAdd"> - <property name="label">gtk-add</property> + <object class="GtkButton" id="buttonEquipmentDelete"> + <property name="label">gtk-delete</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="use_stock">True</property> - <signal name="clicked" handler="add_equipment_clicked"/> + <signal name="clicked" handler="delete_equipment_clicked"/> </object> <packing> <property name="expand">False</property> <property name="fill">False</property> <property name="pack_type">end</property> - <property name="position">0</property> + <property name="position">2</property> </packing> </child> </object> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-11-19 18:08:59
|
Revision: 716 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=716&view=rev Author: dgranda Date: 2010-11-19 18:08:53 +0000 (Fri, 19 Nov 2010) Log Message: ----------- Retrieving a real list with DB tables, comparison was failing in ddbb.checkDBTables and executing unnecessary DB backup copies and checks. Check mysql Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/ddbb.py pytrainer/trunk/pytrainer/lib/sqliteUtils.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/lib/ddbb.py =================================================================== --- pytrainer/trunk/pytrainer/lib/ddbb.py 2010-11-19 16:23:44 UTC (rev 715) +++ pytrainer/trunk/pytrainer/lib/ddbb.py 2010-11-19 18:08:53 UTC (rev 716) @@ -26,6 +26,7 @@ from pytrainer.lib.date import Date #Define the tables and their columns that should be in the database +#Obviously, this is not a list but a dict -> TODO: ammend name to avoid confusion!!! tablesList = { "records":{ "id_record":"integer primary key autoincrement", "date":"date", "sport":"integer", @@ -293,8 +294,10 @@ global tablesList logging.debug('>>') tablesDB = self.ddbbObject.getTableList() + logging.debug('Tables in DB: '+str(tablesDB)); #Check Tables for entry in tablesList: + logging.debug("Entry: "+entry) if entry not in tablesDB: return False return True @@ -312,15 +315,12 @@ # logging.error('Support for MySQL database is decommissioned, please migrate to SQLite. Exiting check') # exit(-2) try: - tablesDBT = self.ddbbObject.getTableList() + tablesDB = self.ddbbObject.getTableList() except: logging.error('Not able to retrieve which tables are in DB. Printing traceback') traceback.print_exc() exit(-1) - tablesDB = [] # Database retrieves a list with tuples ¿? - for entry in tablesDBT: - tablesDB.append(entry[0]) logging.debug('Found '+ str(len(tablesDB))+' tables in DB: '+ str(tablesDB)) # Create a compressed copy of current DB Modified: pytrainer/trunk/pytrainer/lib/sqliteUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2010-11-19 16:23:44 UTC (rev 715) +++ pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2010-11-19 18:08:53 UTC (rev 716) @@ -51,7 +51,12 @@ pass def getTableList(self): - return self.select("sqlite_master","name", "type IN ('table','view') AND name NOT LIKE 'sqlite_%' ORDER BY name") + tmpList = self.select("sqlite_master","name", "type IN ('table','view') AND name NOT LIKE 'sqlite_%' ORDER BY name") + # The instruction above returns a list of tuples, going for a simple list + newList = [] + for entry in tmpList: + newList.append(entry[0]) + return newList def createTableDefault(self,tableName,columns): '''22.11.2009 - dgranda Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-19 16:23:44 UTC (rev 715) +++ pytrainer/trunk/pytrainer/main.py 2010-11-19 18:08:53 UTC (rev 716) @@ -53,7 +53,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#713" + self.version ="1.7.2_svn#715" self.DB_version = 6 #Process command line options self.startup_options = self.get_options() @@ -75,16 +75,18 @@ logging.debug('connecting to DDBB') self.ddbb.connect() - #Get user's 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.startup_options.check: # User requested check + if self.startup_options.check: + logging.debug("Checking DB as per user's request") self.sanityCheck() - elif currentDB_version is None: # No stored DB version - check DB etc + elif currentDB_version is None: + logging.debug("No stored DB version. Checking DB") self.sanityCheck() - elif self.DB_version > int(currentDB_version): # DB version expected is newer than user's version - check DB etc + elif self.DB_version > int(currentDB_version): + logging.debug("DB version newer than user's version") self.sanityCheck() else: logging.info('No sanity check requested') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-11-19 16:23:52
|
Revision: 715 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=715&view=rev Author: dgranda Date: 2010-11-19 16:23:44 +0000 (Fri, 19 Nov 2010) Log Message: ----------- Updating 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-11-16 21:10:33 UTC (rev 714) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2010-11-19 16:23:44 UTC (rev 715) @@ -7,10 +7,11 @@ msgstr "" "Project-Id-Version: pytrainer 1.7.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-26 18:18+0200\n" -"PO-Revision-Date: 2010-05-26 18:19+0100\n" +"POT-Creation-Date: 2010-11-19 16:58+0100\n" +"PO-Revision-Date: 2010-11-19 17:19+0100\n" "Last-Translator: David Garcia Granda <dg...@gm...>\n" "Language-Team: Spanish <es...@li...>\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -20,8 +21,54 @@ msgid "Calendar" msgstr "Calendario" +#: glade/equipment.glade:106 +msgid "<b>Equipment List</b>" +msgstr "<b>Lista de material</b>" + +#: glade/equipment.glade:146 +#: glade/equipment.glade:403 +msgid "Description" +msgstr "Descripción" + +#: glade/equipment.glade:171 +#: glade/equipment.glade:428 +msgid "Life Expectancy" +msgstr "Vida útil esperada" + +#: glade/equipment.glade:208 +#: glade/equipment.glade:464 +msgid "Prior Usage" +msgstr "Uso anterior" + +#: glade/equipment.glade:240 +#: glade/equipment.glade:496 +msgid "Active" +msgstr "Habilitado" + +#: glade/equipment.glade:274 +#: glade/equipment.glade:530 +#: pytrainer/gui/windowimportdata.py:352 +msgid "Notes" +msgstr "Notas" + +#: glade/equipment.glade:363 +msgid "<b>Add New Equipment</b>" +msgstr "<b>Añadir nuevo material</b>" + +#: glade/equipment.glade:619 +msgid "<b>Edit Equipment</b>" +msgstr "<b>Editar material</b>" + +#: glade/equipment.glade:648 +msgid "Really delete the equipment item?" +msgstr "¿Confirma que desea borrar el material?" + +#: glade/equipment.glade:701 +msgid "<b>Delete Equipment</b>" +msgstr "<b>Borrar material</b>" + #: glade/extensions.glade:9 -#: glade/pytrainer.glade:162 +#: glade/pytrainer.glade:163 msgid "Extensions" msgstr "Extensiones" @@ -36,6 +83,7 @@ #: glade/extensions.glade:82 #: glade/plugins.glade:144 #: glade/profile.glade:803 +#: glade/pytrainer.glade:5136 msgid "Name:" msgstr "Nombre:" @@ -46,7 +94,7 @@ #: glade/extensions.glade:110 #: glade/plugins.glade:86 -#: glade/pytrainer.glade:5386 +#: glade/pytrainer.glade:5665 msgid "Description:" msgstr "<b>Descripción:</b>" @@ -60,11 +108,11 @@ msgstr "Descripción" #: glade/importdata.glade:7 -#: glade/importdata.glade:329 +#: glade/importdata.glade:325 msgid "Import" msgstr "Importar" -#: glade/importdata.glade:37 +#: glade/importdata.glade:36 msgid "" "Test 1\n" "Test 2" @@ -72,100 +120,278 @@ "Prueba 1\n" "Prueba 2" -#: glade/importdata.glade:47 +#: glade/importdata.glade:46 msgid "<b>Select your GPS device</b>" msgstr "<b>Seleccione su dispositivo GPS</b>" -#: glade/importdata.glade:65 +#: glade/importdata.glade:64 msgid "Import from GPS Device is not yet implemented" msgstr "Importar desde dispositivo GPS todavía no disponible" -#: glade/importdata.glade:94 +#: glade/importdata.glade:92 msgid "<b>Tools</b>" msgstr "<b>Herramientas</b>" -#: glade/importdata.glade:113 +#: glade/importdata.glade:111 msgid "Rescan" msgstr "Examinar de nuevo" -#: glade/importdata.glade:117 +#: glade/importdata.glade:115 msgid "Rescan system for available tools" msgstr "Buscando de nuevo herramientas disponibles en el sistema" -#: glade/importdata.glade:170 +#: glade/importdata.glade:168 msgid "<b>Import from GPS Device</b>" msgstr "<b>Importar desde dispositivo GPS</b>" -#: glade/importdata.glade:225 +#: glade/importdata.glade:221 msgid "Remove selected files and the associated activities" msgstr "Borrar ficheros seleccionados y actividades asociadas" -#: glade/importdata.glade:243 +#: glade/importdata.glade:239 msgid "Add files to import activities from" msgstr "Añadir ficheros desde los importar actividades" -#: glade/importdata.glade:268 +#: glade/importdata.glade:264 msgid "<b>Add file(s) to import activities from</b>" msgstr "<b>Añadir fichero(s) desde el/los que importar actividades</b>" -#: glade/importdata.glade:311 +#: glade/importdata.glade:307 msgid "<b>Select activities to import</b>" msgstr "<b>Seleccionar actividades para importar</b>" -#: glade/importdata.glade:334 +#: glade/importdata.glade:330 msgid "Import selected activities" msgstr "Importadas %d actividades" -#: glade/importdata.glade:351 +#: glade/importdata.glade:347 msgid "Close Import dialog" msgstr "Cerrar proceso de importación" -#: glade/importdata.glade:391 +#: glade/importdata.glade:387 msgid "<b>Import from File</b>" msgstr "<b>Importar desde fichero</b>" -#: glade/importdata.glade:470 +#: glade/importdata.glade:464 msgid "<b>Plugins</b>" msgstr "<b>Plugins</b>" -#: glade/importdata.glade:499 +#: glade/importdata.glade:491 msgid "Import from GPS Device" msgstr "Importar desde dispositivo GPS" -#: glade/importdata.glade:518 +#: glade/importdata.glade:510 msgid "Import from File" msgstr "Importar desde fichero" -#: glade/importdata.glade:533 +#: glade/importdata.glade:525 msgid "Launch 'File Select' on start" msgstr "Arrancar 'Selección de fichero' en el comienzo" -#: glade/importdata.glade:538 +#: glade/importdata.glade:530 msgid "Automatically start the file selection dialog" msgstr "Lanzar proceso de selección de fichero automáticamente" -#: glade/importdata.glade:554 +#: glade/importdata.glade:546 #: glade/plugins.glade:9 msgid "Plugins" msgstr "Plugins" -#: glade/importdata.glade:580 +#: glade/importdata.glade:572 msgid "<b>Default to Tab</b>" msgstr "<b>Pestaña por defecto</b>" -#: glade/importdata.glade:603 +#: glade/importdata.glade:595 msgid "Reset" msgstr "Resetear" -#: glade/importdata.glade:619 +#: glade/importdata.glade:611 msgid "Save" msgstr "Guardar" -#: glade/importdata.glade:678 +#: glade/importdata.glade:670 msgid "<b>Options</b>" msgstr "<b>Opciones</b>" +#: glade/importdata.glade:702 +msgid "<b>Select file to import from</b>" +msgstr "<b>Seleccionar fichero para importar</b>" + +#: glade/importdata.glade:731 +msgid "Tab" +msgstr "Pestaña" + +#: glade/importdata.glade:746 +msgid "Comma" +msgstr "Comma" + +#: glade/importdata.glade:763 +msgid "Other" +msgstr "Otro" + +#: glade/importdata.glade:799 +msgid "Read File" +msgstr "Leer archivo" + +#: glade/importdata.glade:820 +msgid "<b>File delimiter</b>" +msgstr "<b>Delimitador en el archivo</b>" + +#: glade/importdata.glade:864 +#: pytrainer/gui/windowmain.py:109 +#: pytrainer/gui/windowmain.py:124 +#: pytrainer/gui/windowmain.py:1114 +#: pytrainer/gui/dialogselecttrack.py:40 +msgid "Date" +msgstr "Fecha" + +#: glade/importdata.glade:877 +#: glade/importdata.glade:918 +#: glade/importdata.glade:933 +#: glade/importdata.glade:1128 +#: glade/importdata.glade:1143 +#: glade/importdata.glade:1158 +#: glade/importdata.glade:1173 +#: glade/importdata.glade:1188 +#: glade/importdata.glade:1203 +#: glade/importdata.glade:1218 +#: glade/importdata.glade:1233 +#: glade/importdata.glade:1248 +#: glade/importdata.glade:1263 +#: glade/importdata.glade:1278 +#: glade/importdata.glade:1293 +msgid "Exclude" +msgstr "Descartar" + +#: glade/importdata.glade:892 +#: pytrainer/recordgraph.py:134 +#: pytrainer/recordgraph.py:136 +#: pytrainer/recordgraph.py:138 +#: pytrainer/recordgraph.py:140 +#: pytrainer/recordgraph.py:142 +#: pytrainer/recordgraph.py:144 +#: pytrainer/recordgraph.py:146 +#: pytrainer/monthgraph.py:70 +#: pytrainer/heartrategraph.py:36 +#: pytrainer/yeargraph.py:70 +#: pytrainer/daygraph.py:52 +#: pytrainer/daygraph.py:54 +#: pytrainer/daygraph.py:56 +#: pytrainer/weekgraph.py:115 +msgid "Distance (km)" +msgstr "Distancia (km)" + +#: glade/importdata.glade:905 +msgid "Duration (sec)" +msgstr "Duración (s)" + +#: glade/importdata.glade:947 +msgid "<b>PyTrainer Field</b>" +msgstr "<b>Campo en PyTrainer</b>" + +#: glade/importdata.glade:958 +msgid "<b>File Column</b>" +msgstr "<b>Columna en el archivo</b>" + +#: glade/importdata.glade:972 +#: pytrainer/gui/windowmain.py:108 +#: pytrainer/gui/windowmain.py:1113 +msgid "Title" +msgstr "Título" + +#: glade/importdata.glade:985 +msgid "Descent (m)" +msgstr "Descenso (m)" + +#: glade/importdata.glade:998 +msgid "Accent (m)" +msgstr "Ascenso (m)" + +#: glade/importdata.glade:1011 +msgid "Calories (kcal)" +msgstr "Calorías (kcal)" + +#: glade/importdata.glade:1024 +msgid "Max Speed (km/h)" +msgstr "Velocidad Máx. (km/h)" + +#: glade/importdata.glade:1037 +#: pytrainer/monthgraph.py:76 +#: pytrainer/yeargraph.py:76 +#: pytrainer/weekgraph.py:121 +msgid "Average Speed (km/h)" +msgstr "Velocidad media (km/h)" + +#: glade/importdata.glade:1050 +#: glade/pytrainer.glade:277 +#: pytrainer/gui/windowmain.py:103 +#: pytrainer/gui/windowmain.py:111 +#: pytrainer/gui/windowmain.py:1116 +#: pytrainer/gui/windowimportdata.py:352 +#: pytrainer/gui/windowrecord.py:210 +#: pytrainer/gui/windowprofile.py:59 +msgid "Sport" +msgstr "Deporte" + +#: glade/importdata.glade:1063 +msgid "Average Heartrate (bpm)" +msgstr "Pulsaciones medias (ppm)" + +#: glade/importdata.glade:1076 +msgid "Max Heartrate (bpm)" +msgstr "Pulsaciones máximas (ppm)" + +#: glade/importdata.glade:1089 +#: pytrainer/recordgraph.py:138 +msgid "Pace (min/km)" +msgstr "Ritmo (min/km)" + +#: glade/importdata.glade:1102 +msgid "Max Pace (min/km)" +msgstr "Ritmo máximo(min/km)" + +#: glade/importdata.glade:1115 +#: glade/newrecord.glade:1095 +msgid "Comments" +msgstr "Comentarios" + +#: glade/importdata.glade:1309 +msgid "Force sport to:" +msgstr "Forzar deporte a:" + +#: glade/importdata.glade:1323 +#: glade/newrecord.glade:406 +msgid " " +msgstr " " + +#: glade/importdata.glade:1394 +msgid "<b>Map Columns</b>" +msgstr "<b>Mapear columnas</b>" + +#: glade/importdata.glade:1414 +msgid "" +"<small>This is an experiemental import for delimited files\n" +"1) Select a file\n" +"2) Click 'Read File' to analyse the file\n" +"3) Map columns in the file to pytrainer data elements (Date is required)\n" +"4) Click 'Import Data'</small>" +msgstr "" +"<small>Se trata de importar ficheros delimitados de manera experimental\n" +"1) Seleccione un fichero\n" +"2) Pulse 'Leer fichero\" para analizarlo\n" +"3) Asigne las columnas del fichero a elementos de datos de Pytrainer (la fecha obligatoria)\n" +"4) Pulse 'Importar datos'</small>" + +#: glade/importdata.glade:1427 +msgid "Import Data" +msgstr "Importar datos" + +#: glade/importdata.glade:1467 +msgid "<b>Import from CSV</b>" +msgstr "<b>Importar desde fichero CSV</b>" + #: glade/newrecord.glade:7 +#: pytrainer/gui/windowmain.py:1724 msgid "New Entry" msgstr "Nueva entrada" @@ -198,7 +424,7 @@ #: glade/newrecord.glade:560 #: glade/newrecord.glade:698 #: glade/newrecord.glade:959 -#: glade/profile.glade:1459 +#: glade/profile.glade:1538 msgid "Calculate" msgstr "Calcular" @@ -215,10 +441,6 @@ msgid "Date:" msgstr "Fecha:" -#: glade/newrecord.glade:406 -msgid " " -msgstr " " - #: glade/newrecord.glade:447 msgid "Start Time:" msgstr "Hora de comienzo:" @@ -228,7 +450,7 @@ msgstr "12:00:00" #: glade/newrecord.glade:488 -#: glade/profile.glade:1497 +#: glade/profile.glade:1576 msgid "<b>General</b>" msgstr "<b>General:</b>" @@ -281,8 +503,9 @@ msgstr "Pulsaciones" #: glade/newrecord.glade:903 -#: pytrainer/gui/windowmain.py:745 -#: pytrainer/monthgraph.py:77 +#: pytrainer/gui/windowmain.py:115 +#: pytrainer/gui/windowmain.py:1120 +#: pytrainer/monthgraph.py:78 #: pytrainer/yeargraph.py:78 #: pytrainer/weekgraph.py:123 msgid "Calories" @@ -304,10 +527,19 @@ msgid "<b>Comments</b>" msgstr "<b>Comentarios</b>" -#: glade/newrecord.glade:1095 -msgid "Comments" -msgstr "Comentarios" +#: glade/newrecord.glade:1135 +msgid "<i>There are no active equipment items.</i>" +msgstr "<i>No hay piezas de material activas</i>" +#: glade/newrecord.glade:1189 +msgid "<b>Associated Equipment</b>" +msgstr "<b>Material asociado</b>" + +#: glade/newrecord.glade:1204 +#: glade/profile.glade:1436 +msgid "Equipment" +msgstr "Equipamiento" + #: glade/plugins.glade:53 msgid "<b>Plugin Details</b>" msgstr "<b>Detalles del plugin</b>" @@ -337,12 +569,12 @@ msgstr "<b>Sistema de medida</b>" #: glade/profile.glade:103 -#: glade/pytrainer.glade:1954 +#: glade/pytrainer.glade:1998 msgid "Google" msgstr "Google" #: glade/profile.glade:118 -#: glade/pytrainer.glade:1937 +#: glade/pytrainer.glade:1981 msgid "Open Street Map" msgstr "Open Street Map" @@ -399,10 +631,12 @@ msgstr "Género:" #: glade/profile.glade:483 +#: glade/pytrainer.glade:5161 msgid "Height:" msgstr "Altura:" #: glade/profile.glade:523 +#: glade/pytrainer.glade:5148 msgid "Date of birth:" msgstr "Fecha de nacimiento:" @@ -411,10 +645,12 @@ msgstr "Peso:" #: glade/profile.glade:618 +#: glade/pytrainer.glade:5223 msgid "<b>Athlete Details</b>" msgstr "<b>Datos personales</b>" #: glade/profile.glade:633 +#: glade/pytrainer.glade:5326 msgid "Athlete" msgstr "Atleta" @@ -435,19 +671,23 @@ msgstr "Peso extra:" #: glade/profile.glade:877 -#: glade/profile.glade:1227 +#: glade/profile.glade:1257 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:959 +#: glade/profile.glade:897 +msgid "Maximum Pace:" +msgstr "Ritmo más rápido:" + +#: glade/profile.glade:989 msgid "<b>Add New Sport</b>" msgstr "<b>Añadir nuevo deporte</b>" -#: glade/profile.glade:974 +#: glade/profile.glade:1004 msgid "new" msgstr "nuevo" -#: glade/profile.glade:1005 +#: glade/profile.glade:1035 msgid "" "Deleting a sport removes associated records.\n" "Continue?" @@ -455,88 +695,95 @@ "Si borra un deporte elimina sus registros asociados.\n" "¿Desea continuar?" -#: glade/profile.glade:1087 +#: glade/profile.glade:1117 msgid "<b>Delete Sport</b>" msgstr "<b>Borrar deporte</b>" -#: glade/profile.glade:1119 +#: glade/profile.glade:1149 msgid "delete" msgstr "borrar" -#: glade/profile.glade:1152 +#: glade/profile.glade:1182 msgid "Name" msgstr "Nombre" -#: glade/profile.glade:1175 +#: glade/profile.glade:1205 msgid "M.E.T." msgstr "M.E.T." -#: glade/profile.glade:1202 -#: pytrainer/gui/windowprofile.py:56 +#: glade/profile.glade:1232 +#: pytrainer/gui/windowprofile.py:59 msgid "Extra Weight" msgstr "Peso extra" -#: glade/profile.glade:1308 +#: glade/profile.glade:1277 +msgid "Maxiumum Pace" +msgstr "Ritmo más rápido:" + +#: glade/profile.glade:1365 msgid "<b>Edit Sport</b>" msgstr "<b>Editar deporte</b>" -#: glade/profile.glade:1319 +#: glade/profile.glade:1376 msgid "<b>lalaal</b>" msgstr "<b>lalaal</b>" -#: glade/profile.glade:1341 +#: glade/profile.glade:1398 msgid "edit" msgstr "editar" -#: glade/profile.glade:1357 +#: glade/profile.glade:1414 msgid "Sports" msgstr "Deportes" -#: glade/profile.glade:1390 +#: glade/profile.glade:1469 msgid "Maximum heart rate:" msgstr "Pulsaciones máximas:" -#: glade/profile.glade:1401 +#: glade/profile.glade:1480 msgid "Resting heart rate:" msgstr "Pulsaciones en reposo:" -#: glade/profile.glade:1446 +#: glade/profile.glade:1525 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:1533 +#: glade/profile.glade:1612 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:1546 +#: glade/profile.glade:1625 msgid "Percentages based method" msgstr "Basado en porcentajes" -#: glade/profile.glade:1562 -#: pytrainer/gui/windowmain.py:291 +#: glade/profile.glade:1641 +#: pytrainer/gui/windowmain.py:587 msgid "Karvonen method" msgstr "Karvonen" -#: glade/profile.glade:1583 +#: glade/profile.glade:1662 msgid "Select how to calculate your heart rate zones." msgstr "Seleccione cómo calcular las zonas de frecuencia cardiaca" -#: glade/profile.glade:1622 +#: glade/profile.glade:1701 msgid "<b>Heart Rate Zones</b>" msgstr "<b>Zonas de frecuencia cardiaca</b>" -#: glade/profile.glade:1644 -#: pytrainer/recordgraph.py:138 +#: glade/profile.glade:1723 +#: pytrainer/recordgraph.py:140 +#: pytrainer/lib/activity.py:411 +#: pytrainer/lib/activity.py:413 +#: pytrainer/lib/activity.py:423 #: pytrainer/heartrategraph.py:36 #: pytrainer/daygraph.py:56 msgid "Heart Rate" msgstr "Pulsaciones" -#: glade/profile.glade:1670 +#: glade/profile.glade:1749 msgid "Log Level" msgstr "Nivel de log" -#: glade/profile.glade:1678 +#: glade/profile.glade:1757 msgid "" "Error\n" "Warning\n" @@ -548,59 +795,39 @@ "Información\n" "Depuración" -#: glade/profile.glade:1696 +#: glade/profile.glade:1775 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:1710 +#: glade/profile.glade:1789 msgid "Validate" msgstr "Validar" -#: glade/profile.glade:1740 +#: glade/profile.glade:1819 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:1756 +#: glade/profile.glade:1835 msgid "Check" msgstr "Comprobación" -#: glade/profile.glade:1785 +#: glade/profile.glade:1864 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:1801 -msgid "Googlemaps v3" -msgstr "Googlemaps v3" +#: glade/profile.glade:1880 +msgid "New Graph" +msgstr "Nuevo gráfico" -#: glade/profile.glade:1833 -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:1909 +msgid "<small>Want to use experimental new approach to graphing?</small>" +msgstr "<small>¿Desea usar los nuevos gráficos (experimental)?</small>" -#: glade/profile.glade:1849 -msgid "Unified Import" -msgstr "Importar" - -#: glade/profile.glade:1879 -msgid "<small>Is the Unified Importer active?</small>" -msgstr "<small>¿Está habilitado el importador unificado?</small>" - -#: glade/profile.glade:1895 -msgid "Equipment handling" -msgstr "Gestión de equipamiento" - -#: glade/profile.glade:1924 -msgid "<small>Want to track equipment?</small>" -msgstr "<small>¿Control de equipamiento?</small>" - -#: glade/profile.glade:1949 +#: glade/profile.glade:1952 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:1965 -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:1981 +#: glade/profile.glade:1973 msgid "Startup Parameters" msgstr "Configuración inicio" @@ -608,185 +835,194 @@ msgid "_File" msgstr "_Archivo" -#: glade/pytrainer.glade:93 +#: glade/pytrainer.glade:39 +msgid "_Import" +msgstr "_Importar" + +#: glade/pytrainer.glade:60 +msgid "_Export as Text Separated by Commas" +msgstr "_Exportar como texto separado por comas (csv)" + +#: glade/pytrainer.glade:94 msgid "_Edit" msgstr "_Editar" -#: glade/pytrainer.glade:113 +#: glade/pytrainer.glade:114 msgid "_View" msgstr "_Ver" -#: glade/pytrainer.glade:120 +#: glade/pytrainer.glade:121 msgid " _Classic View" msgstr "Vista _clásica" -#: glade/pytrainer.glade:130 +#: glade/pytrainer.glade:131 msgid " _List View" msgstr "_Listado de registros" -#: glade/pytrainer.glade:140 +#: glade/pytrainer.glade:141 msgid " _Waypoints Editor" msgstr "Editor de _waypoints" -#: glade/pytrainer.glade:154 +#: glade/pytrainer.glade:155 msgid "Tools" msgstr "Herramientas" -#: glade/pytrainer.glade:171 +#: glade/pytrainer.glade:172 msgid "GPS Device Plugins" msgstr "Plugins de dispositivos GPS" -#: glade/pytrainer.glade:184 +#: glade/pytrainer.glade:185 msgid "_Help" msgstr "_Ayuda" -#: glade/pytrainer.glade:275 -#: pytrainer/gui/windowmain.py:75 -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:741 -#: pytrainer/gui/windowimportdata.py:333 -#: pytrainer/gui/windowrecord.py:147 -#: pytrainer/gui/windowprofile.py:56 -msgid "Sport" -msgstr "Deporte" - -#: glade/pytrainer.glade:287 +#: glade/pytrainer.glade:290 +#: glade/pytrainer.glade:5442 msgid "All Sports" msgstr "Todos los deportes" -#: glade/pytrainer.glade:393 +#: glade/pytrainer.glade:396 msgid "<b>Sport:</b>" msgstr "<b>Deporte:</b>" -#: glade/pytrainer.glade:405 -#: glade/pytrainer.glade:2657 -#: glade/pytrainer.glade:3268 -#: glade/pytrainer.glade:3891 -#: glade/pytrainer.glade:4590 +#: glade/pytrainer.glade:408 +#: glade/pytrainer.glade:2701 +#: glade/pytrainer.glade:3312 +#: glade/pytrainer.glade:3935 +#: glade/pytrainer.glade:4634 msgid "<b>Duration:</b>" msgstr "<b>Duración:</b>" -#: glade/pytrainer.glade:420 -#: glade/pytrainer.glade:2747 -#: glade/pytrainer.glade:3347 -#: glade/pytrainer.glade:3970 -#: glade/pytrainer.glade:4692 +#: glade/pytrainer.glade:423 +#: glade/pytrainer.glade:2791 +#: glade/pytrainer.glade:3391 +#: glade/pytrainer.glade:4014 +#: glade/pytrainer.glade:4736 msgid "<b>Speed:</b>" msgstr "<b>Velocidad:</b>" -#: glade/pytrainer.glade:434 -#: glade/pytrainer.glade:2915 -#: glade/pytrainer.glade:3542 -#: glade/pytrainer.glade:4165 -#: glade/pytrainer.glade:4787 +#: glade/pytrainer.glade:437 +#: glade/pytrainer.glade:2959 +#: glade/pytrainer.glade:3586 +#: glade/pytrainer.glade:4209 +#: glade/pytrainer.glade:4831 msgid "<b>Pace:</b>" msgstr "<b>Ritmo:</b>" -#: glade/pytrainer.glade:448 +#: glade/pytrainer.glade:451 msgid "<b>Ascent:</b>" msgstr "<b>Ascenso:</b>" -#: glade/pytrainer.glade:462 +#: glade/pytrainer.glade:465 msgid "<b>Calories:</b>" msgstr "<b>Calorías: </b>" -#: glade/pytrainer.glade:476 +#: glade/pytrainer.glade:479 msgid "<b>Comments:</b>" msgstr "<b>Comentarios:</b>" -#: glade/pytrainer.glade:611 +#: glade/pytrainer.glade:614 msgid "<b>Date:</b>" msgstr "<b>Fecha:</b>" -#: glade/pytrainer.glade:625 -#: glade/pytrainer.glade:2643 -#: glade/pytrainer.glade:3254 -#: glade/pytrainer.glade:3877 -#: glade/pytrainer.glade:4576 +#: glade/pytrainer.glade:628 +#: glade/pytrainer.glade:2687 +#: glade/pytrainer.glade:3298 +#: glade/pytrainer.glade:3921 +#: glade/pytrainer.glade:4620 msgid "<b>Distance:</b>" msgstr "<b>Distancia:</b>" -#: glade/pytrainer.glade:642 +#: glade/pytrainer.glade:645 msgid "<b>Max Speed</b>" msgstr "<b>Pico velocidad:</b>" -#: glade/pytrainer.glade:658 -#: glade/pytrainer.glade:2945 -#: glade/pytrainer.glade:3556 -#: glade/pytrainer.glade:4179 -#: glade/pytrainer.glade:4802 +#: glade/pytrainer.glade:661 +#: glade/pytrainer.glade:2989 +#: glade/pytrainer.glade:3600 +#: glade/pytrainer.glade:4223 +#: glade/pytrainer.glade:4846 msgid "<b>Max Pace:</b>" msgstr "<b>Pico ritmo:</b>" -#: glade/pytrainer.glade:674 +#: glade/pytrainer.glade:677 msgid "<b>Descent:</b>" msgstr "<b>Descenso:</b>" -#: glade/pytrainer.glade:766 -#: glade/pytrainer.glade:2855 -#: glade/pytrainer.glade:3422 -#: glade/pytrainer.glade:4045 -#: glade/pytrainer.glade:4502 +#: glade/pytrainer.glade:769 +#: glade/pytrainer.glade:2899 +#: glade/pytrainer.glade:3466 +#: glade/pytrainer.glade:4089 +#: glade/pytrainer.glade:4546 msgid "Cal" msgstr "Cal" -#: glade/pytrainer.glade:805 -#: glade/pytrainer.glade:2617 -#: glade/pytrainer.glade:3228 -#: glade/pytrainer.glade:3851 -#: glade/pytrainer.glade:4679 +#: glade/pytrainer.glade:808 +#: glade/pytrainer.glade:2661 +#: glade/pytrainer.glade:3272 +#: glade/pytrainer.glade:3895 +#: glade/pytrainer.glade:4723 +#: pytrainer/gui/windowmain.py:102 msgid "Km" msgstr "km" -#: glade/pytrainer.glade:888 -#: glade/pytrainer.glade:2777 -#: glade/pytrainer.glade:2810 -#: glade/pytrainer.glade:3377 -#: glade/pytrainer.glade:3470 -#: glade/pytrainer.glade:4000 -#: glade/pytrainer.glade:4093 -#: glade/pytrainer.glade:4722 -#: glade/pytrainer.glade:4738 -#: pytrainer/gui/windowmain.py:308 -#: pytrainer/gui/windowmain.py:309 -#: pytrainer/gui/windowmain.py:425 -#: pytrainer/gui/windowmain.py:426 -#: pytrainer/gui/windowmain.py:500 -#: pytrainer/gui/windowmain.py:501 -#: pytrainer/lib/activity.py:102 +#: glade/pytrainer.glade:823 +#: glade/pytrainer.glade:2821 +#: glade/pytrainer.glade:2854 +#: glade/pytrainer.glade:3421 +#: glade/pytrainer.glade:3514 +#: glade/pytrainer.glade:4044 +#: glade/pytrainer.glade:4137 +#: glade/pytrainer.glade:4766 +#: glade/pytrainer.glade:4782 +#: pytrainer/gui/windowmain.py:604 +#: pytrainer/gui/windowmain.py:605 +#: pytrainer/gui/windowmain.py:721 +#: pytrainer/gui/windowmain.py:722 +#: pytrainer/gui/windowmain.py:799 +#: pytrainer/gui/windowmain.py:800 +#: pytrainer/lib/activity.py:199 msgid "km/h" msgstr "km/h" -#: glade/pytrainer.glade:1039 +#: glade/pytrainer.glade:838 +msgid "<b>Equipment:</b>" +msgstr "<b>Material:</b>" + +#: glade/pytrainer.glade:1015 msgid " <b>Title:</b>" msgstr "<b>Título:</b>" -#: glade/pytrainer.glade:1089 -#: pytrainer/gui/windowmain.py:837 +#: glade/pytrainer.glade:1065 +#: pytrainer/gui/windowmain.py:1332 msgid "Show graph display options" msgstr "Mostrar opciones del gráfico" -#: glade/pytrainer.glade:1107 +#: glade/pytrainer.glade:1083 msgid "" "Profile\n" "Speed\n" "Pace\n" "Heart Rate\n" -"Cadence" +"Cadence\n" +"Percentage\n" +"Zone" msgstr "" "Perfil\n" "Velocidad\n" "Ritmo\n" -"Pulsaciones" +"Pulsaciones\n" +"Cadencia\n" +"Porcentaje\n" +"Zona" -#: glade/pytrainer.glade:1122 -#: glade/pytrainer.glade:3762 -#: glade/pytrainer.glade:4385 -#: glade/pytrainer.glade:5007 +#: glade/pytrainer.glade:1100 +#: glade/pytrainer.glade:3806 +#: glade/pytrainer.glade:4429 +#: glade/pytrainer.glade:5051 msgid "Versus" msgstr "contra" -#: glade/pytrainer.glade:1133 +#: glade/pytrainer.glade:1111 msgid "" "None\n" "Profile\n" @@ -801,197 +1037,198 @@ "Ritmo\n" "Pulsaciones\n" -#: glade/pytrainer.glade:1188 +#: glade/pytrainer.glade:1232 msgid "<small>Graph Display Options</small>" msgstr "<small>Opciones de visualización gráfica</small>" -#: glade/pytrainer.glade:1213 -#: glade/pytrainer.glade:1428 -#: glade/pytrainer.glade:1648 +#: glade/pytrainer.glade:1257 +#: glade/pytrainer.glade:1472 +#: glade/pytrainer.glade:1692 msgid "<small>Limits</small>" msgstr "<small>Límites</small>" -#: glade/pytrainer.glade:1225 -#: glade/pytrainer.glade:1440 -#: glade/pytrainer.glade:1694 +#: glade/pytrainer.glade:1269 +#: glade/pytrainer.glade:1484 +#: glade/pytrainer.glade:1738 msgid "<small>Min</small>" msgstr "<small>Mín</small>" -#: glade/pytrainer.glade:1237 -#: glade/pytrainer.glade:1452 -#: glade/pytrainer.glade:1706 +#: glade/pytrainer.glade:1281 +#: glade/pytrainer.glade:1496 +#: glade/pytrainer.glade:1750 msgid "<small>Max</small>" msgstr "<small>Máx</small>" -#: glade/pytrainer.glade:1286 -#: glade/pytrainer.glade:1508 +#: glade/pytrainer.glade:1330 +#: glade/pytrainer.glade:1552 msgid "<small>Color</small>" msgstr "<small>Color</small>" -#: glade/pytrainer.glade:1317 -#: glade/pytrainer.glade:1521 +#: glade/pytrainer.glade:1361 +#: glade/pytrainer.glade:1565 msgid "<small>Weight</small>" msgstr "<small>Peso</small>" -#: glade/pytrainer.glade:1347 +#: glade/pytrainer.glade:1391 msgid "Y1" msgstr "Y1" -#: glade/pytrainer.glade:1358 -#: glade/pytrainer.glade:1569 +#: glade/pytrainer.glade:1402 +#: glade/pytrainer.glade:1613 msgid "<small>Smoothing</small>" msgstr "<small>Suavizado</small>" -#: glade/pytrainer.glade:1498 +#: glade/pytrainer.glade:1542 msgid "Y2" msgstr "Y2" -#: glade/pytrainer.glade:1638 +#: glade/pytrainer.glade:1682 msgid "X" msgstr "X" -#: glade/pytrainer.glade:1719 +#: glade/pytrainer.glade:1763 msgid "<small>Distance</small>" msgstr "<small>Distancia</small>" -#: glade/pytrainer.glade:1748 +#: glade/pytrainer.glade:1792 msgid "<small>Time</small>" msgstr "<small>Tiempo</small>" -#: glade/pytrainer.glade:1809 +#: glade/pytrainer.glade:1853 msgid "Show Laps" msgstr "Mostras vueltas" -#: glade/pytrainer.glade:1848 +#: glade/pytrainer.glade:1892 msgid "Reset Graph" msgstr "Resetear" -#: glade/pytrainer.glade:1910 +#: glade/pytrainer.glade:1954 msgid "Redraw Map" msgstr "Restaurar" -#: glade/pytrainer.glade:1926 +#: glade/pytrainer.glade:1970 msgid "<small>Display map using:</small>" msgstr "<small>Opciones de visualización de mapas:</small>" -#: glade/pytrainer.glade:2028 +#: glade/pytrainer.glade:2072 msgid "<b>Beats:</b>" msgstr "<b>Pulsaciones:</b>" -#: glade/pytrainer.glade:2040 -#: glade/pytrainer.glade:2825 -#: glade/pytrainer.glade:3392 -#: glade/pytrainer.glade:4015 -#: glade/pytrainer.glade:4472 +#: glade/pytrainer.glade:2084 +#: glade/pytrainer.glade:2869 +#: glade/pytrainer.glade:3436 +#: glade/pytrainer.glade:4059 +#: glade/pytrainer.glade:4516 msgid "<b>Calories: </b>" msgstr "<b>Calorías: </b>" -#: glade/pytrainer.glade:2054 -#: glade/pytrainer.glade:2977 -#: glade/pytrainer.glade:3620 -#: glade/pytrainer.glade:4243 -#: glade/pytrainer.glade:4850 +#: glade/pytrainer.glade:2098 +#: glade/pytrainer.glade:3021 +#: glade/pytrainer.glade:3664 +#: glade/pytrainer.glade:4287 +#: glade/pytrainer.glade:4894 msgid "<b>Max Beats:</b>" msgstr "<b>Pico pulsaciones:</b>" -#: glade/pytrainer.glade:2068 +#: glade/pytrainer.glade:2112 msgid "<b>HR Zones Method:</b>" msgstr "<b>Método de cálculo:</b>" -#: glade/pytrainer.glade:2083 +#: glade/pytrainer.glade:2127 msgid "<b>HR Zone5:</b>" msgstr "<b>Máximo esfuerzo:</b>" -#: glade/pytrainer.glade:2098 -#: glade/pytrainer.glade:2297 +#: glade/pytrainer.glade:2142 +#: glade/pytrainer.glade:2341 msgid " bpm" msgstr "ppm" -#: glade/pytrainer.glade:2114 +#: glade/pytrainer.glade:2158 msgid " Cal" msgstr "Cal" -#: glade/pytrainer.glade:2172 +#: glade/pytrainer.glade:2216 msgid "<b>HR Zone4:</b>" msgstr "<b>Anaeróbica:</b>" -#: glade/pytrainer.glade:2188 +#: glade/pytrainer.glade:2232 msgid "<b>HR Zone3:</b>" msgstr "<b>Aeróbica:</b>" -#: glade/pytrainer.glade:2204 +#: glade/pytrainer.glade:2248 msgid "<b>HR Zone2:</b>" msgstr "<b>Quemagrasas:</b>" -#: glade/pytrainer.glade:2220 +#: glade/pytrainer.glade:2264 msgid "<b>HR Zone1:</b>" msgstr "<b>Recuperación:</b>" -#: glade/pytrainer.glade:2322 -#: glade/pytrainer.glade:2334 -#: glade/pytrainer.glade:2349 -#: glade/pytrainer.glade:2364 -#: glade/pytrainer.glade:2379 -#: glade/pytrainer.glade:2900 -#: glade/pytrainer.glade:2994 -#: glade/pytrainer.glade:3527 -#: glade/pytrainer.glade:3605 -#: glade/pytrainer.glade:4150 -#: glade/pytrainer.glade:4228 -#: glade/pytrainer.glade:4547 -#: glade/pytrainer.glade:4754 +#: glade/pytrainer.glade:2366 +#: glade/pytrainer.glade:2378 +#: glade/pytrainer.glade:2393 +#: glade/pytrainer.glade:2408 +#: glade/pytrainer.glade:2423 +#: glade/pytrainer.glade:2944 +#: glade/pytrainer.glade:3038 +#: glade/pytrainer.glade:3571 +#: glade/pytrainer.glade:3649 +#: glade/pytrainer.glade:4194 +#: glade/pytrainer.glade:4272 +#: glade/pytrainer.glade:4591 +#: glade/pytrainer.glade:4798 +#: pytrainer/lib/activity.py:413 msgid "bpm" msgstr "ppm" -#: glade/pytrainer.glade:2424 +#: glade/pytrainer.glade:2468 msgid " <b>Heart Rate:</b>" msgstr "<b>Pulsaciones:</b>" -#: glade/pytrainer.glade:2584 +#: glade/pytrainer.glade:2628 msgid "Record" msgstr "Registro" -#: glade/pytrainer.glade:2793 -#: glade/pytrainer.glade:3438 -#: glade/pytrainer.glade:4061 -#: glade/pytrainer.glade:4770 +#: glade/pytrainer.glade:2837 +#: glade/pytrainer.glade:3482 +#: glade/pytrainer.glade:4105 +#: glade/pytrainer.glade:4814 msgid "<b>Max Speed:</b>" msgstr "<b>Velocidad máxima:</b>" -#: glade/pytrainer.glade:2870 -#: glade/pytrainer.glade:3497 -#: glade/pytrainer.glade:4120 -#: glade/pytrainer.glade:4517 +#: glade/pytrainer.glade:2914 +#: glade/pytrainer.glade:3541 +#: glade/pytrainer.glade:4164 +#: glade/pytrainer.glade:4561 msgid "<b>Beats avg:</b>" msgstr "<b>Media pulsaciones:</b>" -#: glade/pytrainer.glade:2930 -#: glade/pytrainer.glade:2962 -#: glade/pytrainer.glade:3573 -#: glade/pytrainer.glade:3589 -#: glade/pytrainer.glade:4196 -#: glade/pytrainer.glade:4212 -#: glade/pytrainer.glade:4819 -#: glade/pytrainer.glade:4835 -#: pytrainer/gui/windowmain.py:310 -#: pytrainer/gui/windowmain.py:311 -#: pytrainer/gui/windowmain.py:427 -#: pytrainer/gui/windowmain.py:428 -#: pytrainer/gui/windowmain.py:502 -#: pytrainer/gui/windowmain.py:503 -#: pytrainer/lib/activity.py:103 +#: glade/pytrainer.glade:2974 +#: glade/pytrainer.glade:3006 +#: glade/pytrainer.glade:3617 +#: glade/pytrainer.glade:3633 +#: glade/pytrainer.glade:4240 +#: glade/pytrainer.glade:4256 +#: glade/pytrainer.glade:4863 +#: glade/pytrainer.glade:4879 +#: pytrainer/gui/windowmain.py:606 +#: pytrainer/gui/windowmain.py:607 +#: pytrainer/gui/windowmain.py:723 +#: pytrainer/gui/windowmain.py:724 +#: pytrainer/gui/windowmain.py:801 +#: pytrainer/gui/windowmain.py:802 +#: pytrainer/lib/activity.py:200 msgid "min/km" msgstr "min/km" -#: glade/pytrainer.glade:3084 +#: glade/pytrainer.glade:3128 msgid " <b>Date:</b>" msgstr "<b>Fecha:</b>" -#: glade/pytrainer.glade:3127 +#: glade/pytrainer.glade:3171 msgid "Value" msgstr "Valor" -#: glade/pytrainer.glade:3138 +#: glade/pytrainer.glade:3182 msgid "" "Stage Profile\n" "Stage Velocity\n" @@ -1001,17 +1238,17 @@ "Velocidad de Etapa\n" "Perfil/Velocidad de Etapa" -#: glade/pytrainer.glade:3194 +#: glade/pytrainer.glade:3238 msgid "Day" msgstr "Día" -#: glade/pytrainer.glade:3696 +#: glade/pytrainer.glade:3740 msgid " <b>Week:</b>" msgstr "<b>Semana:</b>" -#: glade/pytrainer.glade:3747 -#: glade/pytrainer.glade:4370 -#: glade/pytrainer.glade:4992 +#: glade/pytrainer.glade:3791 +#: glade/pytrainer.glade:4414 +#: glade/pytrainer.glade:5036 msgid "" "Distance\n" "Time\n" @@ -1025,9 +1262,9 @@ "Velocidad media\n" "Calorías" -#: glade/pytrainer.glade:3773 -#: glade/pytrainer.glade:4396 -#: glade/pytrainer.glade:5018 +#: glade/pytrainer.glade:3817 +#: glade/pytrainer.glade:4440 +#: glade/pytrainer.glade:5062 msgid "" "None\n" "Distance\n" @@ -1043,47 +1280,71 @@ "Velocidad media\n" "Calorías" -#: glade/pytrainer.glade:3817 +#: glade/pytrainer.glade:3861 msgid "Week" msgstr "Semana" -#: glade/pytrainer.glade:4319 +#: glade/pytrainer.glade:4363 msgid " <b>Month:</b>" msgstr "<b>Mes:</b>" -#: glade/pytrainer.glade:4439 +#: glade/pytrainer.glade:4483 msgid "Month" msgstr "Mes" -#: glade/pytrainer.glade:4941 +#: glade/pytrainer.glade:4985 msgid " <b>Year:</b>" msgstr "<b>Año:</b>" -#: glade/pytrainer.glade:5061 +#: glade/pytrainer.glade:5105 msgid "Year" msgstr "Año" -#: glade/pytrainer.glade:5084 -msgid "Equipment" -msgstr "Equipamiento" +#: glade/pytrainer.glade:5259 +msgid "<b>Graph</b>" +msgstr "<b>Gráfico</b>" -#: glade/pytrainer.glade:5126 +#: glade/pytrainer.glade:5300 +msgid "<b>History</b>" +msgstr "<b>Histórico</b>" + +#: glade/pytrainer.glade:5364 msgid "<b>Title:</b>" msgstr "<b>Título:</b>" -#: glade/pytrainer.glade:5149 +#: glade/pytrainer.glade:5387 msgid "Search" msgstr "Buscar" -#: glade/pytrainer.glade:5176 +#: glade/pytrainer.glade:5411 +msgid "All Distances" +msgstr "Todas las distancias" + +#: glade/pytrainer.glade:5420 +msgid "All Durations" +msgstr "Todas las duraciones" + +#: glade/pytrainer.glade:5430 +msgid "" +"All time\n" +"Last 4 weeks\n" +"Last 6 months\n" +"Last 12 months" +msgstr "" +"De siempre\n" +"Últimas 4 semanas\n" +"Últimos 6 meses\n" +"Últimos 12 meses" + +#: glade/pytrainer.glade:5467 msgid "Columns" msgstr "Columnas" -#: glade/pytrainer.glade:5315 +#: glade/pytrainer.glade:5594 msgid "Type:" msgstr "Tipo:" -#: glade/pytrainer.glade:5328 +#: glade/pytrainer.glade:5607 msgid "" "Font\n" "Restaurant\n" @@ -1095,22 +1356,34 @@ "Mirador\n" "Cumbre" -#: glade/pytrainer.glade:5344 +#: glade/pytrainer.glade:5623 msgid "Latitude: " msgstr "<b>Latitud:</b>" -#: glade/pytrainer.glade:5358 +#: glade/pytrainer.glade:5637 msgid " Name:" msgstr "Nombre:" -#: glade/pytrainer.glade:5370 +#: glade/pytrainer.glade:5649 msgid "Longitude:" msgstr "<b>Longitud:</b>" -#: glade/pytrainer.glade:5462 +#: glade/pytrainer.glade:5741 msgid "<b> Waypoint: </b>" msgstr "<b> Waypoint: </b>" +#: glade/pytrainer.glade:5925 +msgid "Edit Record" +msgstr "Editar entrada" + +#: glade/pytrainer.glade:5939 +msgid "Show graph in classic view" +msgstr "Mostrar gráfico en vista clásica" + +#: glade/pytrainer.glade:5953 +msgid "Merge tracks" +msgstr "Combinar entrenamientos" + #: glade/selecttrackdialog.glade:7 msgid "Select track record" msgstr "Seleccione uno de los tracks" @@ -1120,437 +1393,543 @@ msgid "Warning" msgstr "Advertencia" -#: pytrainer/gui/windowmain.py:75 -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:82 +#: pytrainer/gui/windowmain.py:100 +msgid "Miles" +msgstr "Millas" + +#: pytrainer/gui/windowmain.py:103 +#: pytrainer/gui/windowmain.py:107 +#: pytrainer/gui/windowmain.py:120 +#: pytrainer/gui/windowmain.py:123 msgid "id" msgstr "id" -#: pytrainer/gui/windowmain.py:75 +#: pytrainer/gui/windowmain.py:103 msgid "Start" msgstr "Comienzo" -#: pytrainer/gui/windowmain.py:75 -msgid "Kilometer" -msgstr "Kilómetros" - -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:738 -msgid "Title" -msgstr "Título" - -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:739 -#: pytrainer/gui/dialogselecttrack.py:40 -msgid "Date" -msgstr "Fecha" - -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:740 -#: pytrainer/gui/windowimportdata.py:333 -#: pytrainer/gui/windowrecord.py:147 -#: pytrainer/extensions/googlemaps.py:76 -#: pytrainer/extensions/osm.py:51 +#: pytrainer/gui/windowmain.py:110 +#: pytrainer/gui/windowmain.py:393 +#: pytrainer/gui/windowmain.py:1115 +#: pytrainer/gui/windowimportdata.py:352 +#: pytrainer/gui/windowrecord.py:210 +#: pytrainer/lib/activity.py:310 +#: pytrainer/lib/activity.py:374 +#: pytrainer/lib/activity.py:385 +#: pytrainer/lib/activity.py:394 +#: pytrainer/lib/activity.py:403 +#: pytrainer/lib/activity.py:412 +#: pytrainer/lib/activity.py:422 +#: pytrainer/lib/activity.py:431 +#: pytrainer/extensions/googlemaps.py:71 +#: pytrainer/extensions/osm.py:50 msgid "Distance" msgstr "Distancia" -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:742 -#: pytrainer/extensions/googlemaps.py:76 -#: pytrainer/extensions/osm.py:51 +#: pytrainer/gui/windowmain.py:112 +#: pytrainer/gui/windowmain.py:394 +#: pytrainer/gui/windowmain.py:1117 +#: pytrainer/extensions/googlemaps.py:71 +#: pytrainer/extensions/osm.py:50 msgid "Time" msgstr "Tiempo" -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:743 -msgid "Beats" -msgstr "Pulsaciones" +#: pytrainer/gui/windowmain.py:113 +msgid "⌀ HR" +msgstr "⌀ FC" -#: pytrainer/gui/windowmain.py:78 -#: pytrainer/gui/windowmain.py:744 -msgid "Average" -msgstr "Media" +#: pytrainer/gui/windowmain.py:114 +msgid "⌀ Speed" +msgstr "⌀ Velocidad" -#: pytrainer/gui/windowmain.py:82 +#: pytrainer/gui/windowmain.py:120 msgid "Waypoint" msgstr "Waypoint" -#: pytrainer/gui/windowmain.py:293 +#: pytrainer/gui/windowmain.py:125 +msgid "Weight" +msgstr "Peso" + +#: pytrainer/gui/windowmain.py:126 +msgid "Body Fat %" +msgstr "Grasa corporal %" + +#: pytrainer/gui/windowmain.py:127 +msgid "Resting HR" +msgstr "FC en reposo" + +#: pytrainer/gui/windowmain.py:128 +msgid "Max HR" +msgstr "FC max" + +#: pytrainer/gui/windowmain.py:395 +msgid "Laps" +msgstr "Vueltas" + +#: pytrainer/gui/windowmain.py:447 +msgid "Reset Limits" +msgstr "Borrar límites" + +#: pytrainer/gui/windowmain.py:449 +msgid "Set Limits" +msgstr "Establecer límites" + +#: pytrainer/gui/windowmain.py:589 msgid "Percentages method" msgstr "basado en porcentajes" -#: pytrainer/gui/windowmain.py:301 -#: pytrainer/gui/windowmain.py:418 -#: pytrainer/gui/windowmain.py:493 -#: pytrainer/lib/activity.py:96 +#: pytrainer/gui/windowmain.py:597 +#: pytrainer/gui/windowmain.py:714 +#: pytrainer/gui/windowmain.py:792 +#: pytrainer/lib/activity.py:193 msgid "miles" msgstr "millas" -#: pytrainer/gui/windowmain.py:302 -#: pytrainer/gui/windowmain.py:303 -#: pytrainer/gui/windowmain.py:419 -#: pytrainer/gui/windowmain.py:420 -#: pytrainer/gui/windowmain.py:494 -#: pytrainer/gui/windowmain.py:495 -#: pytrainer/lib/activity.py:97 +#: pytrainer/gui/windowmain.py:598 +#: pytrainer/gui/windowmain.py:599 +#: pytrainer/gui/windowmain.py:715 +#: pytrainer/gui/windowmain.py:716 +#: pytrainer/gui/windowmain.py:793 +#: pytrainer/gui/windowmain.py:794 +#: pytrainer/lib/activity.py:194 msgid "miles/h" msgstr "millas/h" -#: pytrainer/gui/windowmain.py:304 -#: pytrainer/gui/windowmain.py:305 -#: pytrainer/gui/windowmain.py:421 -#: pytrainer/gui/windowmain.py:422 -#: pytrainer/gui/windowmain.py:496 -#: pytrainer/gui/windowmain.py:497 -#: pytrainer/lib/activity.py:98 +#: pytrainer/gui/windowmain.py:600 +#: pytrainer/gui/windowmain.py:601 +#: pytrainer/gui/windowmain.py:717 +#: pytrainer/gui/windowmain.py:718 +#: pytrainer/gui/windowmain.py:795 +#: pytrainer/gui/windowmain.py:796 +#: pytrainer/lib/activity.py:195 msgid "min/mile" msgstr "min/milla" -#: pytrainer/gui/windowmain.py:307 -#: pytrainer/gui/windowmain.py:424 -#: pytrainer/gui/windowmain.py:499 -#: pytrainer/lib/activity.py:101 +#: pytrainer/gui/windowmain.py:603 +#: pytrainer/gui/windowmain.py:720 +#: pytrainer/gui/windowmain.py:798 +#: pytrainer/lib/activity.py:198 msgid "km" msgstr "km" -#: pytrainer/gui/windowmain.py:833 +#: pytrainer/gui/windowmain.py:1118 +#: pytrainer/recordgraph.py:144 +msgid "Beats" +msgstr "Pulsaciones" + +#: pytrainer/gui/windowmain.py:1119 +msgid "Average" +msgstr "Media" + +#: pytrainer/gui/windowmain.py:1328 msgid "Hide graph display options" msgstr "Ocultar configuración de visualización gráfica" -#: pytrainer/gui/windowmain.py:1082 +#: pytrainer/gui/windowmain.py:1624 msgid "lap" msgstr "vuelta" -#: pytrainer/gui/windowmain.py:1088 -#: pytrainer/gui/drawArea.py:143 -#: pytrainer/extensions/googlemaps.py:74 -#: pytrainer/extensions/osm.py:49 +#: pytrainer/gui/windowmain.py:1634 +#: pytrainer/gui/drawArea.py:165 +#: pytrainer/extensions/googlemaps.py:69 +#: pytrainer/extensions/osm.py:48 msgid "h" msgstr "h" -#: pytrainer/gui/windowmain.py:1088 -#: pytrainer/gui/windowmain.py:1090 -#: pytrainer/lib/activity.py:104 +#: pytrainer/gui/windowmain.py:1634 +#: pytrainer/gui/windowmain.py:1636 +#: pytrainer/lib/activity.py:201 msgid "m" msgstr "m" -#: pytrainer/gui/windowmain.py:1088 -#: pytrainer/gui/windowmain.py:1090 +#: pytrainer/gui/windowmain.py:1634 +#: pytrainer/gui/windowmain.py:1636 msgid "s" msgstr "s" -#: pytrainer/gui/windowimportdata.py:110 +#: pytrainer/gui/windowmain.py:1720 +#: pytrainer/record.py:63 +msgid "Edit Entry" +msgstr "Editar entrada" + +#: pytrainer/gui/windowmain.py:1731 +msgid "Delete Entry" +msgstr "Borrar entrada" + +#: pytrainer/gui/windowmain.py:1755 +msgid "Create Athlete Entry" +msgstr "Crear entrada de atleta" + +#: pytrainer/gui/windowmain.py:1759 +msgid "Edit Athlete Entry" +msgstr "Editar atleta" + +#: pytrainer/gui/windowmain.py:1840 +#: pytrainer/main.py:421 +msgid "Delete this database entry?" +msgstr "¿Borrar esta entrada de la base de datos?" + +#: pytrainer/gui/windowmain.py:1842 +msgid "Are you sure?" +msgstr "¿Está seguro?" + +#: pytrainer/gui/windowimportdata.py:116 msgid "No file selected" msgstr "Ningún fichero seleccionado" -#: pytrainer/gui/windowimportdata.py:155 +#: pytrainer/gui/windowimportdata.py:161 msgid "Configure" msgstr "Configurar" -#: pytrainer/gui/windowimportdata.py:156 +#: pytrainer/gui/windowimportdata.py:162 msgid "Run" msgstr "Ejecutar" -#: pytrainer/gui/windowimportdata.py:164 +#: pytrainer/gui/windowimportdata.py:170 msgid "Disabled" msgstr "Desactivo" -#: pytrainer/gui/windowimportdata.py:166 +#: pytrainer/gui/windowimportdata.py:172 msgid "Enabled" msgstr "Activo" -#: pytrainer/gui/windowimportdata.py:233 +#: pytrainer/gui/windowimportdata.py:252 msgid "GPS device found" msgstr "Dispositivos GPS encontrado" -#: pytrainer/gui/windowimportdata.py:236 +#: pytrainer/gui/windowimportdata.py:255 msgid "GPS device <b>not</b> found" msgstr "Dispositivo GPS <b>no</b> encontrado" -#: pytrainer/gui/windowimportdata.py:243 +#: pytrainer/gui/windowimportdata.py:262 msgid "This tool was not found on the system" msgstr "No se ha encontrado esta herramienta en el sistema" -#: pytrainer/gui/windowimportdata.py:245 +#: pytrainer/gui/windowimportdata.py:264 msgid " Homepage" msgstr "Página de inicio" -#: pytrainer/gui/windowimportdata.py:298 +#: pytrainer/gui/windowimportdata.py:317 msgid "File" msgstr "Archivo" -#: pytrainer/gui/windowimportdata.py:298 +#: pytrainer/gui/windowimportdata.py:317 msgid "Type" msgstr "Tipo" -#: pytrainer/gui/windowimportdata.py:298 +#: pytrainer/gui/windowimportdata.py:317 msgid "Activities" msgstr "Actividades" -#: pytrainer/gui/windowimportdata.py:333 -#: pytrainer/gui/windowrecord.py:147 +#: pytrainer/gui/windowimportdata.py:352 +#: pytrainer/gui/windowrecord.py:210 msgid "Start Time" msgstr "Hora de comienzo" -#: pytrainer/gui/windowimportdata.py:333 -#: pytrainer/gui/windowrecord.py:147 +#: pytrainer/gui/windowimportdata.py:352 +#: pytrainer/gui/windowrecord.py:210 msgid "Duration" msgstr "Duración" -#: pytrainer/gui/windowimportdata.py:333 -msgid "Notes" -msgstr "Notas" - -#: pytrainer/gui/windowimportdata.py:482 +#: pytrainer/gui/windowimportdata.py:501 msgid "Imported into database" msgstr "Importado a base de datos" -#: pytrainer/gui/windowimportdata.py:526 +#: pytrainer/gui/windowimportdata.py:545 #: pytrainer/gui/windowextensions.py:81 #: pytrainer/gui/windowplugins.py:80 #, python-format msgid "%s settings" msgstr "%s opciones" -#: pytrainer/gui/windowimportdata.py:541 +#: pytrainer/gui/windowimportdata.py:560 #: pytrainer/gui/windowextensions.py:70 #: pytrainer/gui/windowplugins.py:71 #: pytrainer/gui/windowplugins.py:95 msgid "Disable" msgstr "Desactivo" -#: pytrainer/gui/windowimportdata.py:542 +#: pytrainer/gui/windowimportdata.py:561 #: pytrainer/gui/windowextensions.py:72 #: pytrainer/gui/windowplugins.py:69 #: pytrainer/gui/windowplugins.py:96 msgid "Enable" msgstr "Activo" -#: pytrainer/gui/windowimportdata.py:549 +#: pytrainer/gui/windowimportdata.py:568 #: pytrainer/gui/windowplugins.py:103 msgid "Ok" msgstr "Ok" -#: pytrainer/gui/windowimportdata.py:609 +#: pytrainer/gui/windowimportdata.py:628 msgid "Saving options" msgstr "Guardar configuración" -#: pytrainer/gui/windowimportdata.py:611 +#: pytrainer/gui/windowimportdata.py:630 msgid "Options saved" msgstr "Configuración guardada" -#: pytrainer/gui/windowimportdata.py:636 +#: pytrainer/gui/windowimportdata.py:655 msgid "Importing one activity" msgstr "Importando una actividad" -#: pytrainer/gui/windowimportdata.py:637 +#: pytrainer/gui/windowimportdata.py:656 msgid "Imported one activity" msgstr "Una actividad importada" -#: pytrainer/gui/windowimportdata.py:639 +#: pytrainer/gui/windowimportdata.py:658 #, python-format msgid "Importing %d activities" msgstr "Importando %d actividades" -#: pytrainer/gui/windowimportdata.py:640 +#: pytrainer/gui/windowimportdata.py:659 #, python-format msgid "Imported %d activities" msgstr "Importadas %d actividades" -#: pytrainer/gui/windowimportdata.py:659 +#: pytrainer/gui/windowimportdata.py:678 msgid "Choose a file (or files) to import activities from" msgstr "Seleccione fichero/s desde el/los que importar actividades" -#: pytrainer/gui/windowimportdata.py:674 -#: pytrainer/gui/windowimportdata.py:675 +#: pytrainer/gui/windowimportdata.py:693 +#: pytrainer/gui/windowimportdata.py:694 #, python-format msgid "Found file of type: %s" msgstr "Tipo de fichero encontrado: %s" -#: pytrainer/gui/windowimportdata.py:699 +#: pytrainer/gui/windowimportdata.py:718 msgid "Found in database" msgstr "Encontrado en base de datos" -#: pytrainer/gui/windowimportdata.py:714 -#: pytrainer/gui/windowimportdata.py:715 +#: pytrainer/gui/windowimportdata.py:733 +#: pytrainer/gui/windowimportdata.py:734 #, python-format msgid "File %s is of unknown or unsupported file type" msgstr "Fichero %s seleccionado desconocido o no soportado" -#: pytrainer/gui/drawArea.py:144 -#: pytrainer/extensions/googlemaps.py:74 -#: pytrainer/extensions/osm.py:49 +#: pytrainer/gui/windowimportdata.py:807 +#, python-format +msgid "Column %d" +msgstr "Columna %d" + +#: pytrainer/gui/drawArea.py:166 +#: pytrainer/extensions/googlemaps.py:69 +#: pytrainer/extensions/osm.py:48 msgid "min" msgstr "min" -#: pytrainer/gui/windowrecord.py:147 +#: pytrainer/gui/drawArea.py:399 +msgid "rest" +msgstr "descanso" + +#: pytrainer/gui/windowrecord.py:210 msgid "GPX File" msgstr "Archivo GPX" -#: pytrainer/gui/windowprofile.py:38 +#: pytrainer/gui/windowprofile.py:41 msgid "Male" msgstr "Varón" -#: pytrainer/gui/windowprofile.py:39 +#: pytrainer/gui/windowprofile.py:42 msgid "Female" msgstr "Mujer" -#: pytrainer/gui/windowprofile.py:56 +#: pytrainer/gui/windowprofile.py:59 msgid "MET" msgstr "M.E.T." +#: pytrainer/gui/windowprofile.py:59 +msgid "Maximum Pace" +msgstr "Ritmo más rápido" + #: pytrainer/gui/dialogselecttrack.py:40 msgid "Track Name" msgstr "Nombre de la ruta" +#: pytrainer/gui/drawGraph.py:155 +msgid "Athlete Data" +msgstr "Datos del atleta" + #: pytrainer/gui/windowextensions.py:112 #: pytrainer/gui/windowextensions.py:125 msgid "OK" msgstr "Ok" -#: pytrainer/recordgraph.py:132 #: pytrainer/recordgraph.py:134 -#: pytrainer/recordgraph.py:136 -#: pytrainer/recordgraph.py:138 -#: pytrainer/recordgraph.py:140 -#: pytrainer/monthgraph.py:69 -#: pytrainer/heartrategraph.py:36 -#: pytrainer/yeargraph.py:70 #: pytrainer/daygraph.py:52 -#: pytrainer/daygraph.py:54 -#: pytrainer/daygraph.py:56 -#: pytrainer/weekgraph.py:115 -msgid "Distance (km)" -msgstr "Distancia (km)" - -#: pytrainer/recordgraph.py:132 -#: pytrainer/daygraph.py:52 msgid "Height (m)" msgstr "Altura (m)" -#: pytrainer/recordgraph.py:132 +#: pytrainer/recordgraph.py:134 #: pytrainer/daygraph.py:52 msgid "Stage Profile" msgstr "Perfil de Etapa" -#: pytrainer/recordgraph.py:134 +#: pytrainer/recordgraph.py:136 msgid "Speed (Km/h)" msgstr "Velocidad (km/h)" -#: pytrainer/recordgraph.py:134 +#: pytrainer/recordgraph.py:136 +#: pytrainer/lib/activity.py:393 +#: pytrainer/lib/activity.py:395 msgid "Speed" msgstr "Velocidad" -#: pytrainer/recordgraph.py:136 -msgid "Pace (min/km)" -msgstr "Ritmo (min/km)" - -#: pytrainer/recordgraph.py:136 +#: pytrainer/recordgraph.py:138 +#: pytrainer/lib/activity.py:311 +#: pytrainer/lib/activity.py:402 +#: pytrainer/lib/activity.py:404 msgid "Pace" msgstr "Ritmo" -#: pytrainer/recordgraph.py:138 +#: pytrainer/recordgraph.py:140 #: pytrainer/heartrategraph.py:36 #: pytrainer/daygraph.py:56 msgid "Beats (bpm)" msgstr "Media pulsaciones (ppm)" -#: pytrainer/recordgraph.py:140 +#: pytrainer/recordgraph.py:142 msgid "Cadence (rpm)" msgstr "Cadencia (rpm)" -#: pytrainer/recordgraph.py:140 +#: pytrainer/recordgraph.py:142 +#: pytrainer/lib/activity.py:430 +#: pytrainer/lib/activity.py:432 msgid "Cadence" msgstr "Cadence" -#: pytrainer/profile.py:168 +#: pytrainer/recordgraph.py:144 +msgid "Beats (%)" +msgstr "Pulsaciones (%)" + +#: pytrainer/recordgraph.py:146 +msgid "Zone" +msgstr "Zona" + +#: pytrainer/profile.py:109 msgid "Moderate activity" msgstr "Actividad moderada" -#: pytrainer/profile.py:169 +#: pytrainer/profile.py:110 msgid "Weight Control" msgstr "Control de peso" -#: pytrainer/profile.py:170 +#: pytrainer/profile.py:111 msgid "Aerobic" msgstr "Aeróbico" -#: pytrainer/profile.py:171 +#: pytrainer/profile.py:112 msgid "Anaerobic" msgstr "Anaeróbico" -#: pytrainer/profile.py:172 +#: pytrainer/profile.py:113 msgid "VO2 MAX" msgstr "VO2 máximo" -#: pytrainer/lib/gpx.py:119 +#: pytrainer/lib/gpx.py:122 msgid "No Name" msgstr "Sin nombre" -#: pytrainer/lib/gpx.py:126 +#: pytrainer/lib/gpx.py:129 msgid "No Data" msgstr "Sin datos" -#: pytrainer/lib/activity.py:99 +#: pytrainer/lib/activity.py:196 msgid "feet" msgstr "pies" -#: pytrainer/monthgraph.py:69 -#: pytrainer/monthgraph.py:71 -#: pytrainer/monthgraph.py:73 -#: pytrainer/monthgraph.py:75 -#: pytrainer/monthgraph.py:77 +#: pytrainer/lib/activity.py:309 +msgid "Pace by Lap" +msgstr "Ritmo por vuelta" + +#: pytrainer/lib/activity.py:315 +#: pytrainer/lib/activity.py:379 +#: pytrainer/lib/activity.py:389 +#: pytrainer/lib/activity.py:398 +#: pytrainer/lib/activity.py:407 +#: pytrainer/lib/activity.py:416 +#: pytrainer/lib/activity.py:426 +#: pytrainer/lib/activity.py:435 +msgid "Time (seconds)" +msgstr "Tiempo (segundos)" + +#: pytrainer/lib/activity.py:373 +#: pytrainer/lib/activity.py:375 +msgid "Elevation" +msgstr "Altura" + +#: pytrainer/lib/activity.py:384 +#: pytrainer/lib/activity.py:386 +msgid "Corrected Elevation" +msgstr "Altura corregida" + +#: pytrainer/lib/activity.py:421 +#, python-format +msgid "Heart Rate (% of max)" +msgstr "Frecuencia cardíaca (% del máx.)" + +#: pytrainer/lib/activity.py:423 +msgid "%" +msgstr "%" + +#: pytrainer/lib/activity.py:432 +msgid "rpm" +msgstr "rpm" + +#: pytrainer/monthgraph.py:70 +#: pytrainer/monthgraph.py:72 +#: pytrainer/monthgraph.py:74 +#: pytrainer/monthgraph.py:76 +#: pytrainer/monthgraph.py:78 msgid "day" msgstr "día" -#: pytrainer/monthgraph.py:69 +#: pytrainer/monthgraph.py:70 #: pytrainer/weekgraph.py:115 msgid "Daily Distance" msgstr "Distancia" -#: pytrainer/monthgraph.py:71 +#: pytrainer/monthgraph.py:72 #: pytrainer/yeargraph.py:72 #: pytrainer/weekgraph.py:117 msgid "Time (hours)" msgstr "Tiempo en horas" -#: pytrainer/monthgraph.py:71 +#: pytrainer/monthgraph.py:72 #: pytrainer/weekgraph.py:117 msgid "Daily Time" msgstr "Tiempo diario" -#: pytrainer/monthgraph.py:73 +#: pytrainer/monthgraph.py:74 #: pytrainer/yeargraph.py:74 #: pytrainer/weekgraph.py:119 msgid "Average Heart Rate (bpm)" msgstr "Pulsaciones medias (ppm)" -#: pytrainer/monthgraph.py:73 +#: pytrainer/monthgraph.py:74 #: pytrainer/weekgraph.py:119 msgid "Daily Average Heart Rate" msgstr "Pulsaciones diarias" -#: pytrainer/monthgraph.py:75 -#: pytrainer/yeargraph.py:76 +#: pytrainer/monthgraph.py:76 #: pytrainer/weekgraph.py:121 -msgid "Average Speed (km/h)" -msgstr "Velocidad media (km/h)" - -#: pytrainer/monthgraph.py:75 -#: pytrainer/weekgraph.py:121 msgid "Daily Average Speed" msgstr "medias diarias" -#: pytrainer/monthgraph.py:77 +#: pytrainer/monthgraph.py:78 #: pytrainer/weekgraph.py:123 msgid "Daily Calories" msgstr "Calorías diarias" -#: pytrainer/record.py:63 -msgid "Edit Entry" -msgstr "Editar entrada" +#: pytrainer/athlete.py:52 +msgid "lb" +msgstr "lb" -#: pytrainer/record.py:446 +#: pytrainer/athlete.py:54 +msgid "kg" +msgstr "kg" + +#: pytrainer/record.py:513 msgid "pyTrainer can't import data from your gpx file" msgstr "pyTrainer no puede importar datos de tu fichero gpx" @@ -1594,11 +1973,7 @@ msgid "Velocity" msgstr "Velocidad" -#: pytrainer/main.py:422 -msgid "Delete this database entry?" -msgstr "¿Borrar esta entrada de la base de datos?" - -#: pytrainer/main.py:436 +#: pytrainer/main.py:435 msgid "Delete this waypoint?" msgstr "¿Borrar este waypoint?" @@ -1614,6 +1989,10 @@ msgid "Garmin training center database file version 1" msgstr "Versión 1 del fichero Garmin training center database" +#: import/file_gpxplusNokia.py:41 +msgid "Nokia Export - GPS eXchange file" +msgstr "Nokia Export - Fichero de intercambio GPS" + #: import/tool_gpsbabel.py:37 msgid "GPSBabel" msgstr "GPSBabel" @@ -1634,15 +2013,19 @@ msgid "Garmin training center database file version 2" msgstr "Versión 2 del fichero Garmin training center database" -#: extensions/openstreetmap/openstreetmap.py:27 +#: extensions/fixelevation/fixelevation.py:94 +msgid "Elevation Correction Complete" +msgstr "Corrección de altura completada" + +#: extensions/openstreetmap/openstreetmap.py:30 msgid "Must have username and password configured" msgstr "Es obligatorio indicar nombre de usuario y contraseña" -#: extensions/openstreetmap/openstreetmap.py:29 +#: extensions/openstreetmap/openstreetmap.py:32 msgid "Openstreetmap Extension Error" msgstr "Error de la extensión OpenStreetMap" -#: extensions/openstreetmap/openstreetmap.py:66 +#: extensions/openstreetmap/openstreetmap.py:79 msgid "" "Posting GPX trace to Openstreetmap\n" "\n" @@ -1652,27 +2035,91 @@ "\n" "Por favor espere, puede durar varios minutos" -#: extensions/openstreetmap/openstreetmap.py:68 +#: extensions/openstreetmap/openstreetmap.py:81 msgid "Openstreetmap Extension Processing" msgstr "Procesando extensión OpenStreetMap" -#: extensions/openstreetmap/openstreetmap.py:86 +#: extensions/openstreetmap/openstreetmap.py:99 msgid "Openstreetmap Extension Upload Complete" msgstr "Envío completo de la extensión OpenStreetMap" -#: extensions/openstreetmap/openstreetmap.py:96 +#: extensions/openstreetmap/openstreetmap.py:109 msgid "Please add any additional information for this upload" msgstr "Por favor indique información adicional para este envío" -#: extensions/wordpress/wordpress.py:42 +#: extensions/wordpress/wordpress.py:46 msgid "Posting to Wordpress blog" msgstr "Subir a blog de Wordpress" -#: extensions/wordpress/wordpress.py:44 +#: extensions/wordpress/wordpress.py:48 msgid "Wordpress Extension Processing" msgstr "Procesando extensión Wordpress" -#: extensions/wordpress/wordpress.py:137 +#: extensions/wordpress/wordpress.py:144 msgid "Wordpress Extension Upload Complete" msgstr "Envío completo a Wordpress" +#~ msgid "Googlemaps v3" +#~ msgstr "Googlemaps v3" + +#~ 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>" + +#~ msgid "Unified Import" +#~ msgstr "Importar" + +#~ msgid "<small>Is the Unified Importer active?</small>" +#~ msgstr "<small>¿Está habilitado el importador unificado?</small>" + +#~ msgid "Equipment handling" +#~ msgstr "Gestión de equipamiento" + +#~ msgid "<small>Want to track equipment?</small>" +#~ msgstr "<small>¿Control de equipamiento?</small>" + +#~ 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>" + +#~ msgid "Category:" +#~ msgstr "Categoría:" + +#~ msgid "" +#~ "Running shoes\n" +#~ "GPS watch\n" +#~ "T-shirts\n" +#~ "Tyres\n" +#~ "Socks" +#~ msgstr "" +#~ "Zapatillas de correr\n" +#~ "Reloj GPS\n" +#~ "Camiseta\n" +#~ "Rueda\n" +#~ "Calcetines" + +#~ msgid "New equipment" +#~ msgstr "Nuevo equipamiento" + +#~ msgid "Kilometer" +#~ msgstr "Kilómetros" + +#~ msgid "Elevation v Distance" +#~ msgstr "Altura vs Distancia" + +#~ msgid "Elevation v Time" +#~ msgstr "Altura vs Tiempo" + +#~ msgid "Speed v Distance" +#~ msgstr "Velocidad vs Distancia" + +#~ msgid "Pace v Distance" +#~ msgstr "Ritmo vs Distancia" + +#~ msgid "Heart Rate v Distance" +#~ msgstr "Pulsaciones vs Distancia" + +#~ msgid "Cadence v ... [truncated message content] |
From: <jb...@us...> - 2010-11-16 21:10:40
|
Revision: 714 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=714&view=rev Author: jblance Date: 2010-11-16 21:10:33 +0000 (Tue, 16 Nov 2010) Log Message: ----------- Update startup script to use correct version of python Modified Paths: -------------- pytrainer/trunk/bin/pytrainer Modified: pytrainer/trunk/bin/pytrainer =================================================================== --- pytrainer/trunk/bin/pytrainer 2010-11-16 16:42:27 UTC (rev 713) +++ pytrainer/trunk/bin/pytrainer 2010-11-16 21:10:33 UTC (rev 714) @@ -25,6 +25,7 @@ import os import glob import commands +import platform def _max(one, two): '''Function to determine the max of two versions of format /xx/xxx/????-1.2.3 ''' @@ -62,7 +63,9 @@ bin_path = os.path.realpath(os.path.dirname(__file__)) # directory that the pytrainer script executes from e.g. /usr/bin or /usr/local/bin -base_path = os.path.dirname(bin_path) +base_path = os.path.dirname(bin_path) +#Get the version of the running python interpreter +ver = platform.python_version_tuple() if (os.path.exists(base_path + "/INSTALL") and os.path.exists(base_path + "/setup.py") @@ -75,7 +78,7 @@ else: print("running pytrainer from egg installation") data_path = base_path + "/share/pytrainer/" - site_path = base_path + "/lib/python2.6/site-packages" + site_path = "%s/lib/python%s.%s/site-packages" % (base_path, ver[0], ver[1]) gettext_path = base_path + "/share/locale" print "data_path: " + data_path This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-11-16 16:42:33
|
Revision: 713 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=713&view=rev Author: dgranda Date: 2010-11-16 16:42:27 +0000 (Tue, 16 Nov 2010) Log Message: ----------- Added alternative paths to start from sources - thx to Martin. Updated revision Modified Paths: -------------- pytrainer/trunk/bin/pytrainer pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/bin/pytrainer =================================================================== --- pytrainer/trunk/bin/pytrainer 2010-11-16 16:39:39 UTC (rev 712) +++ pytrainer/trunk/bin/pytrainer 2010-11-16 16:42:27 UTC (rev 713) @@ -17,12 +17,10 @@ #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -import locale import gettext import sys import pygtk pygtk.require('2.0') -import gtk import gtk.glade import os import glob @@ -66,19 +64,29 @@ bin_path = os.path.realpath(os.path.dirname(__file__)) # directory that the pytrainer script executes from e.g. /usr/bin or /usr/local/bin base_path = os.path.dirname(bin_path) -data_path = base_path + "/share/pytrainer/" -site_path = base_path + "/lib/python2.6/site-packages" -DIR = base_path + "/share/locale" +if (os.path.exists(base_path + "/INSTALL") + and os.path.exists(base_path + "/setup.py") + and os.path.exists(base_path + "/pytrainer/main.py") + and os.path.exists(base_path + "/locale")): + print("running pytrainer from source path") + data_path = base_path + "/" + site_path = base_path + gettext_path = base_path + "/locale" +else: + print("running pytrainer from egg installation") + data_path = base_path + "/share/pytrainer/" + site_path = base_path + "/lib/python2.6/site-packages" + gettext_path = base_path + "/share/locale" print "data_path: " + data_path -print "DIR: " + DIR +print "gettext_path: " + gettext_path print "site_path: " + site_path -gettext.bindtextdomain("pytrainer", DIR) -gtk.glade.bindtextdomain("pytrainer", DIR) +gettext.bindtextdomain("pytrainer", gettext_path) +gtk.glade.bindtextdomain("pytrainer", gettext_path) gtk.glade.textdomain("pytrainer") gettext.textdomain("pytrainer") -gettext.install("pytrainer",DIR,unicode=1) +gettext.install("pytrainer", gettext_path, unicode=1) #ensure pytrainer directory is included in import path sys.path.insert(0, site_path) @@ -101,10 +109,11 @@ xul_env = max_version print "Using xulrunner dir: %s" % xul_env -os.environ['MOZILLA_FIVE_HOME']=xul_env +os.environ['MOZILLA_FIVE_HOME'] = xul_env -def main(argv): +def main(): pytrainer = pyTrainer(None, data_path) if __name__ == "__main__": - main(sys.argv[1:]) + main() + Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-16 16:39:39 UTC (rev 712) +++ pytrainer/trunk/pytrainer/main.py 2010-11-16 16:42:27 UTC (rev 713) @@ -53,7 +53,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#705" + self.version ="1.7.2_svn#713" self.DB_version = 6 #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: <dg...@us...> - 2010-11-16 16:39:46
|
Revision: 712 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=712&view=rev Author: dgranda Date: 2010-11-16 16:39:39 +0000 (Tue, 16 Nov 2010) Log Message: ----------- Better handling of floats and division. Thx to Martin Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowprofile.py pytrainer/trunk/pytrainer/gui/windowrecord.py Modified: pytrainer/trunk/pytrainer/gui/windowprofile.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-11-16 09:50:54 UTC (rev 711) +++ pytrainer/trunk/pytrainer/gui/windowprofile.py 2010-11-16 16:39:39 UTC (rev 712) @@ -16,6 +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 __future__ import division from SimpleGladeApp import SimpleGladeApp from windowcalendar import WindowCalendar from pytrainer.equipment import EquipmentService @@ -151,14 +152,14 @@ gobject.TYPE_STRING, object) for i in sport_list: - if not i[1]: - met = i[1] + if i[1]: + met = float(i[1]) else: - met = 0 - if not i[2]: - weight = i[2] + met = 0.0 + if i[2]: + weight = float(i[2]) else: - weight = 0 + weight = 0.0 try: max_pace = int(i[4]) if max_pace is None or max_pace == 0: Modified: pytrainer/trunk/pytrainer/gui/windowrecord.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-16 09:50:54 UTC (rev 711) +++ pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-16 16:39:39 UTC (rev 712) @@ -16,6 +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 __future__ import division import os import logging import gtk, gobject @@ -636,18 +637,16 @@ hour = self.rcd_hour.get_value_as_int() min = self.rcd_min.get_value_as_int() sec = self.rcd_second.get_value_as_int() - hour += min/60 + sec/60/60 + hour += float(min)/60.0 + float(sec)/(60.0*60.0) weight = self.pytrainer_main.profile.getValue("pytraining","prf_weight") if weight is None or weight == "" or weight == "None": - weight = 0 - else: - weight = float(weight) - met = self.parent.getSportMet(sport) + weight = 0.0 + weight = float(weight) + met = float(self.parent.getSportMet(sport)) extraweight = self.parent.getSportWeight(sport) if extraweight is None or extraweight == "" or extraweight == "None": - extraweight = 0 - else: - extraweight = float(extraweight) + extraweight = 0.0 + extraweight = float(extraweight) if met: calories = met*(weight+extraweight)*hour self.rcd_calories.set_text(str(calories)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nc...@us...> - 2010-11-16 09:51:01
|
Revision: 711 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=711&view=rev Author: ncjones Date: 2010-11-16 09:50:54 +0000 (Tue, 16 Nov 2010) Log Message: ----------- Disallow changing equipment description to non-unique value. Modified Paths: -------------- pytrainer/trunk/pytrainer/equipment.py pytrainer/trunk/test/pytrainer/equipment_test.py Modified: pytrainer/trunk/pytrainer/equipment.py =================================================================== --- pytrainer/trunk/pytrainer/equipment.py 2010-11-14 13:36:37 UTC (rev 710) +++ pytrainer/trunk/pytrainer/equipment.py 2010-11-16 09:50:54 UTC (rev 711) @@ -177,6 +177,7 @@ def _update_equipment(self, equipment): logging.debug("Updating existing equipment item.") self._assert_exists(equipment) + self._assert_unique(equipment) self._ddbb.update(_TABLE_NAME, _UPDATE_COLUMNS, _create_row(equipment), "id = {0}".format(equipment.id)) return equipment.id @@ -194,7 +195,9 @@ def _assert_unique(self, equipment): result = self._ddbb.select(_TABLE_NAME, "id", "description = \"{0}\"".format(equipment.description)) if len(result) > 0: - raise EquipmentServiceException("An equipment item already exists with description '{0}'".format(equipment.description)) + id = result[0][0] + if id != equipment.id: + raise EquipmentServiceException("An equipment item already exists with description '{0}'".format(equipment.description)) logging.debug("Asserted description is unique: '{0}'.".format(equipment.description)) def remove_equipment(self, equipment): Modified: pytrainer/trunk/test/pytrainer/equipment_test.py =================================================================== --- pytrainer/trunk/test/pytrainer/equipment_test.py 2010-11-14 13:36:37 UTC (rev 710) +++ pytrainer/trunk/test/pytrainer/equipment_test.py 2010-11-16 09:50:54 UTC (rev 711) @@ -300,14 +300,13 @@ def test_update_equipment(self): equipment = Equipment() equipment.id = 1 - equipment.description = u"test description" - self.mock_ddbb.select.return_value = [(2, u"", 1, 0, 0,u"")] - stored_equipment = self.equipment_service.store_equipment(equipment) + equipment.description = u"new description" + self.mock_ddbb.select.return_value = [(1, u"old description", 1, 0, 0,u"")] + self.equipment_service.store_equipment(equipment) self.mock_ddbb.update.assert_called_with("equipment", "description,active,life_expectancy,prior_usage,notes", - ["test description", 1, 0, 0,"" ], + ["new description", 1, 0, 0,"" ], "id = 1") - self.assertEquals(2, stored_equipment.id) def test_update_equipment_non_existant(self): self.mock_ddbb.select.return_value = [] @@ -319,6 +318,17 @@ except(EquipmentServiceException): pass + def test_update_equipment_duplicate_description(self): + self.mock_ddbb.select.return_value = [(1, u"test item", True, 500, 200, u"Test notes.")] + equipment = Equipment() + equipment.id = 2 + equipment.description = u"test item" + try: + self.equipment_service.store_equipment(equipment) + self.fail("Should not be able to change item description to non-unique value.") + except(EquipmentServiceException): + pass + def test_get_equipment_usage(self): self.mock_ddbb.select.return_value = [(250,)] equipment = Equipment() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aza...@us...> - 2010-11-14 13:36:48
|
Revision: 710 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=710&view=rev Author: azapletal Date: 2010-11-14 13:36:37 +0000 (Sun, 14 Nov 2010) Log Message: ----------- Reverted uc usage in windowrecord. Needs better handling of empty/None values. Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowrecord.py Modified: pytrainer/trunk/pytrainer/gui/windowrecord.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-14 11:13:26 UTC (rev 709) +++ pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-14 13:36:37 UTC (rev 710) @@ -256,25 +256,18 @@ trackSummary = {} list_options["rcd_date"] = self.rcd_date.get_text() list_options["rcd_sport"] = self.rcd_sport.get_active_text() - list_options["rcd_distance"] = self.uc.usr2sys('distance', self.rcd_distance.get_text()) + list_options["rcd_distance"] = self.rcd_distance.get_text() list_options["rcd_beats"] = self.rcd_beats.get_text() - list_options["rcd_average"] = self.uc.usr2sys('speed', self.rcd_average.get_text()) + list_options["rcd_average"] = self.rcd_average.get_text() list_options["rcd_calories"] = self.rcd_calories.get_text() list_options["rcd_title"] = self.rcd_title.get_text().replace("\"","'") list_options["rcd_gpxfile"] = self.rcd_gpxfile.get_text() - list_options["rcd_upositive"] = self.uc.usr2sys('height', self.rcd_upositive.get_text()) - list_options["rcd_unegative"] = self.uc.usr2sys('height', self.rcd_unegative.get_text()) + list_options["rcd_upositive"] = self.rcd_upositive.get_text() + list_options["rcd_unegative"] = self.rcd_unegative.get_text() list_options["rcd_maxbeats"] = self.rcd_maxbeats.get_text() - - # tricky for uc as rcd_pace is in min:sec - _p1 = self.parent.pace_to_float(self.rcd_pace.get_text()) - _p2 = self.parent.pace_from_float(self.uc.pace(_p1)) - list_options["rcd_pace"] = _p2 #self.rcd_pace.get_text() - _p1 = self.parent.pace_to_float(self.rcd_maxpace.get_text()) - _p2 = self.parent.pace_from_float(self.uc.pace(_p1)) - list_options["rcd_maxpace"] = _p2#self.rcd_maxpace.get_text() - - list_options["rcd_maxvel"] = self.uc.usr2sys('speed', self.rcd_maxvel.get_text()) + list_options["rcd_pace"] = self.rcd_pace.get_text() + list_options["rcd_maxpace"] = self.rcd_maxpace.get_text() + list_options["rcd_maxvel"] = self.rcd_maxvel.get_text() list_options["rcd_time"] = [self.rcd_hour.get_value_as_int(),self.rcd_min.get_value_as_int(),self.rcd_second.get_value_as_int()] buffer = self.rcd_comments.get_buffer() start,end = buffer.get_bounds() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nc...@us...> - 2010-11-14 11:13:39
|
Revision: 709 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=709&view=rev Author: ncjones Date: 2010-11-14 11:13:26 +0000 (Sun, 14 Nov 2010) Log Message: ----------- Add program argument for specifying config directory. Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/profile.py Added Paths: ----------- pytrainer/trunk/pytrainer/environment.py pytrainer/trunk/pytrainer/platform.py pytrainer/trunk/test/pytrainer/environment_test.py Added: pytrainer/trunk/pytrainer/environment.py =================================================================== --- pytrainer/trunk/pytrainer/environment.py (rev 0) +++ pytrainer/trunk/pytrainer/environment.py 2010-11-14 11:13:26 UTC (rev 709) @@ -0,0 +1,64 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Nathan Jones nc...@us... + +#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 logging + +class Environment(object): + + """Describes the location of the program's configuration directories and files.""" + + def __init__(self, platform, conf_dir): + """Initialise an environment. + + Arguments: + platform -- the current system platform. + conf_dir -- the directory where program configuration should be stored. If None, then the default for the platform is used. + + """ + self.conf_dir = conf_dir if conf_dir is not None else platform.get_default_conf_dir() + self.conf_file = self.conf_dir + "/conf.xml" + self.log_file = self.conf_dir + "/log.out" + self.temp_dir = self.conf_dir + "/tmp" + self.gpx_dir = self.conf_dir + "/gpx" + self.extension_dir = self.conf_dir + "/extensions" + self.plugin_dir = self.conf_dir + "/plugins" + + def clear_temp_dir(self): + """Remove all files from the tmp directory.""" + logging.debug("clearing tmp directory %s" % self.temp_dir) + if not os.path.isdir(self.temp_dir): + return + else: + files = os.listdir(self.temp_dir) + for name in files: + fullname = (os.path.join(self.temp_dir, name)) + if os.path.isfile(fullname): + os.remove(os.path.join(self.temp_dir, name)) + + def create_directories(self): + """Create all required directories if they do not already exist.""" + self._create_dir(self.conf_dir) + self._create_dir(self.temp_dir) + self._create_dir(self.extension_dir) + self._create_dir(self.plugin_dir) + self._create_dir(self.gpx_dir) + + def _create_dir(self, dir_name): + if not os.path.isdir(dir_name): + os.mkdir(dir_name) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-14 08:24:12 UTC (rev 708) +++ pytrainer/trunk/pytrainer/main.py 2010-11-14 11:13:26 UTC (rev 709) @@ -32,6 +32,8 @@ from os import path +from pytrainer import platform +from environment import Environment from record import Record from waypoint import Waypoint from extension import Extension @@ -55,6 +57,8 @@ self.DB_version = 6 #Process command line options self.startup_options = self.get_options() + self.environment = Environment(platform.get_platform(), self.startup_options.conf_dir) + self.environment.create_directories() #Setup logging self.set_logging(self.startup_options.log_level) logging.debug('>>') @@ -64,7 +68,7 @@ self.ddbb = None # Checking profile logging.debug('Checking configuration and profile...') - self.profile = Profile(self.data_path,self) + self.profile = Profile(self.environment, self.data_path,self) self.uc = UC() self.windowmain = None self.ddbb = DDBB(self.profile, self) @@ -115,23 +119,20 @@ For more help on valid options try: %prog -h ''' parser = OptionParser(usage=usage) - parser.set_defaults(log_level=logging.ERROR, validate=False, equip=False, newgraph=False) + parser.set_defaults(log_level=logging.ERROR, validate=False, equip=False, newgraph=False, conf_dir=None) 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("--newgraph", action="store_true", dest="newgraph", help="EXPERIMENTAL: new graphing approach") + parser.add_option("--confdir", dest="conf_dir", help="Specify the directory where application configuration will be stored.") (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) + rotHandler = logging.handlers.RotatingFileHandler(self.environment.log_file, maxBytes=100000, backupCount=5) formatter = logging.Formatter('%(asctime)s|%(levelname)s|%(module)s|%(funcName)s|%(message)s') rotHandler.setFormatter(formatter) logging.getLogger('').addHandler(rotHandler) Added: pytrainer/trunk/pytrainer/platform.py =================================================================== --- pytrainer/trunk/pytrainer/platform.py (rev 0) +++ pytrainer/trunk/pytrainer/platform.py 2010-11-14 11:13:26 UTC (rev 709) @@ -0,0 +1,47 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Nathan Jones nc...@us... + +#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 + +def get_platform(): + if sys.platform == "linux2": + return _Linux() + elif sys.platform == "win32": + return _Windows() + else: + print "Unsupported sys.platform: %s." % sys.platform + sys.exit(1) + +class _Platform(object): + + def get_default_conf_dir(self): + """Get the path to the default configuration directory for the platform.""" + return self._home_dir + "/" + self._conf_dir_name + +class _Linux(_Platform): + + def __init__(self): + self._home_dir = os.environ['HOME'] + self._conf_dir_name = ".pytrainer" + +class _Windows(_Platform): + + def __init__(self): + self._home_dir = os.environ['USERPROFILE'] + self._conf_dir_name = "pytrainer" Modified: pytrainer/trunk/pytrainer/profile.py =================================================================== --- pytrainer/trunk/pytrainer/profile.py 2010-11-14 08:24:12 UTC (rev 708) +++ pytrainer/trunk/pytrainer/profile.py 2010-11-14 11:13:26 UTC (rev 709) @@ -17,7 +17,7 @@ #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, sys, stat +import os, stat import logging from StringIO import StringIO @@ -26,31 +26,22 @@ from lib.uc import UC class Profile: - def __init__(self, data_path = None, parent = None): + def __init__(self, environment, data_path = None, parent = None): logging.debug(">>") + self.environment = environment self.pytrainer_main = parent self.data_path = data_path 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 + self.tmpdir = environment.temp_dir + self.confdir = environment.conf_dir + self.conffile = environment.conf_file + self.gpxdir = environment.gpx_dir + self.extensiondir = environment.extension_dir + self.plugindir = environment.plugin_dir self.uc = UC() - #Set configuration parameters - self._setHome() - self._setConfFiles() - self._setTempDir() - self._setExtensionDir() - self._setPluginDir() - self._setGpxDir() + + environment.clear_temp_dir() - #Clear temp dir - logging.debug("clearing tmp directory %s" % self.tmpdir) - self._clearTempDir() - #Profile Options and Defaults self.profile_options = { "prf_name":"default", @@ -77,7 +68,7 @@ } #Parse pytrainer configuration file - self.config_file = self.conffile + self.config_file = environment.conf_file 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) @@ -85,61 +76,6 @@ self._setZones() logging.debug("<<") - 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 _setZones(self): #maxhr = self.getValue("pytraining","prf_maxhr") #resthr = self.getValue("pytraining","prf_minhr") Added: pytrainer/trunk/test/pytrainer/environment_test.py =================================================================== --- pytrainer/trunk/test/pytrainer/environment_test.py (rev 0) +++ pytrainer/trunk/test/pytrainer/environment_test.py 2010-11-14 11:13:26 UTC (rev 709) @@ -0,0 +1,75 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Nathan Jones nc...@us... + +#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 unittest + +from mock import Mock + +import pytrainer.platform +from pytrainer.environment import Environment + +TEST_DIR_NAME = "/test/.pytrainer_test" + +PLATFORM = pytrainer.platform.get_platform() + +class Test(unittest.TestCase): + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_get_conf_dir(self): + environment = Environment(PLATFORM, TEST_DIR_NAME) + self.assertEquals(TEST_DIR_NAME, environment.conf_dir) + + def test_get_conf_dir_default(self): + test_platform = Mock(spec=pytrainer.platform.get_platform()) + test_platform.get_default_conf_dir.return_value = "/test/.pytrainer_test" + environment = Environment(test_platform, None) + self.assertEquals("/test/.pytrainer_test", environment.conf_dir) + + def test_get_conf_file(self): + environment = Environment(PLATFORM, TEST_DIR_NAME) + self.assertEquals(TEST_DIR_NAME + "/conf.xml", environment.conf_file) + + def test_get_log_file(self): + environment = Environment(PLATFORM, TEST_DIR_NAME) + self.assertEquals(TEST_DIR_NAME + "/log.out", environment.log_file) + + def test_get_temp_dir(self): + environment = Environment(PLATFORM, TEST_DIR_NAME) + self.assertEquals(TEST_DIR_NAME + "/tmp", environment.temp_dir) + + def test_get_gpx_dir(self): + environment = Environment(PLATFORM, TEST_DIR_NAME) + self.assertEquals(TEST_DIR_NAME + "/gpx", environment.gpx_dir) + + def test_get_extension_dir(self): + environment = Environment(PLATFORM, TEST_DIR_NAME) + self.assertEquals(TEST_DIR_NAME + "/extensions", environment.extension_dir) + + def test_get_plugin_dir(self): + environment = Environment(PLATFORM, TEST_DIR_NAME) + self.assertEquals(TEST_DIR_NAME + "/plugins", environment.plugin_dir) + + +if __name__ == "__main__": + #import sys;sys.argv = ['', 'Test.testName'] + unittest.main() \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nc...@us...> - 2010-11-14 08:24:24
|
Revision: 708 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=708&view=rev Author: ncjones Date: 2010-11-14 08:24:12 +0000 (Sun, 14 Nov 2010) Log Message: ----------- Remove unused equipment graphing tab. 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-11-14 07:49:02 UTC (rev 707) +++ pytrainer/trunk/glade/pytrainer.glade 2010-11-14 08:24:12 UTC (rev 708) @@ -5111,86 +5111,6 @@ </packing> </child> <child> - <widget class="GtkVBox" id="equipview"> - <property name="visible">True</property> - <child> - <widget class="GtkHBox" id="hbox6"> - <property name="visible">True</property> - <property name="border_width">5</property> - <property name="spacing">8</property> - <child> - <widget class="GtkLabel" id="label19"> - <property name="visible">True</property> - <property name="label" translatable="yes">Category:</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkComboBoxEntry" id="record_combovalue1"> - <property name="visible">True</property> - <property name="items" translatable="yes">Running shoes -GPS watch -T-shirts -Tyres -Socks</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <widget class="GtkButton" id="button3"> - <property name="label" translatable="yes">New equipment</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="image_position">right</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">3</property> - </packing> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="position">5</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label15"> - <property name="visible">True</property> - <property name="label" translatable="yes">Equipment</property> - </widget> - <packing> - <property name="position">5</property> - <property name="tab_fill">False</property> - <property name="type">tab</property> - </packing> - </child> - <child> <widget class="GtkHBox" id="athletearea"> <property name="visible">True</property> <child> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-11-14 07:49:02 UTC (rev 707) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-11-14 08:24:12 UTC (rev 708) @@ -1442,8 +1442,6 @@ self.selected_view="month" elif page == 4: self.selected_view="year" - elif page == 5: - self.selected_view="equipment" elif page == 6: self.selected_view="athlete" else: Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-14 07:49:02 UTC (rev 707) +++ pytrainer/trunk/pytrainer/main.py 2010-11-14 08:24:12 UTC (rev 708) @@ -259,9 +259,6 @@ elif view=="listview": logging.debug('list view') self.refreshListView() - elif view=="equipment": - logging.debug('equipment view') - print('TODO equipment view') elif view=="athlete": logging.debug('athlete view') self.windowmain.on_athleteview_activate() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nc...@us...> - 2010-11-14 07:49:13
|
Revision: 707 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=707&view=rev Author: ncjones Date: 2010-11-14 07:49:02 +0000 (Sun, 14 Nov 2010) Log Message: ----------- Remove "--equip" start up parameter. Modified Paths: -------------- pytrainer/trunk/glade/profile.glade pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/profile.glade =================================================================== --- pytrainer/trunk/glade/profile.glade 2010-11-14 03:42:46 UTC (rev 706) +++ pytrainer/trunk/glade/profile.glade 2010-11-14 07:49:02 UTC (rev 707) @@ -1738,7 +1738,7 @@ <child> <widget class="GtkTable" id="table1"> <property name="visible">True</property> - <property name="n_rows">7</property> + <property name="n_rows">6</property> <property name="n_columns">3</property> <child> <widget class="GtkLabel" id="labelLogLevel"> @@ -1872,12 +1872,12 @@ </packing> </child> <child> - <widget class="GtkLabel" id="labelEquip"> + <widget class="GtkLabel" id="labelNewGraph"> <property name="visible">True</property> <property name="xalign">0</property> <property name="xpad">5</property> <property name="ypad">5</property> - <property name="label" translatable="yes">Equipment handling</property> + <property name="label" translatable="yes">New Graph</property> </widget> <packing> <property name="top_attach">5</property> @@ -1885,51 +1885,6 @@ </packing> </child> <child> - <widget class="GtkCheckButton" id="checkbuttonEquip"> - <property name="label">--equip</property> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">False</property> - <property name="receives_default">False</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">5</property> - <property name="bottom_attach">6</property> - <property name="x_padding">10</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="labelEquipDescription"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="xpad">5</property> - <property name="label" translatable="yes"><small>Want to track equipment?</small></property> - <property name="use_markup">True</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="labelNewGraph"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="xpad">5</property> - <property name="ypad">5</property> - <property name="label" translatable="yes">New Graph</property> - </widget> - <packing> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - </packing> - </child> - <child> <widget class="GtkCheckButton" id="checkbuttonNewGraph"> <property name="label">--newgraph</property> <property name="visible">True</property> @@ -1941,8 +1896,8 @@ <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="x_padding">10</property> </packing> </child> @@ -1957,8 +1912,8 @@ <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> </packing> </child> <child> Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-14 03:42:46 UTC (rev 706) +++ pytrainer/trunk/pytrainer/main.py 2010-11-14 07:49:02 UTC (rev 707) @@ -121,7 +121,6 @@ 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("--equip", action="store_false", dest="equip", help="EXPERIMENTAL: enable equipment management") parser.add_option("--newgraph", action="store_true", dest="newgraph", help="EXPERIMENTAL: new graphing approach") (options, args) = parser.parse_args() return options This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nc...@us...> - 2010-11-14 03:42:59
|
Revision: 706 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=706&view=rev Author: ncjones Date: 2010-11-14 03:42:46 +0000 (Sun, 14 Nov 2010) Log Message: ----------- Tolerate non-unicode strings returned from DB. This is necessary for MySql support. Modified Paths: -------------- pytrainer/trunk/pytrainer/equipment.py pytrainer/trunk/test/pytrainer/equipment_test.py Modified: pytrainer/trunk/pytrainer/equipment.py =================================================================== --- pytrainer/trunk/pytrainer/equipment.py 2010-11-12 21:33:27 UTC (rev 705) +++ pytrainer/trunk/pytrainer/equipment.py 2010-11-14 03:42:46 UTC (rev 706) @@ -155,11 +155,11 @@ equipment = Equipment() (id, description, active, life_expectancy, prior_usage, notes) = row equipment.id = id - equipment.description = description + equipment.description = unicode(description) equipment.active = bool(active) equipment.life_expectancy = life_expectancy equipment.prior_usage = prior_usage - equipment.notes = notes + equipment.notes = unicode(notes) return equipment def store_equipment(self, equipment): Modified: pytrainer/trunk/test/pytrainer/equipment_test.py =================================================================== --- pytrainer/trunk/test/pytrainer/equipment_test.py 2010-11-12 21:33:27 UTC (rev 705) +++ pytrainer/trunk/test/pytrainer/equipment_test.py 2010-11-14 03:42:46 UTC (rev 706) @@ -209,6 +209,12 @@ self.assertEquals(200, item.prior_usage) self.assertEquals("Test notes.", item.notes) + def test_get_equipment_item_non_unicode(self): + self.mock_ddbb.select.return_value = [(1, "Test Description", True, 500, 200, "Test notes.")] + item = self.equipment_service.get_equipment_item(1) + self.assertEquals("Test Description", item.description) + self.assertEquals("Test notes.", item.notes) + def test_get_equipment_item_non_existant(self): self.mock_ddbb.select.return_value = [] item = self.equipment_service.get_equipment_item(1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aza...@us...> - 2010-11-12 21:33:40
|
Revision: 705 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=705&view=rev Author: azapletal Date: 2010-11-12 21:33:27 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Unit conversion support for Listview (WIP) Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/listview.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2010-11-12 14:56:56 UTC (rev 704) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2010-11-12 21:33:27 UTC (rev 705) @@ -49,7 +49,9 @@ from pytrainer.gui.drawGraph import DrawGraph from pytrainer.gui.windowcalendar import WindowCalendar from pytrainer.lib.listview import ListSearch +from pytrainer.lib.uc import UC + class Main(SimpleGladeApp): def __init__(self, data_path = None, parent = None, version = None, gpxDir = None): def url_hook(dialog, url): @@ -66,6 +68,7 @@ SimpleGladeApp.__init__(self, self.data_path+glade_path, root, domain) + self.uc = UC() self.popup = PopupMenu(data_path,self) self.block = False self.activeSport = None @@ -104,11 +107,11 @@ columns=[ {'name':_("id"), 'visible':False}, {'name':_("Title")}, {'name':_("Date")}, - {'name':_("Distance"), 'xalign':1.0, 'format_float':'%.2f'}, + {'name':_("Distance"), 'xalign':1.0, 'format_float':'%.2f', 'quantity': 'distance'}, {'name':_("Sport")}, {'name':_("Time"), 'xalign':1.0, 'format_duration':True}, {'name':_(u"\u2300 HR"), 'xalign':1.0}, - {'name':_(u"\u2300 Speed"), 'xalign':1.0, 'format_float':'%.1f'}, + {'name':_(u"\u2300 Speed"), 'xalign':1.0, 'format_float':'%.1f', 'quantity': 'speed'}, {'name':_("Calories"), 'xalign':1.0} ] self.create_treeview(self.allRecordTreeView,columns) @@ -247,12 +250,12 @@ new = orig[3:] cell.set_property('text', new) - def render_float(self, column, cell, model, iter, format): - #orig = cell.get_property('text') - #To deal with floats displayed with a comma instead of a dot - orig = model.get_value(iter, column.get_sort_column_id()) - new = format % float(orig) - cell.set_property('text', new) + def render_float(self, column, cell, model, iter, data): + _format, _quantity = data + _val = model.get_value(iter, column.get_sort_column_id()) + _val = self.uc.sys2usr(_quantity, _val) + _val_str = _format % float(_val) + cell.set_property('text', _val_str) def create_treeview(self,treeview,columns): for column_index, column_dict in enumerate(columns): @@ -267,7 +270,7 @@ if 'visible' in column_dict: column.set_visible(column_dict['visible']) if 'format_float' in column_dict: - column.set_cell_data_func(renderer, self.render_float, column_dict['format_float']) + column.set_cell_data_func(renderer, self.render_float, [column_dict['format_float'], column_dict['quantity']]) if 'format_duration' in column_dict and column_dict['format_duration']: column.set_cell_data_func(renderer, self.render_duration) column.set_sort_column_id(column_index) Modified: pytrainer/trunk/pytrainer/lib/listview.py =================================================================== --- pytrainer/trunk/pytrainer/lib/listview.py 2010-11-12 14:56:56 UTC (rev 704) +++ pytrainer/trunk/pytrainer/lib/listview.py 2010-11-12 21:33:27 UTC (rev 705) @@ -1,14 +1,26 @@ import datetime -import math -#LISTPAST = [['All Time', -99999], ['Last 4 Weeks', -31], -# ['Last 6 Months', -183], ['Last 12 Months', -366]] - +UC_LISTDISTANCE = {False : [['All Distances', [0.0,999999.9]], + ['<1 km', [0.0, 1.0]], + ['1-5 km', [1.0, 5.0]], + ['5-20 km', [5.0, 20.0]], + ['20-50 km', [20.0, 50.0]], + ['50-100 km', [50.0, 100.0]], + ['>100 km', [100.0, 999999.9]]] , + True : [['All Distances', [0.0,999999.9]], + ['<1 mi', [0.0, 1.609344]], + ['1-5 mi', [1.609344, 8.04672]], + ['5-10 mi', [8.04672, 16.09344]], + ['10-20 mi', [16.09344, 32.18688]], + ['20-50 mi', [32.18688, 80.4672]], + ['>50 mi', [80.4672, 999999.9]]] + } class ListSearch(object): """ Builds SQLite condition out of search parameters""" def __init__(self, parent = None, pytrainer_main = None): self.parent = parent self.pytrainer_main = pytrainer_main + self.uc = self.pytrainer_main.uc """ Initialize all query parameters to valid default values""" self.title = '' self.sport = 0 @@ -16,14 +28,16 @@ self.duration = 0 self.distance = 0 self.listSport = self.pytrainer_main.profile.getSportList() + self.listPast = [['All Time', -99999], ['Last 4 Weeks', -31], ['Last 6 Months', -183], ['Last 12 Months', -366]] + self.listDuration = [['All Durations', [0,999999]], ['<1 Hour', [0,3600]], ['1-2 Hours', [3600,7200]], ['>2 Hours', [7200,999999]]] - - #if self.pytrainer_main.profile.prf_us_system == True: + + """ self.listDistanceUS = [['All Distances', [0.0,999999.9]], ['<1 mi', [0.0, 1.609344]], ['1-5 mi', [1.609344, 8.04672]], @@ -39,6 +53,9 @@ ['20-50 km', [20.0, 50.0]], ['50-100 km', [50.0, 100.0]], ['>100 km', [100.0, 999999.9]]] + """ + + self.listDistance = UC_LISTDISTANCE[self.uc.us] #print self.listDistance self.setup_lsa_sport() self.setup_lsa_past() @@ -89,19 +106,18 @@ _add_and = True #print _search return _search + + """ + def get_listDistance(self): - def get_listDistance(self): - """ Not Finished. Eperimentally. Goal: compute distance intervals - for each sport individually from average and standard deviation. - """ _all = ['All Distances', [0.0, 99999.9]] _back = [] _back.append( [_all] ) for sp in self.listSport: _back.append( [_all] ) return _back + """ - condition = property(get_condition) #listDuration = property(get_listDuration) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-12 14:56:56 UTC (rev 704) +++ pytrainer/trunk/pytrainer/main.py 2010-11-12 21:33:27 UTC (rev 705) @@ -46,11 +46,12 @@ from lib.date import Date from activitypool import ActivityPool from lib.ddbb import DDBB +from lib.uc import UC class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#704" + self.version ="1.7.2_svn#705" self.DB_version = 6 #Process command line options self.startup_options = self.get_options() @@ -64,6 +65,7 @@ # Checking profile logging.debug('Checking configuration and profile...') self.profile = Profile(self.data_path,self) + self.uc = UC() self.windowmain = None self.ddbb = DDBB(self.profile, self) logging.debug('connecting to DDBB') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aza...@us...> - 2010-11-12 14:57:10
|
Revision: 704 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=704&view=rev Author: azapletal Date: 2010-11-12 14:56:56 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Applied uc to windowrecord (WIP) Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/pytrainer/gui/windowrecord.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2010-11-12 07:27:52 UTC (rev 703) +++ pytrainer/trunk/glade/newrecord.glade 2010-11-12 14:56:56 UTC (rev 704) @@ -216,7 +216,7 @@ <property name="column_spacing">5</property> <property name="row_spacing">5</property> <child> - <widget class="GtkLabel" id="label8"> + <widget class="GtkLabel" id="label_rcd_distance"> <property name="width_request">120</property> <property name="visible">True</property> <property name="xalign">0</property> @@ -517,7 +517,7 @@ <property name="column_spacing">5</property> <property name="row_spacing">5</property> <child> - <widget class="GtkLabel" id="label134"> + <widget class="GtkLabel" id="label_rcd_maxvel"> <property name="width_request">120</property> <property name="visible">True</property> <property name="xalign">0</property> @@ -543,7 +543,7 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label133"> + <widget class="GtkLabel" id="label_rcd_average"> <property name="visible">True</property> <property name="xalign">0</property> <property name="label" translatable="yes">Average (km/h)</property> @@ -640,7 +640,7 @@ <property name="column_spacing">5</property> <property name="row_spacing">5</property> <child> - <widget class="GtkLabel" id="label138"> + <widget class="GtkLabel" id="label_rcd_maxpace"> <property name="width_request">110</property> <property name="visible">True</property> <property name="xalign">0</property> @@ -666,7 +666,7 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label137"> + <widget class="GtkLabel" id="label_rcd_pace"> <property name="width_request">110</property> <property name="visible">True</property> <property name="xalign">0</property> @@ -748,7 +748,7 @@ <property name="column_spacing">5</property> <property name="row_spacing">5</property> <child> - <widget class="GtkLabel" id="label139"> + <widget class="GtkLabel" id="label_rcd_upositive"> <property name="width_request">110</property> <property name="visible">True</property> <property name="xalign">0</property> @@ -774,7 +774,7 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label140"> + <widget class="GtkLabel" id="label_rcd_unegative"> <property name="width_request">110</property> <property name="visible">True</property> <property name="xalign">0</property> @@ -1273,3 +1273,5 @@ </child> </widget> </glade-interface> + + Modified: pytrainer/trunk/pytrainer/gui/windowrecord.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-12 07:27:52 UTC (rev 703) +++ pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-12 14:56:56 UTC (rev 704) @@ -35,9 +35,9 @@ logging.debug(">>") self.parent = parent self.pytrainer_main = parent.pytrainer_main - self.us = self.pytrainer_main.profile.prf_us_system + #self.us = self.pytrainer_main.profile.prf_us_system #DEPRECATED self.uc = UC() - logging.debug("Using US system: "+ str(self.us)) + logging.debug("Using US system: "+ str(self.uc.us)) self.data_path = data_path glade_path="glade/newrecord.glade" root = "newrecord" @@ -80,24 +80,28 @@ self.rcd_title.set_text(title) if distance != None: #self.rcd_distance.set_text(distance) - myset_text(rcd_distance, 'distance', distance, us=self.us, round=2) + #myset_text(rcd_distance, 'distance', distance, us=self.us, round=2) + self.rcd_distance.set_text(self.uc.distance(distance)) if time != None: self.setTime(time) if distance!=None and time!=None: self.on_calcaverage_clicked(None) if upositive != None: - self.rcd_upositive.set_text(upositive) + self.rcd_upositive.set_text(self.uc.height(upositive)) if unegative != None: - self.rcd_unegative.set_text(unegative) + self.rcd_unegative.set_text(self.uc.height(unegative)) if calories != None: self.rcd_calories.set_text(calories) - #populate labels with units - # test only - #if self.us: - # self.label8.set_text('Distance (mi)') - #else: - # self.label8.set_text('Distance (km)') - self.label8.set_text('Distance [%s]' %self.uc.unit_distance) + + #populate labels with units + self.label_rcd_distance.set_text('Distance (%s)' %self.uc.unit_distance) + self.label_rcd_maxvel.set_text('Max (%s)' %self.uc.unit_speed) + self.label_rcd_average.set_text('Average (%s)' %self.uc.unit_speed) + self.label_rcd_maxpace.set_text('Max (%s)' %self.uc.unit_pace) + self.label_rcd_pace.set_text('Pace (%s)' %self.uc.unit_pace) + self.label_rcd_upositive.set_text('Ascent (%s)' %self.uc.unit_height) + self.label_rcd_unegative.set_text('Descent (%s)' %self.uc.unit_height) + self._init_equipment(equipment, equipment_service) logging.debug("<<") @@ -252,18 +256,25 @@ trackSummary = {} list_options["rcd_date"] = self.rcd_date.get_text() list_options["rcd_sport"] = self.rcd_sport.get_active_text() - list_options["rcd_distance"] = self.rcd_distance.get_text() + list_options["rcd_distance"] = self.uc.usr2sys('distance', self.rcd_distance.get_text()) list_options["rcd_beats"] = self.rcd_beats.get_text() - list_options["rcd_average"] = self.rcd_average.get_text() + list_options["rcd_average"] = self.uc.usr2sys('speed', self.rcd_average.get_text()) list_options["rcd_calories"] = self.rcd_calories.get_text() list_options["rcd_title"] = self.rcd_title.get_text().replace("\"","'") list_options["rcd_gpxfile"] = self.rcd_gpxfile.get_text() - list_options["rcd_upositive"] = self.rcd_upositive.get_text() - list_options["rcd_unegative"] = self.rcd_unegative.get_text() + list_options["rcd_upositive"] = self.uc.usr2sys('height', self.rcd_upositive.get_text()) + list_options["rcd_unegative"] = self.uc.usr2sys('height', self.rcd_unegative.get_text()) list_options["rcd_maxbeats"] = self.rcd_maxbeats.get_text() - list_options["rcd_pace"] = self.rcd_pace.get_text() - list_options["rcd_maxpace"] = self.rcd_maxpace.get_text() - list_options["rcd_maxvel"] = self.rcd_maxvel.get_text() + + # tricky for uc as rcd_pace is in min:sec + _p1 = self.parent.pace_to_float(self.rcd_pace.get_text()) + _p2 = self.parent.pace_from_float(self.uc.pace(_p1)) + list_options["rcd_pace"] = _p2 #self.rcd_pace.get_text() + _p1 = self.parent.pace_to_float(self.rcd_maxpace.get_text()) + _p2 = self.parent.pace_from_float(self.uc.pace(_p1)) + list_options["rcd_maxpace"] = _p2#self.rcd_maxpace.get_text() + + list_options["rcd_maxvel"] = self.uc.usr2sys('speed', self.rcd_maxvel.get_text()) list_options["rcd_time"] = [self.rcd_hour.get_value_as_int(),self.rcd_min.get_value_as_int(),self.rcd_second.get_value_as_int()] buffer = self.rcd_comments.get_buffer() start,end = buffer.get_bounds() @@ -340,16 +351,18 @@ self.rcd_min.set_value(m) self.rcd_second.set_value(s) self.rcd_date.set_text(activity.date) + #self.rcd_distance.set_text("%.2f"%activity.distance) - myset_text(self.rcd_distance, 'distance', activity.distance, us=self.us, round=2) - self.rcd_average.set_text("%.2f"%activity.average) + #myset_text(self.rcd_distance, 'distance', activity.distance, us=self.us, round=2) + self.rcd_distance.set_text("%.2f" %self.uc.distance(activity.distance)) + self.rcd_average.set_text("%.2f" %self.uc.speed(activity.average)) self.rcd_calories.set_text("%s"%activity.calories) self.rcd_beats.set_text("%s"%activity.beats) - self.rcd_upositive.set_text("%.2f"%activity.upositive) - self.rcd_unegative.set_text("%.2f"%activity.unegative) - self.rcd_maxvel.set_text("%.2f"%activity.maxspeed) - self.rcd_maxpace.set_text("%s"%self.parent.pace_from_float(activity.maxpace)) - self.rcd_pace.set_text("%s"%self.parent.pace_from_float(activity.pace)) + self.rcd_upositive.set_text("%.2f" %self.uc.height(activity.upositive)) + self.rcd_unegative.set_text("%.2f" %self.uc.height(activity.unegative)) + self.rcd_maxvel.set_text("%.2f" %self.uc.speed(activity.maxspeed)) + self.rcd_maxpace.set_text("%s" %self.parent.pace_from_float(self.uc.pace(activity.maxpace))) + self.rcd_pace.set_text("%s" %self.parent.pace_from_float(self.uc.pace(activity.pace))) self.rcd_maxbeats.set_text("%s"%activity.maxbeats) self.rcd_title.set_text(activity.title) @@ -361,9 +374,9 @@ start,end = buffer.get_bounds() buffer.set_text(activity.comments) if activity.gpx_file is not None: - self.rcd_gpxfile.set_text(activity.gpx_file) - self.frameGeneral.set_sensitive(0) #Currently record values not changed if a GPX file is present - self.frameVelocity.set_sensitive(0) #Greying out options to indicate this to user + self.rcd_gpxfile.set_text(activity.gpx_file) + self.frameGeneral.set_sensitive(0) #Currently record values not changed if a GPX file is present + self.frameVelocity.set_sensitive(0) #Greying out options to indicate this to user logging.debug("<<") def setValues(self,values): @@ -660,9 +673,9 @@ pass def set_distance(self,distance): - #self.rcd_distance.set_text("%0.2f" %distance) - myset_text(rcd_distance, 'distance', distance, us=self.us, round=2) - + self.rcd_distance.set_text("%0.2f" %distance) + #myset_text(rcd_distance, 'distance', distance, us=self.us, round=2) + def set_maxspeed(self,vel): self.rcd_maxvel.set_text("%0.2f" %vel) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-12 07:27:52 UTC (rev 703) +++ pytrainer/trunk/pytrainer/main.py 2010-11-12 14:56:56 UTC (rev 704) @@ -50,7 +50,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#703" + self.version ="1.7.2_svn#704" self.DB_version = 6 #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: <aza...@us...> - 2010-11-12 07:28:04
|
Revision: 703 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=703&view=rev Author: azapletal Date: 2010-11-12 07:27:52 +0000 (Fri, 12 Nov 2010) Log Message: ----------- More type-checking and error handling in UC Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/uc.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/lib/uc.py =================================================================== --- pytrainer/trunk/pytrainer/lib/uc.py 2010-11-11 22:06:05 UTC (rev 702) +++ pytrainer/trunk/pytrainer/lib/uc.py 2010-11-12 07:27:52 UTC (rev 703) @@ -28,13 +28,12 @@ class UC(Singleton): """ When instantiated first time us is assigned to False. - us = False; metric system - us = True ; imperial system + us = False; user system is metric + us = True ; user system is imperial """ def __init__(self): - _us = False if not hasattr(self, 'us'): - self.us = _us + self.us = False def __str__(self): if self.us: @@ -43,7 +42,8 @@ return 'metric' def set_us(self, us): - self.us = us + if type(us) == bool: + self.us = us def get_unit(self, quantity): if self.us: @@ -58,19 +58,28 @@ unit_weight = property( lambda self: self.get_unit('weight') ) def sys2usr(self, quantity, value): - """gives value of physical quantity (metric) in users system""" + """ Gives value of physical quantity (metric) in users system""" + try: + _val = float(value) + except ValueError: + return None if self.us: - return value * uc_factors[quantity] + return _val * uc_factors[quantity] else: - return value + return _val def usr2sys(self, quantity, value): - """takes value (users system) and convert to metric (sys)""" + """ Takes value (users system) and convert to metric (sys)""" + try: + _val = float(value) + except ValueError: + return None if self.us: - return value / uc_factors[quantity] + return _val / uc_factors[quantity] else: - return value - + return _val + + """ Aliases for sys2usr """ def distance(self, value): return self.sys2usr('distance', value) def speed(self, value): Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-11 22:06:05 UTC (rev 702) +++ pytrainer/trunk/pytrainer/main.py 2010-11-12 07:27:52 UTC (rev 703) @@ -50,7 +50,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#702" + self.version ="1.7.2_svn#703" self.DB_version = 6 #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: <aza...@us...> - 2010-11-11 22:06:11
|
Revision: 702 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=702&view=rev Author: azapletal Date: 2010-11-11 22:06:05 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Improved uc and introduced to profile Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowrecord.py pytrainer/trunk/pytrainer/lib/uc.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/profile.py Modified: pytrainer/trunk/pytrainer/gui/windowrecord.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-11 20:01:23 UTC (rev 701) +++ pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-11 22:06:05 UTC (rev 702) @@ -28,6 +28,7 @@ import pytrainer.record import dateutil.parser from dateutil.tz import * # for tzutc() +from pytrainer.lib.uc import UC class WindowRecord(SimpleGladeApp): def __init__(self, equipment_service, data_path = None, listSport = None, parent = None, date = None, title=None, distance=None, time=None, upositive=None, unegative=None, bpm=None, calories=None, comment=None, windowTitle=None, equipment=[]): @@ -35,6 +36,7 @@ self.parent = parent self.pytrainer_main = parent.pytrainer_main self.us = self.pytrainer_main.profile.prf_us_system + self.uc = UC() logging.debug("Using US system: "+ str(self.us)) self.data_path = data_path glade_path="glade/newrecord.glade" @@ -91,11 +93,11 @@ self.rcd_calories.set_text(calories) #populate labels with units # test only - if self.us: - self.label8.set_text('Distance (mi)') - else: - self.label8.set_text('Distance (km)') - + #if self.us: + # self.label8.set_text('Distance (mi)') + #else: + # self.label8.set_text('Distance (km)') + self.label8.set_text('Distance [%s]' %self.uc.unit_distance) self._init_equipment(equipment, equipment_service) logging.debug("<<") Modified: pytrainer/trunk/pytrainer/lib/uc.py =================================================================== --- pytrainer/trunk/pytrainer/lib/uc.py 2010-11-11 20:01:23 UTC (rev 701) +++ pytrainer/trunk/pytrainer/lib/uc.py 2010-11-11 22:06:05 UTC (rev 702) @@ -27,7 +27,7 @@ class UC(Singleton): """ - When instantiated first time us is assigned to False, otherwise not. + When instantiated first time us is assigned to False. us = False; metric system us = True ; imperial system """ @@ -69,5 +69,15 @@ if self.us: return value / uc_factors[quantity] else: - return value - + return value + + def distance(self, value): + return self.sys2usr('distance', value) + def speed(self, value): + return self.sys2usr('speed', value) + def pace(self, value): + return self.sys2usr('pace', value) + def height(self, value): + return self.sys2usr('height', value) + def weight(self, value): + return self.sys2usr('weight', value) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-11 20:01:23 UTC (rev 701) +++ pytrainer/trunk/pytrainer/main.py 2010-11-11 22:06:05 UTC (rev 702) @@ -50,7 +50,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#700" + self.version ="1.7.2_svn#702" self.DB_version = 6 #Process command line options self.startup_options = self.get_options() Modified: pytrainer/trunk/pytrainer/profile.py =================================================================== --- pytrainer/trunk/pytrainer/profile.py 2010-11-11 20:01:23 UTC (rev 701) +++ pytrainer/trunk/pytrainer/profile.py 2010-11-11 22:06:05 UTC (rev 702) @@ -23,6 +23,7 @@ from lxml import etree from lib.ddbb import DDBB +from lib.uc import UC class Profile: def __init__(self, data_path = None, parent = None): @@ -37,6 +38,7 @@ self.gpxdir = None self.extensiondir = None self.plugindir = None + self.uc = UC() #Set configuration parameters self._setHome() self._setConfFiles() @@ -79,6 +81,7 @@ 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) + self.uc.set_us(self.prf_us_system) self._setZones() logging.debug("<<") @@ -277,6 +280,7 @@ logging.debug("Adding "+option+"|"+value) self.setValue("pytraining",option,value,delay_write=True) self.xml_tree.write(self.config_file, xml_declaration=True, encoding='UTF-8') + self.uc.set_us(list_options['prf_us_system']) logging.debug("<<") def getSportList(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-11-11 20:01:29
|
Revision: 701 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=701&view=rev Author: jblance Date: 2010-11-11 20:01:23 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Bug fix for delimited import Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowimportdata.py Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-11-11 13:24:45 UTC (rev 700) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-11-11 20:01:23 UTC (rev 701) @@ -901,7 +901,10 @@ data['distance'] = 0 if durationCol: #calculate duration in sec... - _duration = row[durationCol-1] + try: + _duration = row[durationCol-1] + except: + _duration = 0 if _duration.count(':') == 2: #Have 00:00:00 duration h, m, s = _duration.split(':') @@ -923,7 +926,10 @@ data['duration'] = durationSec data['time'] = str(durationSec) if titleCol: - data['title'] = row[titleCol-1] + try: + data['title'] = row[titleCol-1] + except: + pass if self.checkbCSVForceSport.get_active(): sport_id = self.pytrainer_main.record.getSportId(self.comboCSVForceSport.get_active_text(),add=True) data['sport'] = sport_id @@ -983,7 +989,10 @@ except: pass if commentsCol: - data['comments'] = row[commentsCol-1] + try: + data['comments'] = row[commentsCol--1] + except: + pass #Insert into DB logging.debug("Data", data) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aza...@us...> - 2010-11-11 13:24:51
|
Revision: 700 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=700&view=rev Author: azapletal Date: 2010-11-11 13:24:45 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Fix for unitsconversor (temporary, WIP) Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/unitsconversor.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/lib/unitsconversor.py =================================================================== --- pytrainer/trunk/pytrainer/lib/unitsconversor.py 2010-11-11 11:32:47 UTC (rev 699) +++ pytrainer/trunk/pytrainer/lib/unitsconversor.py 2010-11-11 13:24:45 UTC (rev 700) @@ -105,8 +105,11 @@ # quantity=physical quantitiy like 'distance' or 'speed' # here we should call the universal 'conversion prepare for output' filter # need the same for get_text - _value = filter_inout(quantity, _value, 'out', us=_us, round=_round_digits) - _value = str(_value) + try: + _value = filter_inout(quantity, _value, 'out', us=_us, round=_round_digits) + _value = str(_value) + except: + _value = '' gtkentry.set_text(_value) def myget_text(gtkentry, quantity, **kwargs): Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-11 11:32:47 UTC (rev 699) +++ pytrainer/trunk/pytrainer/main.py 2010-11-11 13:24:45 UTC (rev 700) @@ -50,7 +50,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#696" + self.version ="1.7.2_svn#700" self.DB_version = 6 #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: <nc...@us...> - 2010-11-11 11:32:53
|
Revision: 699 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=699&view=rev Author: ncjones Date: 2010-11-11 11:32:47 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Edit equipment when double clicked. Modified Paths: -------------- pytrainer/trunk/glade/equipment.glade pytrainer/trunk/pytrainer/gui/equipment.py Modified: pytrainer/trunk/glade/equipment.glade =================================================================== --- pytrainer/trunk/glade/equipment.glade 2010-11-11 11:09:12 UTC (rev 698) +++ pytrainer/trunk/glade/equipment.glade 2010-11-11 11:32:47 UTC (rev 699) @@ -30,6 +30,7 @@ <object class="GtkTreeView" id="treeviewEquipmentList"> <property name="visible">True</property> <property name="can_focus">True</property> + <signal name="row_activated" handler="equipment_row_activated"/> </object> </child> </object> Modified: pytrainer/trunk/pytrainer/gui/equipment.py =================================================================== --- pytrainer/trunk/pytrainer/gui/equipment.py 2010-11-11 11:09:12 UTC (rev 698) +++ pytrainer/trunk/pytrainer/gui/equipment.py 2010-11-11 11:32:47 UTC (rev 699) @@ -97,6 +97,7 @@ "cancel_add_equipment_clicked": self._cancel_add_equipment_clicked, "confirm_add_equipment_clicked": self._confirm_add_equipment_clicked, "edit_equipment_clicked": self._edit_equipment_clicked, + "equipment_row_activated": self._edit_equipment_clicked, "cancel_edit_equipment_clicked": self._cancel_edit_equipment_clicked, "confirm_edit_equipment_clicked": self._confirm_edit_equipment_clicked, "delete_equipment_clicked": self._delete_equipment_clicked, @@ -154,7 +155,7 @@ self._equipment_store.add_equipment(new_equipment) self.show_page_equipment_list() - def _edit_equipment_clicked(self, widget): + def _edit_equipment_clicked(self, widget, *args): item = self._get_selected_equipment_item() self._builder.get_object("entryEquipmentEditDescription").set_text(item.description) self._builder.get_object("entryEquipmentEditLifeExpectancy").set_text(str(item.life_expectancy)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nc...@us...> - 2010-11-11 11:09:18
|
Revision: 698 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=698&view=rev Author: ncjones Date: 2010-11-11 11:09:12 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Display message when no equipment items are active. Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/pytrainer/gui/windowrecord.py Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2010-11-11 09:36:29 UTC (rev 697) +++ pytrainer/trunk/glade/newrecord.glade 2010-11-11 11:09:12 UTC (rev 698) @@ -1107,32 +1107,79 @@ <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <widget class="GtkAlignment" id="alignmentRecordEquipment"> + <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> - <property name="left_padding">12</property> <child> - <widget class="GtkTable" id="table1"> + <widget class="GtkAlignment" id="noActiveEquipmentMessageContainer"> + <property name="left_padding">12</property> + <child> + <widget class="GtkHBox" id="hbox1"> + <property name="visible">True</property> + <property name="border_width">5</property> + <child> + <widget class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="stock">gtk-info</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="label" translatable="yes"><i>There are no active equipment items.</i></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkAlignment" id="alignmentRecordEquipment"> <property name="visible">True</property> - <property name="border_width">5</property> + <property name="left_padding">12</property> <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> + <widget class="GtkTable" id="table1"> <property name="visible">True</property> - <property name="can_focus">True</property> <property name="border_width">5</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> <child> - <widget class="GtkTreeView" id="treeviewRecordEquipment"> + <widget class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="headers_visible">False</property> - <property name="headers_clickable">False</property> + <property name="border_width">5</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> + <child> + <widget class="GtkTreeView" id="treeviewRecordEquipment"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">False</property> + </widget> + </child> </widget> </child> </widget> </child> </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> </child> Modified: pytrainer/trunk/pytrainer/gui/windowrecord.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-11 09:36:29 UTC (rev 697) +++ pytrainer/trunk/pytrainer/gui/windowrecord.py 2010-11-11 11:09:12 UTC (rev 698) @@ -101,8 +101,11 @@ def _init_equipment(self, selected_equipment, equipment_service): equipment = {} - for item in equipment_service.get_active_equipment(): + active_equipment = equipment_service.get_active_equipment() + for item in active_equipment: equipment[item] = False + if len(active_equipment) == 0: + self.noActiveEquipmentMessageContainer.set_visible(True) for item in selected_equipment: equipment[item] = True list_store = gtk.ListStore(int, str, bool) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-11-11 09:36:36
|
Revision: 697 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=697&view=rev Author: jblance Date: 2010-11-11 09:36:29 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Fix typo in csv import Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowimportdata.py Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-11-11 08:56:45 UTC (rev 696) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-11-11 09:36:29 UTC (rev 697) @@ -198,7 +198,7 @@ self.checkbuttonAutoLaunch.set_active(1) logging.debug("<<") return - + def init_csvimport_tab(self): logging.debug(">>") #Populate Force Sport to combobox @@ -806,7 +806,7 @@ print len(reader.fieldnames) columns = [_("Column %d") % x for x in range(0, len(reader.fieldnames))] #print columns - + for column in columns: self.cbCSVDate.append_text(column) self.cbCSVDistance.append_text(column) @@ -843,7 +843,7 @@ def on_buttonCSVImport_clicked(self, widget): logging.debug('>>') - #Determine values + #Determine values dateCol = self.cbCSVDate.get_active() distanceCol = self.cbCSVDistance.get_active() durationCol = self.cbCSVDuration.get_active() @@ -859,14 +859,14 @@ paceCol = self.cbCSVPace.get_active() maxPaceCol = self.cbCSVMaxPace.get_active() commentsCol = self.cbCSVComments.get_active() - + #print dateCol, distanceCol, durationCol, titleCol, sportCol, avgspeedCol, maxspeedCol, calCol, accCol, desCol, hrCol, maxHRCol, paceCol, maxPaceCol, commentsCol - + if dateCol == 0: #Error need to have at least a date self.updateStatusbar(self.statusbarCSVImport, "ERROR: Must define at least a date column") return - + #Import... #Get selected file if not os.path.isfile(self.CSVfilename): @@ -875,7 +875,7 @@ csvfile = open(self.CSVfilename, 'rb') reader = csv.reader(csvfile, delimiter=self.delimiter) #Process File - + for i, row in enumerate(reader): if self.has_header and i==0: #Ignore first row @@ -883,7 +883,7 @@ if not row: continue data = {} - #Determine dates + #Determine dates _date = Date().getDateTime(row[dateCol-1]) #year, month, day = date.split("-") date = _date[1].strftime("%Y-%m-%d") @@ -935,56 +935,56 @@ self.comboCSVForceSport.set_active(0) sport_id = self.pytrainer_main.record.getSportId(self.comboCSVForceSport.get_active_text(),add=True) data['sport'] = sport_id - + if avgspeedCol: # try: - data['average'] = locale.atof(row[avgspeedCol-1]) + data['average'] = locale.atof(row[avgspeedCol-1]) except: pass if maxspeedCol: try: - data['maxspeed'] = locale.atof(row[maxspeedCol-1]) + data['maxspeed'] = locale.atof(row[maxspeedCol-1]) except: pass if calCol: try: - data['calories'] = locale.atoi(row[calCol-1]) + data['calories'] = locale.atoi(row[calCol-1]) except: pass if accCol: try: - data['upostive'] = locale.atof(row[accCol-1]) + data['upositive'] = locale.atof(row[accCol-1]) except: pass if desCol: try: - data['unegative'] = locale.atof(row[desCol-1]) + data['unegative'] = locale.atof(row[desCol-1]) except: pass if hrCol: try: - data['beats'] = locale.atof(row[hrCol-1]) + data['beats'] = locale.atof(row[hrCol-1]) except: pass if maxHRCol: try: - data['maxbeats'] = locale.atof(row[maxHRCol-1]) + data['maxbeats'] = locale.atof(row[maxHRCol-1]) except: pass if paceCol: try: - data['pace'] = locale.atof(row[paceCol-1]) + data['pace'] = locale.atof(row[paceCol-1]) except: pass if maxPaceCol: try: - data['maxpace'] = locale.atof(row[maxPaceCol-1]) + data['maxpace'] = locale.atof(row[maxPaceCol-1]) except: pass if commentsCol: - data['comments'] = row[commentsCol-1] - + data['comments'] = row[commentsCol-1] + #Insert into DB logging.debug("Data", data) self.pytrainer_main.ddbb.insert_dict('records', data) @@ -992,5 +992,5 @@ self.updateStatusbar(self.statusbarCSVImport, "Import completed. %d rows processed" % i) #Disable import button self.buttonCSVImport.set_sensitive(0) - + logging.debug('<<') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aza...@us...> - 2010-11-11 08:56:51
|
Revision: 696 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=696&view=rev Author: azapletal Date: 2010-11-11 08:56:45 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Simplification of UC class Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/uc.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/lib/uc.py =================================================================== --- pytrainer/trunk/pytrainer/lib/uc.py 2010-11-11 02:45:54 UTC (rev 695) +++ pytrainer/trunk/pytrainer/lib/uc.py 2010-11-11 08:56:45 UTC (rev 696) @@ -27,16 +27,12 @@ class UC(Singleton): """ - When instantiated first time us is assigned, otherwise not. - Can be called with or w/o argument. + When instantiated first time us is assigned to False, otherwise not. us = False; metric system us = True ; imperial system """ - def __init__(self, *args): + def __init__(self): _us = False - if args: - if args[0] in [True, False]: - _us = args[0] if not hasattr(self, 'us'): self.us = _us Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-11-11 02:45:54 UTC (rev 695) +++ pytrainer/trunk/pytrainer/main.py 2010-11-11 08:56:45 UTC (rev 696) @@ -50,7 +50,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#692" + self.version ="1.7.2_svn#696" self.DB_version = 6 #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-11-11 02:46:00
|
Revision: 695 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=695&view=rev Author: jblance Date: 2010-11-11 02:45:54 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Bug fix to delimited import Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowimportdata.py Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-11-11 02:34:38 UTC (rev 694) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-11-11 02:45:54 UTC (rev 695) @@ -896,7 +896,9 @@ try: data['distance'] = locale.atof(row[distanceCol-1]) except: - pass + data['distance'] = 0 + else: + data['distance'] = 0 if durationCol: #calculate duration in sec... _duration = row[durationCol-1] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-11-11 02:34:44
|
Revision: 694 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=694&view=rev Author: jblance Date: 2010-11-11 02:34:38 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Bug fixes to activity for None values in DB Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/activity.py Modified: pytrainer/trunk/pytrainer/lib/activity.py =================================================================== --- pytrainer/trunk/pytrainer/lib/activity.py 2010-11-11 02:30:18 UTC (rev 693) +++ pytrainer/trunk/pytrainer/lib/activity.py 2010-11-11 02:34:38 UTC (rev 694) @@ -235,11 +235,15 @@ if self.pace_limit == 0 or self.pace_limit == "": self.pace_limit = None self.title = _dict['title'] + if self.title is None: + self.title = "" self.date = _dict['date'] self.time = self._int(_dict['time']) self.time_tuple = Date().second2time(self.time) self.beats = self._int(_dict['beats']) self.comments = _dict['comments'] + if self.comments is None: + self.comments = "" self.calories = self._int(_dict['calories']) self.id_record = _dict['id_record'] self.maxbeats = self._int(_dict['maxbeats']) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |