You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
(1) |
Mar
(15) |
Apr
(20) |
May
(2) |
Jun
(9) |
Jul
(3) |
Aug
(2) |
Sep
(17) |
Oct
(16) |
Nov
(38) |
Dec
(40) |
2010 |
Jan
(51) |
Feb
(11) |
Mar
(24) |
Apr
(31) |
May
(24) |
Jun
(3) |
Jul
(9) |
Aug
(1) |
Sep
(29) |
Oct
(33) |
Nov
(81) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(4) |
Mar
(13) |
Apr
(4) |
May
(24) |
Jun
(4) |
Jul
(19) |
Aug
(46) |
Sep
(10) |
Oct
(28) |
Nov
(31) |
Dec
|
From: <jb...@us...> - 2010-01-05 21:21:38
|
Revision: 468 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=468&view=rev Author: jblance Date: 2010-01-05 21:21:28 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Unified import - activities in file import sortable Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2010-01-05 18:22:54 UTC (rev 467) +++ pytrainer/trunk/glade/newrecord.glade 2010-01-05 21:21:28 UTC (rev 468) @@ -1,1925 +1,1136 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - +<?xml version="1.0"?> <glade-interface> - -<widget class="GtkWindow" id="newrecord"> - <property name="visible">True</property> - <property name="title" translatable="yes">New Entry</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="icon">logo_mini.png</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> - <signal name="destroy" handler="quit" last_modification_time="Sun, 23 Sep 2007 20:55:46 GMT"/> - - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkNotebook" id="notebook2"> - <property name="border_width">9</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> - - <child> - <widget class="GtkVBox" id="vbox27"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame19"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment22"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table28"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label156"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Title:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_title"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label161"> - <property name="visible">True</property> - <property name="label" translatable="yes">GPX File:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_gpxfile"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button25"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-open</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_selectfile_clicked" last_modification_time="Mon, 23 Oct 2006 10:40:57 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button24"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate Values</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calculatevalues_clicked" last_modification_time="Mon, 23 Oct 2006 10:41:32 GMT"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sport:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkComboBoxEntry" id="rcd_sport"> - <property name="width_request">134</property> - <property name="visible">True</property> - <property name="items" translatable="yes"></property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483646"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Main</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame24"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment28"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table31"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label8"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Distance (Km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button10"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcdistance_clicked" last_modification_time="Mon, 15 May 2006 18:26:54 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Duration:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox7"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkSpinButton" id="rcd_hour"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 23 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label35"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_min"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label36"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_second"> - <property name="width_request">42</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_distance"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button11"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calctime_clicked" last_modification_time="Mon, 15 May 2006 18:27:10 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label6"> - <property name="width_request">60</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Date:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkEntry" id="rcd_date"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label28"> - <property name="visible">True</property> - <property name="label" translatable="yes"> </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button7"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calendar_clicked" last_modification_time="Sun, 02 Apr 2006 18:37:59 GMT"/> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-index</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="lblTime"> - <property name="visible">True</property> - <property name="label" translatable="yes">Start Time:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkEntry" id="rcd_time"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">10</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483648"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>General</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="Velocity"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment27"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table30"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label134"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (km/h):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_maxvel"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label133"> - <property name="visible">True</property> - <property name="label" translatable="yes">Velocity (km/h)</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button12"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcaverage_clicked" last_modification_time="Mon, 15 May 2006 18:27:33 GMT"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_average"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label162"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Velocity</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quick Entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox26"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame20"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment23"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table23"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label138"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (min/km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_maxpace"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label137"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Pace (min/km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_pace"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button43"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcpace_clicked" last_modification_time="Tue, 29 Jan 2008 21:42:09 GMT"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label162"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Pace</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame21"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment24"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table24"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label139"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Ascent:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_upositive"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label140"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Descent:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_unegative"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label163"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Accumulated Altitude Change</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame22"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment25"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table25"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">6</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label142"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (bpm):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label143"> - <property name="width_request">110</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Heart rate:</property> - <... [truncated message content] |
From: <dg...@us...> - 2010-01-05 18:23:00
|
Revision: 467 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=467&view=rev Author: dgranda Date: 2010-01-05 18:22:54 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Removed deprecated Encoding key, see http://www.mail-archive.com/deb...@li.../msg725452.html Modified Paths: -------------- pytrainer/trunk/pytrainer.desktop Modified: pytrainer/trunk/pytrainer.desktop =================================================================== --- pytrainer/trunk/pytrainer.desktop 2010-01-05 02:08:23 UTC (rev 466) +++ pytrainer/trunk/pytrainer.desktop 2010-01-05 18:22:54 UTC (rev 467) @@ -1,7 +1,6 @@ [Desktop Entry] Version=1.0 Type=Application -Encoding=UTF-8 Name=pyTrainer Comment=The Free Sport Training Center Exec=pytrainer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-05 02:08:29
|
Revision: 466 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=466&view=rev Author: jblance Date: 2010-01-05 02:08:23 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Unified import now imports selected activities (file tab only) Modified Paths: -------------- pytrainer/trunk/glade/importdata.glade pytrainer/trunk/import/file_garmintcxv1.py pytrainer/trunk/import/file_garmintcxv2.py pytrainer/trunk/import/file_garmintools.py pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/import/translate_garmintcxv1.xsl pytrainer/trunk/import/translate_garmintcxv2.xsl Modified: pytrainer/trunk/glade/importdata.glade =================================================================== --- pytrainer/trunk/glade/importdata.glade 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/glade/importdata.glade 2010-01-05 02:08:23 UTC (rev 466) @@ -164,9 +164,6 @@ <widget class="GtkHBox" id="hboxImportButton"> <property name="visible">True</property> <child> - <placeholder/> - </child> - <child> <widget class="GtkButton" id="buttonImport"> <property name="label" translatable="yes">Import</property> <property name="visible">True</property> @@ -182,6 +179,22 @@ <property name="position">1</property> </packing> </child> + <child> + <widget class="GtkButton" id="buttonCancel"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + <signal name="clicked" handler="on_buttonCancel_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> </widget> <packing> <property name="expand">False</property> Modified: pytrainer/trunk/import/file_garmintcxv1.py =================================================================== --- pytrainer/trunk/import/file_garmintcxv1.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/import/file_garmintcxv1.py 2010-01-05 02:08:23 UTC (rev 466) @@ -36,6 +36,8 @@ self.data_path = os.path.dirname(__file__) self.xmldoc = None self.activitiesSummary = [] + self.activities = [] + self.sportsList = ("Running", "Biking", "Other", "MultiSport") def getXmldoc(self): ''' Function to return parsed xmlfile ''' @@ -74,14 +76,16 @@ #Valid file self.xmldoc = xmldoc #Possibly multiple entries in file - for (sport, activities) in self.getActivities(xmldoc): + self.activities = self.getActivities(xmldoc) + for (sport, activities) in self.activities: logging.debug("Found %d tracks for %s sport in %s" % (len(activities), sport, filename)) for activity in activities: startTime = self.getDateTime(self.getStartTimeFromActivity(activity)) inDatabase = self.inDatabase(activity, startTime) duration = self.getDetails(activity, startTime) distance = "" - self.activitiesSummary.append( (activities.index(activity), + index = "%d:%d" % (self.activities.index((sport, activities)), activities.index(activity)) + self.activitiesSummary.append( (index, inDatabase, startTime[1].strftime("%Y-%m-%dT%H:%M:%S"), distance , @@ -98,10 +102,9 @@ def getActivities(self, tree): """ Function to return all the tracks in a Garmin Training Center v1 file """ - sportsList = ("Running", "Biking", "Other", "MultiSport") result = [] root = tree.getroot() - for sport in sportsList: + for sport in self.sportsList: try: sportLevel = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}%s" % sport) tracks = sportLevel.findall(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Track") @@ -144,13 +147,33 @@ #print utc_dateTime, local_dateTime return (utc_dateTime,local_dateTime) - '''def createGPXfile(self, gpxfile, activity): + def getGPXFile(self, ID): + """ + Generate GPX file based on activity ID + + Returns (sport, GPX filename) + """ + sport = None + gpxFile = None + #index = "%d:%d" % (self.activities.index((sport, activities)), activities.index(activity)) + sportID, activityID = ID.split(':') + sportID = int(sportID) + activityID = int(activityID) + sport, activities = self.activities[sportID] + activitiesCount = len(self.activities) + if activitiesCount > 0 and activityID < activitiesCount: + gpxFile = "%s/garmin-tcxv1-%d.gpx" % (self.tmpdir, activityID) + activity = activities[activityID] + self.createGPXfile(gpxFile, activity) + return sport, gpxFile + + def createGPXfile(self, gpxfile, activity): """ Function to transform a Garmin Training Center v2 Track to a valid GPX+ file """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") + xslt_doc = etree.parse(self.data_path+"/translate_garmintcxv1.xsl") transform = etree.XSLT(xslt_doc) #xml_doc = etree.parse(filename) xml_doc = activity result_tree = transform(xml_doc) - result_tree.write(gpxfile, xml_declaration=True)''' + result_tree.write(gpxfile, xml_declaration=True) Modified: pytrainer/trunk/import/file_garmintcxv2.py =================================================================== --- pytrainer/trunk/import/file_garmintcxv2.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/import/file_garmintcxv2.py 2010-01-05 02:08:23 UTC (rev 466) @@ -36,6 +36,7 @@ self.data_path = os.path.dirname(__file__) self.xmldoc = None self.activitiesSummary = [] + self.activities = [] def getXmldoc(self): ''' Function to return parsed xmlfile ''' @@ -79,15 +80,15 @@ #Valid file self.xmldoc = xmldoc #Possibly multiple entries in file - activities = self.getActivities(xmldoc) - for activity in activities: + self.activities = self.getActivities(xmldoc) + for activity in self.activities: startTime = self.getDateTime(self.getStartTimeFromActivity(activity)) inDatabase = self.inDatabase(activity, startTime) sport = self.getSport(activity) distance, duration = self.getDetails(activity, startTime) distance = distance / 1000.0 - self.activitiesSummary.append( (activities.index(activity), + self.activitiesSummary.append( (self.activities.index(activity), inDatabase, startTime[1].strftime("%Y-%m-%dT%H:%M:%S"), "%0.2f" % distance , @@ -151,13 +152,31 @@ #print utc_dateTime, local_dateTime return (utc_dateTime,local_dateTime) - '''def createGPXfile(self, gpxfile, activity): + def getGPXFile(self, ID): + """ + Generate GPX file based on activity ID + + Returns (sport, GPX filename) + """ + sport = None + gpxFile = None + activityID = int(ID) + activitiesCount = len(self.activities) + if activitiesCount > 0 and activityID < activitiesCount: + gpxFile = "%s/garmin-tcxv2-%d.gpx" % (self.tmpdir, activityID) + activity = self.activities[int(activityID)] + sport = self.getSport(activity) + self.createGPXfile(gpxFile, activity) + return sport, gpxFile + + + def createGPXfile(self, gpxfile, activity): """ Function to transform a Garmin Training Center v2 Track to a valid GPX+ file """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") + xslt_doc = etree.parse(self.data_path+"/translate_garmintcxv2.xsl") transform = etree.XSLT(xslt_doc) #xml_doc = etree.parse(filename) xml_doc = activity result_tree = transform(xml_doc) - result_tree.write(gpxfile, xml_declaration=True)''' + result_tree.write(gpxfile, xml_declaration=True) Modified: pytrainer/trunk/import/file_garmintools.py =================================================================== --- pytrainer/trunk/import/file_garmintools.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/import/file_garmintools.py 2010-01-05 02:08:23 UTC (rev 466) @@ -149,11 +149,25 @@ return time return None - '''def createGPXfile(self, gpxfile, tree): + def getGPXFile(self, ID): + """ + Generate GPX file based on activity ID + + Returns (sport, GPX filename) + """ + sport = None + gpxFile = None + if ID == "0": #Only one activity in file + gpxFile = "%s/garmintools-%s.gpx" % (self.tmpdir, ID) + sport = self.getSport(self.xmldoc) + self.createGPXfile(gpxFile, self.xmldoc) + return sport, gpxFile + + def createGPXfile(self, gpxfile, tree): """ Function to transform a Garmintools dump file to a valid GPX+ file """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") + xslt_doc = etree.parse(self.data_path+"/translate_garmintools.xsl") transform = etree.XSLT(xslt_doc) result_tree = transform(tree) - result_tree.write(gpxfile, xml_declaration=True)''' + result_tree.write(gpxfile, xml_declaration=True) Added: pytrainer/trunk/import/translate_garmintcxv1.xsl =================================================================== --- pytrainer/trunk/import/translate_garmintcxv1.xsl (rev 0) +++ pytrainer/trunk/import/translate_garmintcxv1.xsl 2010-01-05 02:08:23 UTC (rev 466) @@ -0,0 +1,53 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport">"Run"</xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> + <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> + <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> + </metadata><xsl:value-of select="$newline"/> + <trk><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Track"> + <trkseg><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Trackpoint"> + <!-- only output a trkpt if a position exists --> + <xsl:if test="t:Position"> + <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="t:HeartRateBpm"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> + </xsl:for-each> + <xsl:value-of select="$newline"/> + </trkseg><xsl:value-of select="$newline"/> + </xsl:for-each> + </trk><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> +</xsl:template> +</xsl:stylesheet> Added: pytrainer/trunk/import/translate_garmintcxv2.xsl =================================================================== --- pytrainer/trunk/import/translate_garmintcxv2.xsl (rev 0) +++ pytrainer/trunk/import/translate_garmintcxv2.xsl 2010-01-05 02:08:23 UTC (rev 466) @@ -0,0 +1,95 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport"><xsl:value-of select="t:Activity/@Sport"/></xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Activity/t:Id"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> + <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> + <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> + </metadata><xsl:value-of select="$newline"/> + <trk><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Activity/t:Lap"> + <trkseg><xsl:value-of select="$newline"/> + <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> + <xsl:for-each select="t:Track/t:Trackpoint"> + <!-- only output a trkpt if a position exists --> + <xsl:if test="t:Position"> + <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="t:HeartRateBpm/t:Value"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="t:HeartRateBpm/t:Value"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + <xsl:if test="t:Cadence"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:cadence><xsl:value-of select="t:Cadence"/></gpxdata:cadence><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> + </xsl:for-each> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:sportType><xsl:value-of select="$sport"/></gpxdata:sportType><xsl:value-of select="$newline"/> + <gpxdata:calories><xsl:value-of select="$calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </trkseg><xsl:value-of select="$newline"/> + </xsl:for-each> + </trk><xsl:value-of select="$newline"/> +<!-- Lap Data --> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Activity/t:Lap"> + <xsl:variable name="vIndex"> + <xsl:number count="t:Lap"/> + </xsl:variable> + <gpxdata:lap><xsl:value-of select="$newline"/> + <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> + <xsl:variable name="stlat"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="t:Track/t:Trackpoint[1]/t:Position/t:LongitudeDegrees"/></xsl:variable> + <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> + <xsl:variable name="cnt"><xsl:value-of select="count(t:Track/t:Trackpoint/t:Position)-1"/></xsl:variable> + <xsl:variable name="endlat"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="endlon"><xsl:value-of select="t:Track/t:Trackpoint[number($cnt)]/t:Position/t:LongitudeDegrees"/></xsl:variable> + <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> + <gpxdata:startTime><xsl:value-of select="@StartTime"/></gpxdata:startTime><xsl:value-of select="$newline"/> + <gpxdata:elapsedTime><xsl:value-of select="t:TotalTimeSeconds"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> + <gpxdata:calories><xsl:value-of select="t:Calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + <gpxdata:distance><xsl:value-of select="t:DistanceMeters"/></gpxdata:distance><xsl:value-of select="$newline"/> + <!-- <gpxdata:trackReference>Reference information for the track which corresponds to this lap type="trackReferenceType"</gpxdata:trackReference><xsl:value-of select="$newline"/> --> + <gpxdata:summary><xsl:value-of select="$newline"/> + <MaximumSpeed kind="max"><xsl:value-of select="t:MaximumSpeed"/></MaximumSpeed><xsl:value-of select="$newline"/> + <AverageHeartRateBpm kind="avg"><xsl:value-of select="t:AverageHeartRateBpm/t:Value"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> + <MaximumHeartRateBpm kind="max"><xsl:value-of select="t:MaximumHeartRateBpm/t:Value"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> + </gpxdata:summary><xsl:value-of select="$newline"/> + <gpxdata:trigger><xsl:value-of select="t:TriggerMethod"/></gpxdata:trigger><xsl:value-of select="$newline"/> + <gpxdata:intensity><xsl:value-of select="t:Intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> + </gpxdata:lap><xsl:value-of select="$newline"/> + </xsl:for-each> + </extensions><xsl:value-of select="$newline"/> + + </gpx><xsl:value-of select="$newline"/> +</xsl:template> +</xsl:stylesheet> Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-05 02:08:23 UTC (rev 466) @@ -35,6 +35,7 @@ self.parent = parent self.configuration = config self.store = None + self.processClass = None #SimpleGladeApp.__init__(self, data_path+glade_path, root, domain) def run(self): @@ -176,7 +177,51 @@ self.configuration.setValue("pytraining","import_default_tab",self.defaulttab) #option + def getSelectedActivities(self): + """ + Function to determine which activities are selected + + Returns array of the ids of the selected activities + """ + selectedActivities = [] + if self.store is None: + return None + for item in self.store: + if item[1] is True: #Checkbox is True + logging.debug("Added activity id:%s to selected list" % item[0]) + selectedActivities.append(item[0]) + logging.debug( "Found %d selected activities to import" % len(selectedActivities) ) + return selectedActivities + + def importSelectedActivities(self, selectedActivities): + """ + Function to import selected activities + """ + if selectedActivities is None or len(selectedActivities) == 0: + return + for activityID in selectedActivities: + logging.debug( "Importing activity %s" % activityID) + sport, gpxFile = self.processClass.getGPXFile(activityID) + #process returned GPX files + if os.path.isfile(gpxFile): + logging.info('File exists. Size: %d. Sport: %s' % (os.path.getsize(gpxFile), sport)) + #TODO trigger newentry screen to allow user to edit data + self.parent.parent.record.importFromGPX(gpxFile, sport) + #Deselect imported activity and change note + self.updateActivity(activityID, status=False, notes="Imported into database") + else: + logging.error('File %s not valid' % gpxFile) + def updateActivity(self, activityID, status = None, notes = None): + path = 0 + for item in self.store: + if item[0] == activityID: + if status is not None: + self.store[path][1] = status + if notes is not None: + self.store[path][6] = notes + path +=1 + ############################ ## Window signal handlers ## ############################ @@ -195,6 +240,8 @@ def on_win_importdata_delete_event(self, widget, window): self.win_importdata.hide() + #self.win_importdata = None + #self.quit() def on_notebookMainTabs_switch_page(self, notebook, page, new_page): if new_page == 0: @@ -220,11 +267,11 @@ else: self.store.clear() #Validate file - processClass = self.validateFile(self.filechooserbuttonSelectFile.get_filename()) - if processClass is not None: - self.updateStatusbar(self.statusbarImportFile, _("Found file of type: %s") % processClass.getFileType() ) + self.processClass = self.validateFile(self.filechooserbuttonSelectFile.get_filename()) + if self.processClass is not None: + self.updateStatusbar(self.statusbarImportFile, _("Found file of type: %s") % self.processClass.getFileType() ) #Get activities in file - activitiesSummary = processClass.getActivitiesSummary() + activitiesSummary = self.processClass.getActivitiesSummary() for activity in activitiesSummary: if not activity[1]: #Activity selected, so enable import button @@ -256,6 +303,7 @@ def on_buttonClearFile_clicked(self, widget): self.filechooserbuttonSelectFile.unselect_all() self.updateStatusbar(self.statusbarImportFile, _("No file selected") ) + self.processClass = None self.store.clear() def on_buttonSave_clicked(self, widget): @@ -266,13 +314,25 @@ def on_buttonReset_clicked(self, widget): #GPS Device is default self.defaulttab = 0 - #self.saveOptions() #Redisplay tab self.init_options_tab() self.updateStatusbar(self.statusbarOptions, "") def on_buttonImport_clicked(self, widget): - self.updateStatusbar(self.statusbarImportFile, "buttonImport clicked") + #Import selected activities + selectedActivities = self.getSelectedActivities() + if len(selectedActivities) > 0: + self.updateStatusbar(self.statusbarImportFile, "Importing %d activities" % len(selectedActivities)) + self.importSelectedActivities(selectedActivities) + self.updateStatusbar(self.statusbarImportFile, "Imported %d activities" % len(selectedActivities)) + self.buttonImport.set_sensitive(0) #Disable import button + #self.updateStatusbar(self.statusbarImportFile, "buttonImport clicked") + + def on_buttonCancel_clicked(self, widget): + self.win_importdata.hide() + #self.win_importdata = None + #self.quit() + Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-04 23:34:32 UTC (rev 465) +++ pytrainer/trunk/pytrainer/main.py 2010-01-05 02:08:23 UTC (rev 466) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#465" + self.version ="1.7.0_svn#466" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-04 23:34:39
|
Revision: 465 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=465&view=rev Author: jblance Date: 2010-01-04 23:34:32 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Separated Warning dialog into separate glade file Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/warning.py pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/glade/warning.glade Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/glade/pytrainer.glade 2010-01-04 23:34:32 UTC (rev 465) @@ -8835,130 +8835,6 @@ </child> </widget> -<widget class="GtkDialog" id="warning"> - <property name="visible">True</property> - <property name="title" translatable="yes">warning</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="icon">logo_mini.png</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> - <property name="has_separator">True</property> - <signal name="destroy" handler="gtk_main_quit" last_modification_time="Sat, 21 Oct 2006 09:00:50 GMT"/> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area2"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancelbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="response_id">-6</property> - <signal name="clicked" handler="on_cancel_clicked" last_modification_time="Sat, 21 Oct 2006 08:57:26 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkButton" id="okbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="response_id">-5</property> - <signal name="clicked" handler="on_accept_clicked" last_modification_time="Sat, 21 Oct 2006 09:24:25 GMT"/> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox28"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkImage" id="image14"> - <property name="visible">True</property> - <property name="icon_name">gtk-dialog-warning</property> - <property name="pixel_size">46</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="warningText"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - <widget class="GtkWindow" id="extensions"> <property name="width_request">606</property> <property name="height_request">249</property> Added: pytrainer/trunk/glade/warning.glade =================================================================== --- pytrainer/trunk/glade/warning.glade (rev 0) +++ pytrainer/trunk/glade/warning.glade 2010-01-04 23:34:32 UTC (rev 465) @@ -0,0 +1,98 @@ +<?xml version="1.0"?> +<glade-interface> + <!-- interface-requires gtk+ 2.6 --> + <!-- interface-naming-policy toplevel-contextual --> + <widget class="GtkDialog" id="warning"> + <property name="visible">True</property> + <property name="title" translatable="yes">Warning</property> + <property name="modal">True</property> + <property name="window_position">mouse</property> + <property name="icon">logo_mini.png</property> + <property name="type_hint">dialog</property> + <signal name="destroy" handler="gtk_main_quit"/> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox2"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkHBox" id="hbox28"> + <property name="visible">True</property> + <child> + <widget class="GtkImage" id="image14"> + <property name="visible">True</property> + <property name="pixel_size">46</property> + <property name="icon_name">gtk-dialog-warning</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="warningText"> + <property name="visible">True</property> + <property name="xpad">5</property> + <property name="ypad">5</property> + <property name="label" translatable="yes">Warning</property> + <property name="use_markup">True</property> + <property name="wrap">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area2"> + <property name="visible">True</property> + <property name="layout_style">end</property> + <child> + <widget class="GtkButton" id="cancelbutton1"> + <property name="label">gtk-cancel</property> + <property name="response_id">-6</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + <signal name="clicked" handler="on_cancel_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="okbutton1"> + <property name="label">gtk-ok</property> + <property name="response_id">-5</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + <signal name="clicked" handler="on_accept_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </widget> + </child> + </widget> +</glade-interface> Modified: pytrainer/trunk/pytrainer/gui/warning.py =================================================================== --- pytrainer/trunk/pytrainer/gui/warning.py 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/pytrainer/gui/warning.py 2010-01-04 23:34:32 UTC (rev 465) @@ -24,7 +24,7 @@ self.cancelmethod = cancelmethod self.okparams = okparams self.cancelparams = cancelparams - glade_path="glade/pytrainer.glade" + glade_path="glade/warning.glade" self.path = data_path+glade_path root = "warning" domain = None Modified: pytrainer/trunk/pytrainer/gui/windowimportdata.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/pytrainer/gui/windowimportdata.py 2010-01-04 23:34:32 UTC (rev 465) @@ -151,18 +151,6 @@ self.buttonImport.set_sensitive(1) return - def treeviewImportEvents_header_checkbox(self, column, store): - """ - Handler for click on checkbox column - """ - if store is None: - return - for item in store: - if item[1]: - self.treeviewImportEvents_setCheckboxes(False) - return - self.treeviewImportEvents_setCheckboxes(True) - def treeviewImportEvents_setCheckboxes(self, state): """ Sets or unsets all checkboxes @@ -193,6 +181,18 @@ ## Window signal handlers ## ############################ + def treeviewImportEvents_header_checkbox(self, column, store): + """ + Handler for click on checkbox column + """ + if store is None: + return + for item in store: + if item[1]: + self.treeviewImportEvents_setCheckboxes(False) + return + self.treeviewImportEvents_setCheckboxes(True) + def on_win_importdata_delete_event(self, widget, window): self.win_importdata.hide() @@ -211,8 +211,9 @@ pass def on_filechooserbuttonSelectFile_file_set(self, widget): - self.buttonClearFile.set_sensitive(1) - self.updateStatusbar(self.statusbarImportFile, "" ) + self.buttonClearFile.set_sensitive(1) #Enable clear button + self.buttonImport.set_sensitive(0) #Disable import button + self.updateStatusbar(self.statusbarImportFile, "" ) #Clear status bar #Build treeview if self.store is None: self.store = self.build_tree_view() @@ -225,7 +226,7 @@ #Get activities in file activitiesSummary = processClass.getActivitiesSummary() for activity in activitiesSummary: - if not activity[0]: + if not activity[1]: #Activity selected, so enable import button self.buttonImport.set_sensitive(1) note = "" @@ -244,6 +245,7 @@ 6, note, ) else: + #Selected file not understood by any of the process files self.updateStatusbar(self.statusbarImportFile, _("Unknown file type") ) #Display warning msg = _("File selected is of unknown or unsupported file type") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-04 21:49:44 UTC (rev 464) +++ pytrainer/trunk/pytrainer/main.py 2010-01-04 23:34:32 UTC (rev 465) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#462" + self.version ="1.7.0_svn#465" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-04 21:49:52
|
Revision: 464 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=464&view=rev Author: jblance Date: 2010-01-04 21:49:44 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Add garmintools schema Added Paths: ----------- pytrainer/trunk/schemas/garmintools.xsd Added: pytrainer/trunk/schemas/garmintools.xsd =================================================================== --- pytrainer/trunk/schemas/garmintools.xsd (rev 0) +++ pytrainer/trunk/schemas/garmintools.xsd 2010-01-04 21:49:44 UTC (rev 464) @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <xsd:element name="root" type="root_type"/> + <xsd:complexType name="root_type"> + <xsd:sequence> + <xsd:element name="run" type="run_type" minOccurs="1" maxOccurs="unbounded" /> + <xsd:element name="lap" type="lap_type" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="track" type="track_type" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="point" type="point_type" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="run_type"> + <xsd:sequence> + <xsd:element name="laps" type="laps_type" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="type" type="xsd:string" use="required"/> + <xsd:attribute name="track" type="xsd:string" use="optional"/> + <xsd:attribute name="sport" type="xsd:string" use="optional"/> + <xsd:attribute name="multisport" type="xsd:string" use="optional"/> + </xsd:complexType> + <xsd:complexType name="laps_type"> + <xsd:attribute name="first" type="xsd:string" use="optional"/> + <xsd:attribute name="last" type="xsd:string" use="optional"/> + </xsd:complexType> + <xsd:complexType name="lap_type"> + <xsd:sequence> + <xsd:element name="begin_pos" type="position_type" minOccurs="0" /> + <xsd:element name="end_pos" type="position_type" minOccurs="0" /> + <xsd:element name="max_speed" type="xsd:float" minOccurs="0" /> + <xsd:element name="calories" type="xsd:positiveInteger" minOccurs="0" /> + <xsd:element name="avg_hr" type="xsd:positiveInteger" minOccurs="0" /> + <xsd:element name="max_hr" type="xsd:positiveInteger" minOccurs="0" /> + <xsd:element name="intensity" type="xsd:string" minOccurs="0" /> + <xsd:element name="unknown" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="type" type="xsd:string" use="required"/> + <xsd:attribute name="index" type="xsd:string" use="optional"/> + <xsd:attribute name="start" type="xsd:string" use="optional"/> + <xsd:attribute name="duration" type="xsd:string" use="optional"/> + <xsd:attribute name="distance" type="xsd:string" use="optional"/> + <xsd:attribute name="trigger" type="xsd:string" use="optional"/> + </xsd:complexType> + <xsd:complexType name="position_type"> + <xsd:attribute name="lat" type="xsd:string" use="optional"/> + <xsd:attribute name="lon" type="xsd:string" use="optional"/> + </xsd:complexType> + <xsd:complexType name="track_type"> + <xsd:attribute name="type" type="xsd:string" use="required"/> + <xsd:attribute name="index" type="xsd:string" use="optional"/> + </xsd:complexType> + <xsd:complexType name="point_type"> + <xsd:attribute name="type" type="xsd:string" use="optional"/> + <xsd:attribute name="time" type="xsd:string" use="required"/> + <xsd:attribute name="lat" type="xsd:string" use="optional"/> + <xsd:attribute name="lon" type="xsd:string" use="optional"/> + <xsd:attribute name="alt" type="xsd:string" use="optional"/> + <xsd:attribute name="distance" type="xsd:string" use="optional"/> + <xsd:attribute name="hr" type="xsd:string" use="optional"/> + </xsd:complexType> +</xsd:schema> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-01-04 21:18:19
|
Revision: 463 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=463&view=rev Author: dgranda Date: 2010-01-04 21:18:09 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Minimizing db requests to improve performance with multiple imports Modified Paths: -------------- pytrainer/trunk/plugins/garmintools_full/garmintools_full.py Modified: pytrainer/trunk/plugins/garmintools_full/garmintools_full.py =================================================================== --- pytrainer/trunk/plugins/garmintools_full/garmintools_full.py 2010-01-04 18:16:55 UTC (rev 462) +++ pytrainer/trunk/plugins/garmintools_full/garmintools_full.py 2010-01-04 21:18:09 UTC (rev 463) @@ -66,18 +66,17 @@ def run(self): logging.debug(">>") - # Create a compressed copy of current user directory - try: - self.createUserdirBackup() - except: - logging.error('Not able to make a copy of current user directory. Printing traceback and exiting') - traceback.print_exc() - exit(-1) - importFiles = [] if self.checkLoadedModule(): numError = self.getDeviceInfo() if numError >= 0: + # Create a compressed copy of current user directory + try: + self.createUserdirBackup() + except: + logging.error('Not able to make a copy of current user directory. Printing traceback and exiting') + traceback.print_exc() + exit(-1) #TODO Remove Zenity below outgps = commands.getstatusoutput("garmin_save_runs | zenity --progress --pulsate --text='Loading Data' auto-close") if outgps[0]==0: @@ -87,6 +86,8 @@ # discard old files selectedFiles = self.discardOld(foundFiles) # checking which entries are not imported yet + self.listStringDBUTC = self.parent.parent.ddbb.select("records","date_time_utc") + #logging.debug("From DB: "+str(self.listStringDBUTC)) # commented out to fully rely on duplicates checking from garmintools plugin #selectedFiles = self.checkDupes(foundFiles) if selectedFiles is not None: @@ -128,8 +129,22 @@ logging.info("Retrieving complete history from GPS device") return tempList - def checkDupe(self, tree, filename): + def checkDupes(self, listEntries): + """ The idea behind is building two lists: one with all date_time_utc from DB (need conversion to datetime!) + and the other with all times from retrieved entries in UTC (need conversion from localtime -not possible only from filename- and to datetime!). + Seconds are the keys in a populated Dict, so if already present in the system can be removed from the mapping structure. + In case of legacy support, datetime from garmintools is older than (preceds) one stored in database (GPSBabel) + so DTgarmintools + delta (~ 3 mins) >= DTgpsbabel. + We obtain the final list retrieving remanent values from the dictionary """ logging.debug(">>") + tempList = [] + tempDict = {} + for entry in listEntries: + filename = os.path.split(entry)[1].rstrip(".gmn") + filenameDateTime = datetime.strptime(filename,"%Y%m%dT%H%M%S") + logging.debug("Entry time: "+str(filenameDateTime)) + tempDict[filenameDatetime] = filename + stringStartDatetime = self.detailsFromFile(tree) # this time is localtime! (with timezone offset) exists = False if stringStartDatetime is not None: @@ -157,7 +172,8 @@ fileString = StringIO.StringIO("<root>"+xmlString+"</root>") #parse string as xml tree = etree.parse(fileString) - if not self.inDatabase(tree, filename): + #if not self.inDatabase(tree, filename): + if not self.entryExists(tree, filename): sport = self.getSport(tree) gpxfile = "%s/garmintools-%d.gpx" % (self.tmpdir, len(importfiles)) self.createGPXfile(gpxfile, tree) @@ -182,19 +198,23 @@ validator = xmlValidator() return validator.validateXSL(filename, xslfile)''' - def inDatabase(self, tree, filename): - #comparing date and start time (sport may have been changed in DB after import) + def entryExists(self, tree, filename): stringStartDatetime = self.detailsFromFile(tree) # this time is localtime! (with timezone offset) exists = False if stringStartDatetime is not None: startDatetime = dateutil.parser.parse(stringStartDatetime) # converting to utc for proper comparison with date_time_utc - utcDatetime = startDatetime.astimezone(tzutc()).strftime("%Y-%m-%dT%H:%M:%SZ") - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (utcDatetime)): - exists = True + stringStartUTC = startDatetime.astimezone(tzutc()).strftime("%Y-%m-%dT%H:%M:%SZ") + if self.legacyComp: + #ToDo + # All entries in UTC, so similars must have same date (startsWith) + exists = False else: - logging.info("Marking "+str(filename)+" | "+str(utcDatetime)+" to import") - exists = False + if (stringStartUTC,) in self.listStringDBUTC: # strange way to store results from DB + exists = True + else: + logging.info("Marking "+str(filename)+" | "+str(stringStartUTC)+" to import") + exists = False else: logging.debug("Not able to find start time, please check "+str(filename)) exists = True # workaround for old/not correct entries (will crash at some point during import process otherwise) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-01-04 18:17:04
|
Revision: 462 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=462&view=rev Author: dgranda Date: 2010-01-04 18:16:55 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Cosmetic changes to show dev version and short name for desktop icon Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer.desktop Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-01-04 18:08:27 UTC (rev 461) +++ pytrainer/trunk/pytrainer/main.py 2010-01-04 18:16:55 UTC (rev 462) @@ -101,7 +101,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#458" + self.version ="1.7.0_svn#462" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) Modified: pytrainer/trunk/pytrainer.desktop =================================================================== --- pytrainer/trunk/pytrainer.desktop 2010-01-04 18:08:27 UTC (rev 461) +++ pytrainer/trunk/pytrainer.desktop 2010-01-04 18:16:55 UTC (rev 462) @@ -2,7 +2,7 @@ Version=1.0 Type=Application Encoding=UTF-8 -Name=pyTrainer sport training log +Name=pyTrainer Comment=The Free Sport Training Center Exec=pytrainer Icon=pytrainer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-01-04 18:08:34
|
Revision: 461 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=461&view=rev Author: dgranda Date: 2010-01-04 18:08:27 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Reverting to right versions after david's mixup Modified Paths: -------------- pytrainer/trunk/plugins/garmin-hr/conf.xml pytrainer/trunk/plugins/garmin-hr/translate.xsl Property Changed: ---------------- pytrainer/trunk/plugins/garmin-hr/conf.xml pytrainer/trunk/plugins/garmin-hr/translate.xsl Modified: pytrainer/trunk/plugins/garmin-hr/conf.xml =================================================================== --- pytrainer/trunk/plugins/garmin-hr/conf.xml 2010-01-04 17:55:28 UTC (rev 460) +++ pytrainer/trunk/plugins/garmin-hr/conf.xml 2010-01-04 18:08:27 UTC (rev 461) @@ -1,12 +1,11 @@ <?xml version="1.0" ?> <pytrainer-plugin - name="Garmin via garmintools" - description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using garmintools" - plugincode="garmintools_full" - pluginbutton="Import from Garmin GPS device (via garmintools)" - executable="garmintools_full" + name="Garmin via GPSBabel 1.3.5" + description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using GPSBabel (version 1.3.5)" + plugincode="garminhr" + pluginbutton="Import from Garmin GPS device (via GPSBabel)" + executable="garminhr" > +<conf-values variable="device" value="usb:"/> <conf-values variable="Force_sport_to" value=""/> -<conf-values variable="Not_older_days" value="0"/> -<conf-values variable="Legacy_comparison" value="True"/> </pytrainer-plugin> Property changes on: pytrainer/trunk/plugins/garmin-hr/conf.xml ___________________________________________________________________ Added: dummyproperty + 0 Modified: pytrainer/trunk/plugins/garmin-hr/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmin-hr/translate.xsl 2010-01-04 17:55:28 UTC (rev 460) +++ pytrainer/trunk/plugins/garmin-hr/translate.xsl 2010-01-04 18:08:27 UTC (rev 461) @@ -2,7 +2,7 @@ <!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> <xsl:stylesheet version="1.0" -xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> @@ -17,8 +17,8 @@ xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > <xsl:value-of select="$newline"/> - <xsl:variable name="sport"><xsl:value-of select="root/run/@sport"/></xsl:variable> - <xsl:variable name="time"><xsl:value-of select="root/point/@time"/></xsl:variable> + <xsl:variable name="sport">"Run"</xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> <metadata><xsl:value-of select="$newline"/> <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> @@ -26,57 +26,28 @@ <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> </metadata><xsl:value-of select="$newline"/> <trk><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Track"> <trkseg><xsl:value-of select="$newline"/> - <!-- <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> --> - <xsl:for-each select="root/point"> - <xsl:if test="@lat"> <!-- only write trkpt if lat/lon exist --> - <xsl:variable name="lat"><xsl:value-of select="@lat"/></xsl:variable> - <xsl:variable name="lon"><xsl:value-of select="@lon"/></xsl:variable> - <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> - <ele><xsl:value-of select="@alt"/></ele><xsl:value-of select="$newline"/> - <time><xsl:value-of select="@time"/></time><xsl:value-of select="$newline"/> - <xsl:if test="@hr"> - <extensions><xsl:value-of select="$newline"/> - <gpxdata:hr><xsl:value-of select="@hr"/></gpxdata:hr><xsl:value-of select="$newline"/> - </extensions><xsl:value-of select="$newline"/> - </xsl:if> - </trkpt><xsl:value-of select="$newline"/> - </xsl:if> + <xsl:for-each select="t:Trackpoint"> + <!-- only output a trkpt if a position exists --> + <xsl:if test="t:Position"> + <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="t:HeartRateBpm"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> </xsl:for-each> <xsl:value-of select="$newline"/> </trkseg><xsl:value-of select="$newline"/> - </trk><xsl:value-of select="$newline"/> - -<!-- Lap Data --> - <xsl:value-of select="$newline"/> - <extensions><xsl:value-of select="$newline"/> - <xsl:for-each select="root/lap"> - <xsl:variable name="vIndex"> - <xsl:number count="lap"/> - </xsl:variable> - <gpxdata:lap><xsl:value-of select="$newline"/> - <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> - <xsl:variable name="stlat"><xsl:value-of select="begin_pos/@lat"/></xsl:variable> - <xsl:variable name="stlon"><xsl:value-of select="begin_pos/@lon"/></xsl:variable> - <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> - <xsl:variable name="endlat"><xsl:value-of select="end_pos/@lat"/></xsl:variable> - <xsl:variable name="endlon"><xsl:value-of select="end_pos/@lon"/></xsl:variable> - <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> - <gpxdata:startTime><xsl:value-of select="@start"/></gpxdata:startTime><xsl:value-of select="$newline"/> - <gpxdata:elapsedTime><xsl:value-of select="@duration"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> <!-- Needs converting to seconds --> - <gpxdata:calories><xsl:value-of select="calories"/></gpxdata:calories><xsl:value-of select="$newline"/> - <gpxdata:distance><xsl:value-of select="@distance"/></gpxdata:distance><xsl:value-of select="$newline"/> - <gpxdata:summary><xsl:value-of select="$newline"/> - <MaximumSpeed kind="max"><xsl:value-of select="max_speed"/></MaximumSpeed><xsl:value-of select="$newline"/> - <AverageHeartRateBpm kind="avg"><xsl:value-of select="avg_hr"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> - <MaximumHeartRateBpm kind="max"><xsl:value-of select="max_hr"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> - </gpxdata:summary><xsl:value-of select="$newline"/> - <gpxdata:trigger><xsl:value-of select="@trigger"/></gpxdata:trigger><xsl:value-of select="$newline"/> - <gpxdata:intensity><xsl:value-of select="intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> - </gpxdata:lap><xsl:value-of select="$newline"/> </xsl:for-each> - </extensions><xsl:value-of select="$newline"/> - + </trk><xsl:value-of select="$newline"/> </gpx><xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet> Property changes on: pytrainer/trunk/plugins/garmin-hr/translate.xsl ___________________________________________________________________ Added: dummyproperty + 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-01-04 17:55:38
|
Revision: 460 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=460&view=rev Author: dgranda Date: 2010-01-04 17:55:28 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Initial commit for plugin to retieve data from GPS device using garmintools Added Paths: ----------- pytrainer/trunk/plugins/garmintools_full/ pytrainer/trunk/plugins/garmintools_full/conf.xml pytrainer/trunk/plugins/garmintools_full/garmintools_full.py pytrainer/trunk/plugins/garmintools_full/pytrainer.style pytrainer/trunk/plugins/garmintools_full/translate.xsl Added: pytrainer/trunk/plugins/garmintools_full/conf.xml =================================================================== --- pytrainer/trunk/plugins/garmintools_full/conf.xml (rev 0) +++ pytrainer/trunk/plugins/garmintools_full/conf.xml 2010-01-04 17:55:28 UTC (rev 460) @@ -0,0 +1,12 @@ +<?xml version="1.0" ?> +<pytrainer-plugin + name="Garmin via garmintools" + description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using garmintools" + plugincode="garmintools_full" + pluginbutton="Import from Garmin GPS device (via garmintools)" + executable="garmintools_full" +> +<conf-values variable="Force_sport_to" value=""/> +<conf-values variable="Not_older_days" value="0"/> +<conf-values variable="Legacy_comparison" value="True"/> +</pytrainer-plugin> Added: pytrainer/trunk/plugins/garmintools_full/garmintools_full.py =================================================================== --- pytrainer/trunk/plugins/garmintools_full/garmintools_full.py (rev 0) +++ pytrainer/trunk/plugins/garmintools_full/garmintools_full.py 2010-01-04 17:55:28 UTC (rev 460) @@ -0,0 +1,318 @@ +#!/usr/bin/python +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import os +import sys +import logging +import fnmatch +import commands +import StringIO +from lxml import etree +from pytrainer.lib.xmlUtils import XMLParser +import dateutil.parser +from datetime import date, timedelta, datetime +from dateutil.tz import * # for tzutc() +import traceback + +class garmintools_full(): + """ Plugin to import from a Garmin device using gpsbabel + Checks each activity to see if any entries are in the database with the same start time + Creates GPX files for each activity not in the database + + Note: using lxml see http://codespeak.net/lxml + """ + def __init__(self, parent = None, validate=False): + self.parent = parent + self.confdir = self.parent.conf.getValue("confdir") + self.tmpdir = self.parent.conf.getValue("tmpdir") + # Tell garmintools where to save retrieved data from GPS device + os.environ['GARMIN_SAVE_RUNS']=self.tmpdir + self.data_path = os.path.dirname(__file__) + self.validate = validate + self.sport = self.getConfValue("Force_sport_to") + self.deltaDays = self.getConfValue("Not_older_days") + if self.deltaDays is None: + self.deltaDays = 0 + #so far hardcoded to False - dg 20100104 + #self.legacyComp = self.getConfValue("Legacy_comparison") + self.legacyComp = False + + def getConfValue(self, confVar): + info = XMLParser(self.data_path+"/conf.xml") + code = info.getValue("pytrainer-plugin","plugincode") + plugindir = self.parent.conf.getValue("plugindir") + if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): + value = None + else: + info = XMLParser(plugindir+"/"+code+"/conf.xml") + value = info.getValue("pytrainer-plugin",confVar) + return value + + def run(self): + logging.debug(">>") + # Create a compressed copy of current user directory + try: + self.createUserdirBackup() + except: + logging.error('Not able to make a copy of current user directory. Printing traceback and exiting') + traceback.print_exc() + exit(-1) + + importFiles = [] + if self.checkLoadedModule(): + numError = self.getDeviceInfo() + if numError >= 0: + #TODO Remove Zenity below + outgps = commands.getstatusoutput("garmin_save_runs | zenity --progress --pulsate --text='Loading Data' auto-close") + if outgps[0]==0: + # now we should have a lot of gmn (binary) files under $GARMIN_SAVE_RUNS + foundFiles = self.searchFiles(self.tmpdir, "gmn") + logging.info("Retrieved "+str(len(foundFiles))+" entries from GPS device") + # discard old files + selectedFiles = self.discardOld(foundFiles) + # checking which entries are not imported yet + # commented out to fully rely on duplicates checking from garmintools plugin + #selectedFiles = self.checkDupes(foundFiles) + if selectedFiles is not None: + logging.info("Dumping "+str(len(selectedFiles))+" binary files found") + dumpFiles = self.dumpBinaries(selectedFiles) + logging.info("Starting import") + importFiles = self.importEntries(dumpFiles) + else: + logging.info("No new entries to add") + else: + logging.error("Error when retrieving data from GPS device") + else: + #TODO Remove Zenity below + if numError == -1: + os.popen("zenity --error --text='No Garmin device found\nCheck your configuration'"); + elif numError == -2: + os.popen("zenity --error --text='Can not find garmintools binaries\nCheck your configuration'") + else: #No garmin device found + #TODO Remove Zenity below + os.popen("zenity --error --text='Can not handle Garmin device (wrong module loaded)\nCheck your configuration'"); + logging.info("Entries to import: "+str(len(importFiles))) + logging.debug("<<") + return importFiles + + def discardOld(self, listEntries): + tempList = [] + if self.deltaDays > 0: + logging.info("Discarding entries older than "+str(self.deltaDays)+" days") + limit = datetime.now() - timedelta(days = int(self.deltaDays)) + for entry in listEntries: + filename = os.path.split(entry)[1].rstrip(".gmn") + filenameDateTime = datetime.strptime(filename,"%Y%m%dT%H%M%S") + logging.debug("Entry time: "+str(filenameDateTime)+" | limit: "+str(limit)) + if filenameDateTime < limit: + logging.debug("Discarding old entry: "+str(filenameDateTime)) + else: + tempList.append(entry) + else: + logging.info("Retrieving complete history from GPS device") + return tempList + + def checkDupe(self, tree, filename): + logging.debug(">>") + stringStartDatetime = self.detailsFromFile(tree) # this time is localtime! (with timezone offset) + exists = False + if stringStartDatetime is not None: + startDatetime = dateutil.parser.parse(stringStartDatetime) + # converting to utc for proper comparison with date_time_utc + utcStartDatetime = startDatetime.astimezone(tzutc()).strftime("%Y-%m-%dT%H:%M:%SZ") + #ToDo. Think about best approach + else: + logging.debug("Not able to find start time, please check "+str(filename)) + exists = True # workaround for old/not correct entries (will crash at some point during import process otherwise) + logging.debug("<<") + return exists + + def importEntries(self, entries): + # modified from garmintools plugin written by jb + logging.debug(">>") + logging.debug("Selected files: "+str(entries)) + importfiles = [] + for filename in entries: + if self.valid_input_file(filename): + #Garmin dump files are not valid xml - need to load into a xmltree + #read file into string + with open(filename, 'r') as f: + xmlString = f.read() + fileString = StringIO.StringIO("<root>"+xmlString+"</root>") + #parse string as xml + tree = etree.parse(fileString) + if not self.inDatabase(tree, filename): + sport = self.getSport(tree) + gpxfile = "%s/garmintools-%d.gpx" % (self.tmpdir, len(importfiles)) + self.createGPXfile(gpxfile, tree) + importfiles.append((gpxfile, sport)) + else: + logging.debug("%s already present. Skipping import." % (filename,) ) + else: + logging.error("File %s failed validation" % (filename)) + logging.debug("<<") + return importfiles + + def valid_input_file(self, filename): + """ Function to validate input file if requested""" + if not self.validate: #not asked to validate + logging.debug("Not validating %s" % (filename) ) + return True + else: + logging.debug("Cannot validate garmintools dump files yet") + return True + '''xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v2.xsd" + from lib.xmlValidation import xmlValidator + validator = xmlValidator() + return validator.validateXSL(filename, xslfile)''' + + def inDatabase(self, tree, filename): + #comparing date and start time (sport may have been changed in DB after import) + stringStartDatetime = self.detailsFromFile(tree) # this time is localtime! (with timezone offset) + exists = False + if stringStartDatetime is not None: + startDatetime = dateutil.parser.parse(stringStartDatetime) + # converting to utc for proper comparison with date_time_utc + utcDatetime = startDatetime.astimezone(tzutc()).strftime("%Y-%m-%dT%H:%M:%SZ") + if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (utcDatetime)): + exists = True + else: + logging.info("Marking "+str(filename)+" | "+str(utcDatetime)+" to import") + exists = False + else: + logging.debug("Not able to find start time, please check "+str(filename)) + exists = True # workaround for old/not correct entries (will crash at some point during import process otherwise) + return exists + + def getSport(self, tree): + #return sport from file or overide if present + if self.sport: + return self.sport + root = tree.getroot() + sportElement = root.find(".//run") + try: + sport = sportElement.get("sport") + sport = sport.capitalize() + except: + sport = "import" + return sport + + def detailsFromFile(self, tree): + root = tree.getroot() + #Find first point + pointElement = root.find(".//point") + if pointElement is not None: + stringStartDatetime = pointElement.get("time") + return stringStartDatetime + return None + + def createGPXfile(self, gpxfile, tree): + """ Function to transform a Garmintools dump file to a valid GPX+ file + """ + xslt_doc = etree.parse(self.data_path+"/translate.xsl") + transform = etree.XSLT(xslt_doc) + result_tree = transform(tree) + result_tree.write(gpxfile, xml_declaration=True) + + def dumpBinaries(self, listFiles): + logging.debug(">>") + dumpFiles=[] + for filename in listFiles: + outdump = filename.replace('.gmn', '.dump') + logging.debug("outdump: "+str(outdump)) + result = commands.getstatusoutput("garmin_dump %s > %s" %(filename,outdump)) + if result[0] == 0: + dumpFiles.append(outdump) + else: + logging.error("Error when creating dump of "+str(filename)+": "+str(result)) + logging.debug("<<") + return dumpFiles + + def searchFiles(self, rootPath, extension): + logging.debug(">>") + foundFiles=[] + logging.debug("rootPath: "+str(rootPath)) + result = commands.getstatusoutput("find %s -name *.%s" %(rootPath,extension)) + if result[0] == 0: + foundFiles = result[1].splitlines() + #logging.debug("Found files: "+str(foundFiles)) + logging.info ("Found files: "+str(len(foundFiles))) + else: + logging.error("Not able to locate files from GPS: "+str(result)) + logging.debug("<<") + return foundFiles + + def getDeviceInfo(self): + logging.debug(">>") + result = commands.getstatusoutput('garmin_get_info') + logging.debug("Returns "+str(result)) + numError = 0 + if result[0] == 0: + if result[1] != "garmin unit could not be opened!": + try: + #ToDo: review, always get "lxml.etree.XMLSyntaxError: PCDATA invalid Char value 28, line 6, column 29" error + xmlString = result[1].rstrip() + logging.debug("xmlString: "+str(xmlString)) + prueba = etree.XMLID(xmlString) + logging.debug("Prueba: "+str(prueba)) + tree = etree.fromstring(xmlString) + description = self.getProductDesc(tree) + if description is not None: + logging.info("Found "+str(description)) + else: + raise Exception + except: + logging.error("Not able to identify GPS device. Continuing anyway...") + pass + else: + logging.error(result[1]) + numError = -1 + else: + logging.error("Can not find garmintools binaries, please check your installation") + numError = -2 + logging.debug("<<") + return numError + + def getProductDesc(self, tree): + root = tree.getroot() + pointProduct = root.find(".//garmin_product") + if pointProduct is not None: + desc = pointProduct.get("product_description") + return desc + return None + + def checkLoadedModule(self): + try: + outmod = commands.getstatusoutput('/sbin/lsmod | grep garmin_gps') + if outmod[0]==256: #there is no garmin_gps module loaded + return True + else: + return False + except: + return False + + def createUserdirBackup(self): + logging.debug('>>') + result = commands.getstatusoutput('tar -cvzf '+os.environ['HOME']+'/pytrainer_`date +%Y%m%d_%H%M`.tar.gz '+self.confdir) + if result[0] != 0: + raise Exception, "Copying current user directory does not work, error #"+str(result) + else: + logging.info('User directory backup successfully created') + logging.debug('<<') + Added: pytrainer/trunk/plugins/garmintools_full/pytrainer.style =================================================================== --- pytrainer/trunk/plugins/garmintools_full/pytrainer.style (rev 0) +++ pytrainer/trunk/plugins/garmintools_full/pytrainer.style 2010-01-04 17:55:28 UTC (rev 460) @@ -0,0 +1,39 @@ +# gpsbabel XCSV style file +# +# Format: GPSDrive +# Author: Alex Mottram +# Date: 12/11/2002 +# +# +# + +DESCRIPTION GpsDrive Format +DATATIPE TRACK + +# FILE LAYOUT DEFINITIIONS: +# +FIELD_DELIMITER WHITESPACE +RECORD_DELIMITER CRNEWLINE +BADCHARS WHITESPACE +PROLOGUE OziExplorer Waypoint File Version 1.1 + +SHORTLEN 20 +SHORTWHITE 0 + +# +# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE: + +IFIELD SHORTNAME, "", "%s" +IFIELD LAT_DECIMAL, "", "%08.5f" +IFIELD LON_DECIMAL, "", "%08.5f" +IFIELD ALT_METERS, "", "%.0f" +IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" +IFIELD ICON_DESCR, "", "%s" +IFIELD TRACK_NAME, "", "%s" + +#OFIELD TRACK_NAME, "", "%s" +OFIELD LAT_DECIMAL, "", "%08.5f" +OFIELD LON_DECIMAL, "", "%08.5f" +OFIELD ALT_METERS, "", "%.0f" +OFIELD GMT_TIME,"","%s" +OFIELD HEART_RATE,"","%d" Added: pytrainer/trunk/plugins/garmintools_full/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmintools_full/translate.xsl (rev 0) +++ pytrainer/trunk/plugins/garmintools_full/translate.xsl 2010-01-04 17:55:28 UTC (rev 460) @@ -0,0 +1,82 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport"><xsl:value-of select="root/run/@sport"/></xsl:variable> + <xsl:variable name="time"><xsl:value-of select="root/point/@time"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> + <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> + <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> + </metadata><xsl:value-of select="$newline"/> + <trk><xsl:value-of select="$newline"/> + <trkseg><xsl:value-of select="$newline"/> + <!-- <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> --> + <xsl:for-each select="root/point"> + <xsl:if test="@lat"> <!-- only write trkpt if lat/lon exist --> + <xsl:variable name="lat"><xsl:value-of select="@lat"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="@lon"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="@alt"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="@time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="@hr"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="@hr"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> + </xsl:for-each> + <xsl:value-of select="$newline"/> + </trkseg><xsl:value-of select="$newline"/> + </trk><xsl:value-of select="$newline"/> + +<!-- Lap Data --> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <xsl:for-each select="root/lap"> + <xsl:variable name="vIndex"> + <xsl:number count="lap"/> + </xsl:variable> + <gpxdata:lap><xsl:value-of select="$newline"/> + <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> + <xsl:variable name="stlat"><xsl:value-of select="begin_pos/@lat"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="begin_pos/@lon"/></xsl:variable> + <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> + <xsl:variable name="endlat"><xsl:value-of select="end_pos/@lat"/></xsl:variable> + <xsl:variable name="endlon"><xsl:value-of select="end_pos/@lon"/></xsl:variable> + <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> + <gpxdata:startTime><xsl:value-of select="@start"/></gpxdata:startTime><xsl:value-of select="$newline"/> + <gpxdata:elapsedTime><xsl:value-of select="@duration"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> <!-- Needs converting to seconds --> + <gpxdata:calories><xsl:value-of select="calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + <gpxdata:distance><xsl:value-of select="@distance"/></gpxdata:distance><xsl:value-of select="$newline"/> + <gpxdata:summary><xsl:value-of select="$newline"/> + <MaximumSpeed kind="max"><xsl:value-of select="max_speed"/></MaximumSpeed><xsl:value-of select="$newline"/> + <AverageHeartRateBpm kind="avg"><xsl:value-of select="avg_hr"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> + <MaximumHeartRateBpm kind="max"><xsl:value-of select="max_hr"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> + </gpxdata:summary><xsl:value-of select="$newline"/> + <gpxdata:trigger><xsl:value-of select="@trigger"/></gpxdata:trigger><xsl:value-of select="$newline"/> + <gpxdata:intensity><xsl:value-of select="intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> + </gpxdata:lap><xsl:value-of select="$newline"/> + </xsl:for-each> + </extensions><xsl:value-of select="$newline"/> + + </gpx><xsl:value-of select="$newline"/> +</xsl:template> +</xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2010-01-04 17:46:03
|
Revision: 459 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=459&view=rev Author: dgranda Date: 2010-01-04 17:45:56 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Initial commit for plugin to retieve data from GPS device using garmintools Modified Paths: -------------- pytrainer/trunk/plugins/garmin-hr/conf.xml pytrainer/trunk/plugins/garmin-hr/translate.xsl pytrainer/trunk/setup.py Modified: pytrainer/trunk/plugins/garmin-hr/conf.xml =================================================================== --- pytrainer/trunk/plugins/garmin-hr/conf.xml 2010-01-04 02:57:59 UTC (rev 458) +++ pytrainer/trunk/plugins/garmin-hr/conf.xml 2010-01-04 17:45:56 UTC (rev 459) @@ -1,11 +1,12 @@ <?xml version="1.0" ?> <pytrainer-plugin - name="Garmin via GPSBabel 1.3.5" - description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using GPSBabel (version 1.3.5)" - plugincode="garminhr" - pluginbutton="Import from Garmin GPS device (via GPSBabel)" - executable="garminhr" + name="Garmin via garmintools" + description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using garmintools" + plugincode="garmintools_full" + pluginbutton="Import from Garmin GPS device (via garmintools)" + executable="garmintools_full" > -<conf-values variable="device" value="usb:"/> <conf-values variable="Force_sport_to" value=""/> +<conf-values variable="Not_older_days" value="0"/> +<conf-values variable="Legacy_comparison" value="True"/> </pytrainer-plugin> Modified: pytrainer/trunk/plugins/garmin-hr/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmin-hr/translate.xsl 2010-01-04 02:57:59 UTC (rev 458) +++ pytrainer/trunk/plugins/garmin-hr/translate.xsl 2010-01-04 17:45:56 UTC (rev 459) @@ -2,7 +2,7 @@ <!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> <xsl:stylesheet version="1.0" -xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> @@ -17,8 +17,8 @@ xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > <xsl:value-of select="$newline"/> - <xsl:variable name="sport">"Run"</xsl:variable> - <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> + <xsl:variable name="sport"><xsl:value-of select="root/run/@sport"/></xsl:variable> + <xsl:variable name="time"><xsl:value-of select="root/point/@time"/></xsl:variable> <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> <metadata><xsl:value-of select="$newline"/> <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> @@ -26,28 +26,57 @@ <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> </metadata><xsl:value-of select="$newline"/> <trk><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Track"> <trkseg><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Trackpoint"> - <!-- only output a trkpt if a position exists --> - <xsl:if test="t:Position"> - <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> - <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> - <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> - <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> - <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> - <xsl:if test="t:HeartRateBpm"> - <extensions><xsl:value-of select="$newline"/> - <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> - </extensions><xsl:value-of select="$newline"/> - </xsl:if> - </trkpt><xsl:value-of select="$newline"/> - </xsl:if> + <!-- <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> --> + <xsl:for-each select="root/point"> + <xsl:if test="@lat"> <!-- only write trkpt if lat/lon exist --> + <xsl:variable name="lat"><xsl:value-of select="@lat"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="@lon"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="@alt"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="@time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="@hr"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="@hr"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> </xsl:for-each> <xsl:value-of select="$newline"/> </trkseg><xsl:value-of select="$newline"/> + </trk><xsl:value-of select="$newline"/> + +<!-- Lap Data --> + <xsl:value-of select="$newline"/> + <extensions><xsl:value-of select="$newline"/> + <xsl:for-each select="root/lap"> + <xsl:variable name="vIndex"> + <xsl:number count="lap"/> + </xsl:variable> + <gpxdata:lap><xsl:value-of select="$newline"/> + <gpxdata:index><xsl:value-of select="$vIndex"/></gpxdata:index><xsl:value-of select="$newline"/> + <xsl:variable name="stlat"><xsl:value-of select="begin_pos/@lat"/></xsl:variable> + <xsl:variable name="stlon"><xsl:value-of select="begin_pos/@lon"/></xsl:variable> + <gpxdata:startPoint lat="{$stlat}" lon="{$stlon}"/><xsl:value-of select="$newline"/> + <xsl:variable name="endlat"><xsl:value-of select="end_pos/@lat"/></xsl:variable> + <xsl:variable name="endlon"><xsl:value-of select="end_pos/@lon"/></xsl:variable> + <gpxdata:endPoint lat="{$endlat}" lon="{$endlon}"/><xsl:value-of select="$newline"/> + <gpxdata:startTime><xsl:value-of select="@start"/></gpxdata:startTime><xsl:value-of select="$newline"/> + <gpxdata:elapsedTime><xsl:value-of select="@duration"/></gpxdata:elapsedTime><xsl:value-of select="$newline"/> <!-- Needs converting to seconds --> + <gpxdata:calories><xsl:value-of select="calories"/></gpxdata:calories><xsl:value-of select="$newline"/> + <gpxdata:distance><xsl:value-of select="@distance"/></gpxdata:distance><xsl:value-of select="$newline"/> + <gpxdata:summary><xsl:value-of select="$newline"/> + <MaximumSpeed kind="max"><xsl:value-of select="max_speed"/></MaximumSpeed><xsl:value-of select="$newline"/> + <AverageHeartRateBpm kind="avg"><xsl:value-of select="avg_hr"/></AverageHeartRateBpm><xsl:value-of select="$newline"/> + <MaximumHeartRateBpm kind="max"><xsl:value-of select="max_hr"/></MaximumHeartRateBpm><xsl:value-of select="$newline"/> + </gpxdata:summary><xsl:value-of select="$newline"/> + <gpxdata:trigger><xsl:value-of select="@trigger"/></gpxdata:trigger><xsl:value-of select="$newline"/> + <gpxdata:intensity><xsl:value-of select="intensity"/></gpxdata:intensity><xsl:value-of select="$newline"/> + </gpxdata:lap><xsl:value-of select="$newline"/> </xsl:for-each> - </trk><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet> Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2010-01-04 02:57:59 UTC (rev 458) +++ pytrainer/trunk/setup.py 2010-01-04 17:45:56 UTC (rev 459) @@ -40,6 +40,7 @@ install_plugin("garmin-tcxv2"), install_plugin("googleearth"), install_plugin("garmintools"), + install_plugin("garmintools_full"), install_extension("wordpress"), (install_locale("es")), (install_locale("ca")), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2010-01-04 02:58:06
|
Revision: 458 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=458&view=rev Author: jblance Date: 2010-01-04 02:57:59 +0000 (Mon, 04 Jan 2010) Log Message: ----------- EXPERIMENTAL: Single import screen - incomplete use --testimport to see GUI Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/xmlUtils.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/setup.py Added Paths: ----------- pytrainer/trunk/glade/importdata.glade pytrainer/trunk/import/ pytrainer/trunk/import/file_garmintcxv1.py pytrainer/trunk/import/file_garmintcxv2.py pytrainer/trunk/import/file_garmintools.py pytrainer/trunk/import/translate_garmintools.xsl pytrainer/trunk/pytrainer/gui/windowimportdata.py pytrainer/trunk/pytrainer/importdata.py Added: pytrainer/trunk/glade/importdata.glade =================================================================== --- pytrainer/trunk/glade/importdata.glade (rev 0) +++ pytrainer/trunk/glade/importdata.glade 2010-01-04 02:57:59 UTC (rev 458) @@ -0,0 +1,372 @@ +<?xml version="1.0"?> +<glade-interface> + <!-- interface-requires gtk+ 2.16 --> + <!-- interface-naming-policy toplevel-contextual --> + <widget class="GtkWindow" id="win_importdata"> + <property name="visible">True</property> + <property name="title" translatable="yes">Import</property> + <property name="window_position">mouse</property> + <property name="default_width">600</property> + <property name="default_height">400</property> + <property name="destroy_with_parent">True</property> + <property name="icon">logo_mini.png</property> + <signal name="destroy_event" handler="on_win_importdata_destroy_event"/> + <signal name="delete_event" handler="on_win_importdata_delete_event"/> + <child> + <widget class="GtkNotebook" id="notebookMainTabs"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <signal name="switch_page" handler="on_notebookMainTabs_switch_page"/> + <child> + <widget class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <placeholder/> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame1</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelImportFromDevice"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Import from GPS Device</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> + <property name="type">tab</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vboxImportFromFile"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkFrame" id="frameSelectFile"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <child> + <widget class="GtkFileChooserButton" id="filechooserbuttonSelectFile"> + <property name="visible">True</property> + <property name="create_folders">False</property> + <property name="focus_on_click">False</property> + <signal name="file_set" handler="on_filechooserbuttonSelectFile_file_set"/> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="buttonClearFile"> + <property name="label" translatable="yes">Clear</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_buttonClearFile_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelSelectFileFrame"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Select a file to import</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">5</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkFrame" id="frameFileType"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkScrolledWindow" id="scrolledwindowImportEvents"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <child> + <widget class="GtkTreeView" id="treeviewImportEvents"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelEvents"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Select Activities to Import</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="hboxImportButton"> + <property name="visible">True</property> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkButton" id="buttonImport"> + <property name="label" translatable="yes">Import</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="on_buttonImport_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkStatusbar" id="statusbarImportFile"> + <property name="visible">True</property> + <property name="spacing">2</property> + <property name="has_resize_grip">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelImportFromFilePage"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Import from File</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="position">1</property> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> + <property name="type">tab</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vboxOptions"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkFrame" id="frameDefaultTab"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <child> + <widget class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkHBox" id="hboxDefaultTab"> + <property name="visible">True</property> + <child> + <widget class="GtkRadioButton" id="radiobuttonTabGPSDevice"> + <property name="label" translatable="yes">Import from GPS Device</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">10</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkRadioButton" id="radiobuttonFile"> + <property name="label" translatable="yes">Import from File</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">radiobuttonTabGPSDevice</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">10</property> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="labelDefaultTab"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Default to Tab</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="padding">5</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkHBox" id="hboxOptionButtons"> + <property name="visible">True</property> + <child> + <widget class="GtkButton" id="buttonReset"> + <property name="label" translatable="yes">Reset</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="on_buttonReset_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="buttonSave"> + <property name="label" translatable="yes">Save</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="on_buttonSave_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">10</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="padding">5</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkStatusbar" id="statusbarOptions"> + <property name="visible">True</property> + <property name="spacing">2</property> + <property name="has_resize_grip">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="labelOptionsPage"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Options</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="position">2</property> + <property name="tab_expand">True</property> + <property name="tab_fill">False</property> + <property name="type">tab</property> + </packing> + </child> + </widget> + </child> + </widget> +</glade-interface> Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2010-01-02 19:46:27 UTC (rev 457) +++ pytrainer/trunk/glade/pytrainer.glade 2010-01-04 02:57:59 UTC (rev 458) @@ -61,6 +61,15 @@ </child> <child> + <widget class="GtkImageMenuItem" id="menu_importdata"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Import</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_menu_importdata_activate" last_modification_time="Sun, 26 Mar 2006 19:38:34 GMT"/> + </widget> + </child> + + <child> <widget class="GtkSeparatorMenuItem" id="separador1"> <property name="visible">True</property> </widget> @@ -8566,4640 +8575,7 @@ </widget> </child> </widget> -<!-- moved to newrecord.glade -<widget class="GtkWindow" id="newrecord"> - <property name="visible">True</property> - <property name="title" translatable="yes">New Entry</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="icon">logo_mini.png</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> - <signal name="destroy" handler="quit" last_modification_time="Sun, 23 Sep 2007 20:55:46 GMT"/> - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkNotebook" id="notebook2"> - <property name="border_width">9</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> - - <child> - <widget class="GtkVBox" id="vbox27"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame19"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment22"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table28"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label156"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Title:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_title"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label161"> - <property name="visible">True</property> - <property name="label" translatable="yes">GPX File:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_gpxfile"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button25"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-open</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_selectfile_clicked" last_modification_time="Mon, 23 Oct 2006 10:40:57 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button24"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate Values</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calculatevalues_clicked" last_modification_time="Mon, 23 Oct 2006 10:41:32 GMT"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sport:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkComboBoxEntry" id="rcd_sport"> - <property name="width_request">134</property> - <property name="visible">True</property> - <property name="items" translatable="yes"></property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483646"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Main</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame24"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment28"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table31"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label8"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Distance (Km):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button10"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcdistance_clicked" last_modification_time="Mon, 15 May 2006 18:26:54 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Time:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox7"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkSpinButton" id="rcd_hour"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 23 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label35"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_min"> - <property name="width_request">47</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label36"> - <property name="visible">True</property> - <property name="label" translatable="yes">:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="rcd_second"> - <property name="width_request">42</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 59 1 2 2</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_distance"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button11"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calctime_clicked" last_modification_time="Mon, 15 May 2006 18:27:10 GMT"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label6"> - <property name="width_request">60</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Date:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkEntry" id="rcd_date"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label28"> - <property name="visible">True</property> - <property name="label" translatable="yes"> </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button7"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calendar_clicked" last_modification_time="Sun, 02 Apr 2006 18:37:59 GMT"/> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-index</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label-2147483648"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>General</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="Velocity"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment27"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkTable" id="table30"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">5</property> - - <child> - <widget class="GtkLabel" id="label134"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Max (km/h):</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_maxvel"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label133"> - <property name="visible">True</property> - <property name="label" translatable="yes">Velocity (km/h)</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button12"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Calculate</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_calcaverage_clicked" last_modification_time="Mon, 15 May 2006 18:27:33 GMT"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="rcd_average"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> - <property name="width_chars">7</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label162"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Velocity</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Quick Entry</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox26"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame20"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment23"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property nam... [truncated message content] |
From: <jb...@us...> - 2010-01-02 19:46:40
|
Revision: 457 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=457&view=rev Author: jblance Date: 2010-01-02 19:46:27 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Move preferences to separate glade file Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowprofile.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/glade/profile.glade Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2010-01-02 03:02:37 UTC (rev 456) +++ pytrainer/trunk/glade/newrecord.glade 2010-01-02 19:46:27 UTC (rev 457) @@ -693,7 +693,7 @@ <child> <widget class="GtkLabel" id="lblTime"> <property name="visible">True</property> - <property name="label" translatable="yes">Time:</property> + <property name="label" translatable="yes">Start Time:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Added: pytrainer/trunk/glade/profile.glade =================================================================== --- pytrainer/trunk/glade/profile.glade (rev 0) +++ pytrainer/trunk/glade/profile.glade 2010-01-02 19:46:27 UTC (rev 457) @@ -0,0 +1,2771 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="newprofile"> + <property name="visible">True</property> + <property name="title" translatable="yes">Preferences</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="icon">logo_mini.png</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="gtk_main_quit" last_modification_time="Mon, 27 Mar 2006 21:26:56 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkNotebook" id="notebook3"> + <property name="border_width">9</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + <signal name="switch_page" handler="on_switch_page" last_modification_time="Sat, 01 Apr 2006 14:42:27 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox24"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame14"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment14"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table19"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkRadioButton" id="prf_metric_system"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Metric system</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="prf_us_system"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">U.S. customary units</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">prf_metric_system</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label20"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>System of Measurement</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame13"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment13"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table3"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">4</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="prf_ddbb_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database type:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbhost_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database host:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbhost"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbname_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database name:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbname"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="prf_ddbb"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + <signal name="changed" handler="on_prf_ddbb_changed" last_modification_time="Mon, 24 Apr 2006 19:58:19 GMT"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbuser_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database user:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="prf_ddbbpass_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Database pass:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbuser"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_ddbbpass"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">False</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label19"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Database</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame15"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment15"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table20"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label22"> + <property name="visible">True</property> + <property name="label" translatable="yes">Use this port for internal connections: </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry345"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <property name="width_chars">6</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes"><small><b>Note:</b> Change this only if you know what you are doing</small></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label21"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Port Connnection</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483645"> + <property name="visible">True</property> + <property name="label" translatable="yes">General</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame12"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment12"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table2"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">4</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkLabel" id="label14"> + <property name="visible">True</property> + <property name="label" translatable="yes">User name:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label15"> + <property name="visible">True</property> + <property name="label" translatable="yes">Gender:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="prf_gender"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label17"> + <property name="visible">True</property> + <property name="label" translatable="yes">Height:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_height"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_name"> + <property name="width_request">160</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label18"> + <property name="visible">True</property> + <property name="label" translatable="yes">Date of birth:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox50"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkEntry" id="prf_age"> + <property name="width_request">108</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button46"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_calendar_clicked" last_modification_time="Sun, 02 Apr 2006 18:37:59 GMT"/> + + <child> + <widget class="GtkImage" id="image31"> + <property name="visible">True</property> + <property name="stock">gtk-index</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="prf_weight"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label16"> + <property name="visible">True</property> + <property name="label" translatable="yes">Weight:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Athlete Details</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label13"> + <property name="visible">True</property> + <property name="label" translatable="yes">Athlete</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkNotebook" id="notebook5"> + <property name="visible">True</property> + <property name="show_tabs">False</property> + <property name="show_border">False</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + + <child> + <widget class="GtkFrame" id="sportlist"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment16"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkVBox" id="sportlist_"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkScrolledWindow" id="sportScrollWindow"> + <property name="height_request">170</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTreeView" id="sportTreeView"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">True</property> + <property name="rules_hint">False</property> + <property name="reorderable">False</property> + <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">False</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="label26"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-delete</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_delsport_clicked" last_modification_time="Tue, 17 Oct 2006 17:11:23 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button23"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-edit</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_editsport_clicked" last_modification_time="Tue, 17 Oct 2006 17:51:12 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button6"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-add</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_addsport_clicked" last_modification_time="Tue, 17 Oct 2006 17:11:05 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Sport List</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label135"> + <property name="visible">True</property> + <property name="label" translatable="yes">llist</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="addsport"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment18"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkVBox" id="addsport_"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkTable" id="table18"> + <property name="visible">True</property> + <property name="n_rows">4</property> + <property name="n_columns">3</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">5</property> + + <child> + <widget class="GtkEntry" id="newsportentry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label154"> + <property name="visible">True</property> + <property name="label" translatable="yes">Name:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label155"> + <property name="visible">True</property> + <property name="label" translatable="yes">M.E.T.:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="newmetentry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="visible">True</property> + <property name="label" translatable="yes">Extra Weight:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="newweightentry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label156"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options">... [truncated message content] |
From: <jb...@us...> - 2010-01-02 03:02:43
|
Revision: 456 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=456&view=rev Author: jblance Date: 2010-01-02 03:02:37 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Bug fix for pytrainer-Bugs-2924209 Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/sqliteUtils.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/lib/sqliteUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2009-12-30 04:11:21 UTC (rev 455) +++ pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2010-01-02 03:02:37 UTC (rev 456) @@ -264,6 +264,7 @@ def addColumn(self,tableName,columnName,dataType): sql = "alter table %s add %s %s" %(tableName,columnName,dataType) + logging.debug("Trying SQL: %s" % sql) try: self.freeExec(sql) except: Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-30 04:11:21 UTC (rev 455) +++ pytrainer/trunk/pytrainer/main.py 2010-01-02 03:02:37 UTC (rev 456) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#455" + self.version ="1.7.0_svn#456" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) @@ -122,7 +122,7 @@ self.ddbb = DDBB(self.configuration) logging.debug('connecting to DDBB') self.ddbb.connect() - self.record = Record(data_path,self) + #self.record = Record(data_path,self) #Look for force check file check_file = self.data_path+"/FORCE_DB_CHECK" @@ -134,7 +134,9 @@ self.sanityCheck() # Deprecates migrationCheck. Review first installation and version control else: logging.info('No sanity check requested') - + + self.record = Record(data_path,self) + #preparamos la ventana principal self.windowmain = Main(data_path,self,self.version, gpxDir=self.conf.getValue("gpxdir")) self.date = Date(self.windowmain.calendar) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-30 04:11:28
|
Revision: 455 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=455&view=rev Author: jblance Date: 2009-12-30 04:11:21 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Bug fix on record graph lap display Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-12-30 03:55:53 UTC (rev 454) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-12-30 04:11:21 UTC (rev 455) @@ -293,10 +293,10 @@ if xzones is not None: for xzone in xzones: if xzones.index(xzone) % 2: - color='b' + zonecolor='b' else: - color='g' - axis.axvspan(xzone[0], xzone[1], alpha=0.25, facecolor=color) + zonecolor='g' + axis.axvspan(xzone[0], xzone[1], alpha=0.25, facecolor=zonecolor) maxX = max(xvalues[i]) if i>=1: ax2 = axis.twinx() Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-30 03:55:53 UTC (rev 454) +++ pytrainer/trunk/pytrainer/main.py 2009-12-30 04:11:21 UTC (rev 455) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#454" + self.version ="1.7.0_svn#455" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-30 03:56:02
|
Revision: 454 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=454&view=rev Author: jblance Date: 2009-12-30 03:55:53 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Added lap display to record graph - user selectable Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/recordgraph.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/glade/pytrainer.glade 2009-12-30 03:55:53 UTC (rev 454) @@ -1891,6 +1891,16 @@ <property name="fill">False</property> </packing> </child> + <child> + <widget class="GtkCheckButton" id="btnShowLaps"> + <property name="label" translatable="yes">Show Laps</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_btnShowLaps_toggled"/> + </widget> + </child> <child> <widget class="GtkLabel" id="label-2147483645"> Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-30 03:55:53 UTC (rev 454) @@ -199,7 +199,7 @@ elapsedTimeHours = int(elapsedTime/3600) elapsedTimeMins = int((elapsedTime - (elapsedTimeHours * 3600)) / 60) elapsedTimeSecs = elapsedTime - (elapsedTimeHours * 3600) - (elapsedTimeMins * 60) - strElapsedTime = "%0.0dh:%0.0dm:%0.2fs" % (elapsedTimeHours, elapsedTimeMins, elapsedTimeSecs) + strElapsedTime = "%0.0dh:%0.2dm:%0.2fs" % (elapsedTimeHours, elapsedTimeMins, elapsedTimeSecs) content += "var lap%dmarker = new google.maps.Marker({position: new google.maps.LatLng(%f, %f), icon: lapimage, map: map, title:\"Lap%d\"}); \n " % (lapNumber, float(lap[1]), float(lap[2]), lapNumber) content += "var lap%d = new google.maps.InfoWindow({content: \"<div class='info_content'>End of lap:%s<br>Elapsed time:%s<br>Distance:%0.2f km<br>Calories:%s</div>\" });\n" % (lapNumber, lapNumber, strElapsedTime, float(lap[4])/1000, lap[3]) content += "google.maps.event.addListener(lap%dmarker, 'click', function() { lap%d.open(map,lap%dmarker); });\n" % (lapNumber,lapNumber,lapNumber) Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-12-30 03:55:53 UTC (rev 454) @@ -44,7 +44,7 @@ return False #logging.debug('xvalues: '+str(xvalues)) #logging.debug('yvalues: '+str(yvalues)) - logging.debug("Type: "+type+" | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) + #logging.debug("Type: "+type+" | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) if type == "bars": self.drawBars(xvalues,yvalues,xlabel,ylabel,title,color) elif type == "plot": @@ -55,6 +55,7 @@ def drawBars(self,xvalues,yvalues,xlabel,ylabel,title,color): logging.debug('>>') + logging.debug("Type: bars | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) self.removeVboxChildren() figure = Figure(figsize=(6,4), dpi=72) numCols=len(xvalues[0]) @@ -129,7 +130,7 @@ def getColor(self, x): colors=["b","g","r","c","m","y","k", "w"] - if x > len(colors): + if x >= len(colors): x = x % len(colors) return colors[x] @@ -272,8 +273,9 @@ logging.debug('<<') - def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): + def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None,xzones=None): logging.debug('>>') + logging.debug("Type: plot | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) logging.debug('xlabel: '+str(xlabel)+' | ylabel: '+str(ylabel)+' | title: '+str(title)) self.removeVboxChildren() figure = Figure() @@ -286,15 +288,28 @@ axis.grid(True) for tl in axis.get_yticklabels(): - tl.set_color('%s' %color[i]) + tl.set_color('%s' %color[i]) + #Draw zones on graph, eg for each lap + if xzones is not None: + for xzone in xzones: + if xzones.index(xzone) % 2: + color='b' + else: + color='g' + axis.axvspan(xzone[0], xzone[1], alpha=0.25, facecolor=color) + maxX = max(xvalues[i]) if i>=1: ax2 = axis.twinx() ax2.plot(xvalues[i], yvalues[i], color=color[i]) for tl in ax2.get_yticklabels(): - tl.set_color('%s' %color[i]) + tl.set_color('%s' %color[i]) + maxXt = max(xvalues[i]) + if maxXt > maxX: + maxX = maxXt axis.set_xlabel(xlabel[i]) i+=1 - + axis.set_xlim(0, maxX) + if (len(xvalues)>1): axis.set_title("%s vs %s" %(ylabel[0],ylabel[1])) else: @@ -309,14 +324,11 @@ for child in self.vbox.get_children(): logging.debug('Child available: '+str(child)) - if title[0] == 'Stage Profile': - figure.savefig('/tmp/stage.png', dpi=75) - if title[0] == 'Heart Rate': - figure.savefig('/tmp/hr.png', dpi=75) logging.debug('<<') def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') + logging.debug("Type: pie | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) self.removeVboxChildren() figure = Figure(figsize=(6,4), dpi=72) axis = figure.add_subplot(111) Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-30 03:55:53 UTC (rev 454) @@ -59,7 +59,7 @@ self.window1.set_title ("pyTrainer %s" % self.version) self.record_list = [] #create the columns for the listdayrecord - column_names=[_("id"),_("Time"), _("Sport"),_("Kilometer")] + column_names=[_("id"),_("Start"), _("Sport"),_("Kilometer")] self.create_treeview(self.recordTreeView,column_names) #create the columns for the listarea column_names=[_("id"),_("Title"),_("Date"),_("Distance"),_("Sport"),_("Time"),_("Beats"),_("Average"),("Calories")] @@ -117,7 +117,7 @@ self.parent.runExtension(extension,id) def createGraphs(self,RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph): - self.drawarearecord = RecordGraph(self.record_vbox, self.window1, self.record_combovalue, self.record_combovalue2) + self.drawarearecord = RecordGraph(self.record_vbox, self.window1, self.record_combovalue, self.record_combovalue2, self.btnShowLaps) self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() @@ -245,7 +245,7 @@ self.recordview.set_sensitive(0) logging.debug(">>") - def actualize_recordgraph(self,record_list): + def actualize_recordgraph(self,record_list,laps=None): logging.debug(">>") if len(record_list)>0: self.record_vbox.set_sensitive(1) @@ -261,7 +261,7 @@ self.record_vbox.remove(child) self.record_vbox.set_sensitive(0) #logging.debug("Going to draw "+str(record_list)) - self.drawarearecord.drawgraph(record_list) + self.drawarearecord.drawgraph(record_list,laps) logging.debug("<<") def actualize_heartrategraph(self,record_list): @@ -846,6 +846,10 @@ def on_hidemap_clicked(self,widget): self.maparea.hide() self.infoarea.show() + + def on_btnShowLaps_toggled(self,widget): + logging.debug("--") + self.parent.refreshGraphView(self.selected_view) def on_day_combovalue_changed(self,widget): logging.debug("--") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/main.py 2009-12-30 03:55:53 UTC (rev 454) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#453" + self.version ="1.7.0_svn#454" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) @@ -287,9 +287,10 @@ id_record = selected.get_value(iter,0) gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx" %id_record if os.path.isfile(gpxfile): - gpx = Gpx(self.data_path,gpxfile) - gpx_tracklist = gpx.getTrackList() - self.windowmain.actualize_recordgraph(gpx_tracklist) + gpx = Gpx(self.data_path,gpxfile) + gpx_tracklist = gpx.getTrackList() + gpx_laps = gpx.getLaps() + self.windowmain.actualize_recordgraph(gpx_tracklist, gpx_laps) if view=="map": self.refreshMapView() Modified: pytrainer/trunk/pytrainer/recordgraph.py =================================================================== --- pytrainer/trunk/pytrainer/recordgraph.py 2009-12-28 08:58:02 UTC (rev 453) +++ pytrainer/trunk/pytrainer/recordgraph.py 2009-12-30 03:55:53 UTC (rev 454) @@ -20,14 +20,15 @@ from gui.drawArea import DrawArea class RecordGraph: - def __init__(self, vbox = None, window = None, combovalue = None, combovalue2 = None): + def __init__(self, vbox = None, window = None, combovalue = None, combovalue2 = None, btnShowLaps = None): logging.debug(">>") self.drawarea = DrawArea(vbox, window) self.combovalue = combovalue self.combovalue2 = combovalue2 + self.showLaps = btnShowLaps logging.debug("<<") - def drawgraph(self,values): + def drawgraph(self,values,laps=None): logging.debug(">>") xval = [] yval = [] @@ -39,6 +40,19 @@ logging.debug("Value selected 1: "+ str(value_selected)) value_selected2 = self.combovalue2.get_active() logging.debug("Value selected 2: "+ str(value_selected2)) + showLaps = self.showLaps.get_active() + logging.debug("Show laps: "+ str(showLaps)) + #Determine left and right lap boundaries + if laps is not None and showLaps: + lapValues = [] + lastPoint = 0.0 + for lap in laps: #(elapsedTime, lat, lon, calories, distance) + thisPoint = float(lap[4])/1000.0 + lastPoint + lapValues.append((lastPoint, thisPoint)) + lastPoint = thisPoint + else: + lapValues = None + if value_selected < 0: self.combovalue.set_active(0) value_selected = 0 @@ -46,7 +60,6 @@ if value_selected2 < 0: self.combovalue2.set_active(0) value_selected2 = 0 - xvalues, yvalues = self.get_values(values,value_selected) xlabel,ylabel,title,color = self.get_value_params(value_selected) @@ -71,7 +84,8 @@ tit.append("") col.append(color) logging.info("To show: tit: "+str(tit)+" | col: "+str(col)+" | xlab: "+str(xlab)+" | ylab: "+str(ylab)) - self.drawarea.stadistics("plot",xval,yval,xlab,ylab,tit,col) + #self.drawPlot(xvalues,yvalues,xlabel,ylabel,title,color,zones) + self.drawarea.drawPlot(xval,yval,xlab,ylab,tit,col,None,lapValues) logging.debug("<<") def get_value_params(self,value): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-28 08:58:12
|
Revision: 453 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=453&view=rev Author: jblance Date: 2009-12-28 08:58:02 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Fix for elapsed time for garmintools (not in seconds) v2 Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-28 08:55:20 UTC (rev 452) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-28 08:58:02 UTC (rev 453) @@ -140,10 +140,10 @@ lat = endPoint.get("lat") lon = endPoint.get("lon") elapsedTime = lap.findtext(elapsedTimeTag) - if elapsedTime.count(":") > 0: # got a 0:41:42.14 type elasped time + if elapsedTime.count(":") == 2: # got a 0:41:42.14 type elasped time hours, mins, secs = elapsedTime.split(":") elapsedTime = (int(hours) *3600) + (int(mins) * 60) + float(secs) - print elapsedTime + #print elapsedTime calories = lap.findtext(calorieTag) distance = lap.findtext(distanceTag) #print "Found time: %s, lat: %s lon: %s cal: %s dist: %s " % (elapsedTime, lat, lon, calories, distance) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-28 08:55:20 UTC (rev 452) +++ pytrainer/trunk/pytrainer/main.py 2009-12-28 08:58:02 UTC (rev 453) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#451" + self.version ="1.7.0_svn#453" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-28 08:55:29
|
Revision: 452 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=452&view=rev Author: jblance Date: 2009-12-28 08:55:20 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Fix for elapsed time for garmintools (not in seconds) Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/gpx.py Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-28 08:13:28 UTC (rev 451) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-28 08:55:20 UTC (rev 452) @@ -140,6 +140,10 @@ lat = endPoint.get("lat") lon = endPoint.get("lon") elapsedTime = lap.findtext(elapsedTimeTag) + if elapsedTime.count(":") > 0: # got a 0:41:42.14 type elasped time + hours, mins, secs = elapsedTime.split(":") + elapsedTime = (int(hours) *3600) + (int(mins) * 60) + float(secs) + print elapsedTime calories = lap.findtext(calorieTag) distance = lap.findtext(distanceTag) #print "Found time: %s, lat: %s lon: %s cal: %s dist: %s " % (elapsedTime, lat, lon, calories, distance) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-28 08:13:38
|
Revision: 451 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=451&view=rev Author: jblance Date: 2009-12-28 08:13:28 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Added lap info to recordview window... Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-28 05:56:06 UTC (rev 450) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-28 08:13:28 UTC (rev 451) @@ -31,11 +31,11 @@ from pytrainer.lib.date import Date from pytrainer.lib.system import checkConf from pytrainer.lib.xmlUtils import XMLParser - +from pytrainer.lib.gpx import Gpx from pytrainer.lib.unitsconversor import * class Main(SimpleGladeApp): - def __init__(self, data_path = None, parent = None, version = None): + def __init__(self, data_path = None, parent = None, version = None, gpxDir = None): def url_hook(dialog, url): pytrainer.lib.webUtils.open_url_in_browser(url) # Available in PyGTK 2.6 and above @@ -51,6 +51,7 @@ self.popup = PopupMenu(data_path,self) self.block = False self.activeSport = None + self.gpxDir = gpxDir def new(self): self.menublocking = 0 @@ -937,7 +938,7 @@ logging.debug("<<") return False - def actualize_recordTreeView(self, record_list): + '''def actualize_recordTreeView(self, record_list): logging.debug(">>") iterOne = False store = gtk.ListStore( @@ -966,6 +967,62 @@ if iterOne: self.recordTreeView.get_selection().select_iter(iterOne) logging.debug("<<") + #if len(record_list)>0:''' + + def actualize_recordTreeView(self, record_list): + logging.debug(">>") + iterOne = False + store = gtk.TreeStore( + gobject.TYPE_INT, #record_id + gobject.TYPE_STRING, #Time + gobject.TYPE_STRING, #Sport + gobject.TYPE_STRING, #Distance + object) + for i in record_list: + #Get lap info #TODO refactor to use a database table + gpxfile = "%s/%s.gpx" %(self.gpxDir, i[8]) + if os.path.isfile(gpxfile): + gpx = Gpx(self.data_path,gpxfile) + laps = gpx.getLaps() #(elapsedTime, lat, lon, calories, distance) + #print gpxfile, laps + iter = store.append(None) + if not iterOne: + iterOne = iter + dateTime = i[12] + if dateTime is not None: + localTime = dateutil.parser.parse(dateTime).strftime("%H:%M") + else: + localTime = "" + store.set ( + iter, + 0, int(i[8]), + 1, str(localTime), + 2, str(i[0]), + 3, str(i[2]) + ) + for lap in laps: + lapNumber = "%s%d" % ( _("lap"), (laps.index(lap)+1) ) + distance = "%0.2f" % (float(lap[4]) / 1000.0) + timeHours = int(float(lap[0]) / 3600) + timeMin = int((float(lap[0]) / 3600.0 - timeHours) * 60) + timeSec = float(lap[0]) - (timeHours * 3600) - (timeMin * 60) + if timeHours > 0: + duration = "%d%s%02d%s%02d%s" % (timeHours, _("h"), timeMin, _("m"), timeSec, _("s")) + else: + duration = "%2d%s%02d%s" % (timeMin, _("m"), timeSec, _("s")) + + child_iter = store.append(iter) + store.set ( + child_iter, + 0, int(i[8]), + 1, lapNumber, + 2, duration, + 3, distance + ) + self.recordTreeView.set_model(store) + if iterOne: + self.recordTreeView.get_selection().select_iter(iterOne) + logging.debug("<<") #if len(record_list)>0: def parseFloat(self,string): Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-28 05:56:06 UTC (rev 450) +++ pytrainer/trunk/pytrainer/main.py 2009-12-28 08:13:28 UTC (rev 451) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#450" + self.version ="1.7.0_svn#451" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) @@ -136,7 +136,7 @@ logging.info('No sanity check requested') #preparamos la ventana principal - self.windowmain = Main(data_path,self,self.version) + self.windowmain = Main(data_path,self,self.version, gpxDir=self.conf.getValue("gpxdir")) self.date = Date(self.windowmain.calendar) #Preparamos el webservice This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-28 05:56:16
|
Revision: 450 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=450&view=rev Author: jblance Date: 2009-12-28 05:56:06 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Fix module references so module path hack not needed Modified Paths: -------------- pytrainer/trunk/plugins/garmin-gpx/garmingpx.py pytrainer/trunk/plugins/garmin-hr/garminhr.py pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py pytrainer/trunk/plugins/garmintools/garmintools.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/plugins/garmin-gpx/garmingpx.py =================================================================== --- pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2009-12-28 05:56:06 UTC (rev 450) @@ -21,10 +21,11 @@ import logging import os import shutil -from gui.dialogs import fileChooserDialog, guiFlush import xml.etree.cElementTree -from lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush +from pytrainer.lib.xmlUtils import XMLParser + class garmingpx(): """ Plugin to import from a GPX file or files Expects only one activity in each file Modified: pytrainer/trunk/plugins/garmin-hr/garminhr.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr/garminhr.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-hr/garminhr.py 2009-12-28 05:56:06 UTC (rev 450) @@ -20,7 +20,7 @@ import os, sys import logging from lxml import etree -from lib.xmlUtils import XMLParser +from pytrainer.lib.xmlUtils import XMLParser import commands Modified: pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2009-12-28 05:56:06 UTC (rev 450) @@ -22,9 +22,9 @@ import os import logging from lxml import etree -from lib.xmlUtils import XMLParser -from gui.dialogs import fileChooserDialog, guiFlush +from pytrainer.lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush class garminhrfile(): Modified: pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py 2009-12-28 05:56:06 UTC (rev 450) @@ -20,10 +20,9 @@ import logging import os from lxml import etree -from lib.xmlUtils import XMLParser +from pytrainer.lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush -from gui.dialogs import fileChooserDialog, guiFlush - class garminTCXv2(): def __init__(self, parent = None, validate=False): self.parent = parent Modified: pytrainer/trunk/plugins/garmintools/garmintools.py =================================================================== --- pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-28 05:56:06 UTC (rev 450) @@ -21,9 +21,9 @@ import os import StringIO from lxml import etree -from lib.xmlUtils import XMLParser -from gui.dialogs import fileChooserDialog, guiFlush +from pytrainer.lib.xmlUtils import XMLParser +from pytrainer.gui.dialogs import fileChooserDialog, guiFlush class garmintools(): def __init__(self, parent = None, validate=False): Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-28 05:46:33 UTC (rev 449) +++ pytrainer/trunk/pytrainer/main.py 2009-12-28 05:56:06 UTC (rev 450) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#449" + self.version ="1.7.0_svn#450" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) @@ -107,8 +107,6 @@ self.check = check self.gm3 = gm3 self.windowmain = None - main_dir = os.path.realpath(os.path.dirname(__file__)) #Add pytrainer directory to module search path - sys.path.insert(0, main_dir) # so modules in subdirs are found e.g. lib.xmlutil logging.debug('checking configuration...') self.conf = checkConf() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-28 05:46:45
|
Revision: 449 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=449&view=rev Author: jblance Date: 2009-12-28 05:46:33 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Re-introduce module path statement to allow subdir modules to be found Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-27 22:12:14 UTC (rev 448) +++ pytrainer/trunk/pytrainer/main.py 2009-12-28 05:46:33 UTC (rev 449) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#448" + self.version ="1.7.0_svn#449" self.date = Date() # Checking profile self.profile = Profile(self.data_path,self) @@ -107,6 +107,8 @@ self.check = check self.gm3 = gm3 self.windowmain = None + main_dir = os.path.realpath(os.path.dirname(__file__)) #Add pytrainer directory to module search path + sys.path.insert(0, main_dir) # so modules in subdirs are found e.g. lib.xmlutil logging.debug('checking configuration...') self.conf = checkConf() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-27 22:12:30
|
Revision: 448 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=448&view=rev Author: jblance Date: 2009-12-27 22:12:14 +0000 (Sun, 27 Dec 2009) Log Message: ----------- Add time (time-of-day) to recordtreeview, change Time to Duration Modified Paths: -------------- pytrainer/trunk/glade/newrecord.glade pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/glade/newrecord.glade =================================================================== --- pytrainer/trunk/glade/newrecord.glade 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/glade/newrecord.glade 2009-12-27 22:12:14 UTC (rev 448) @@ -376,7 +376,7 @@ <child> <widget class="GtkLabel" id="label9"> <property name="visible">True</property> - <property name="label" translatable="yes">Time:</property> + <property name="label" translatable="yes">Duration:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/glade/pytrainer.glade 2009-12-27 22:12:14 UTC (rev 448) @@ -580,7 +580,7 @@ <child> <widget class="GtkLabel" id="label11124"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -3190,7 +3190,7 @@ <child> <widget class="GtkLabel" id="label38"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -4318,7 +4318,7 @@ <child> <widget class="GtkLabel" id="label100"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -5460,7 +5460,7 @@ <child> <widget class="GtkLabel" id="label100"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -6755,7 +6755,7 @@ <child> <widget class="GtkLabel" id="label118"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time:</b></property> + <property name="label" translatable="yes"><b>Duration:</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-27 22:12:14 UTC (rev 448) @@ -58,7 +58,7 @@ self.window1.set_title ("pyTrainer %s" % self.version) self.record_list = [] #create the columns for the listdayrecord - column_names=[_("id"),_("Sport"),_("Kilometer")] + column_names=[_("id"),_("Time"), _("Sport"),_("Kilometer")] self.create_treeview(self.recordTreeView,column_names) #create the columns for the listarea column_names=[_("id"),_("Title"),_("Date"),_("Distance"),_("Sport"),_("Time"),_("Beats"),_("Average"),("Calories")] @@ -914,7 +914,7 @@ #hasta aqui revisado def on_allRecordTreeView_button_press(self, treeview, event): logging.debug(">>") - print "on_allRecordTreeView_" + #print "on_allRecordTreeView_" x = int(event.x) y = int(event.y) time = event.time @@ -944,16 +944,23 @@ gobject.TYPE_INT, gobject.TYPE_STRING, gobject.TYPE_STRING, + gobject.TYPE_STRING, object) for i in record_list: iter = store.append() if not iterOne: iterOne = iter + dateTime = i[12] + if dateTime is not None: + localTime = dateutil.parser.parse(dateTime).strftime("%H:%M") + else: + localTime = "" store.set ( iter, 0, int(i[8]), - 1, str(i[0]), - 2, str(i[2]) + 1, str(localTime), + 2, str(i[0]), + 3, str(i[2]) ) self.recordTreeView.set_model(store) if iterOne: Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-27 22:12:14 UTC (rev 448) @@ -95,7 +95,7 @@ if timeResult is not None: time_ = timeResult.text # check timezone mk_time = self.getDateTime(time_)[0] - time_ = time.strftime("%Y-%m-%d", mk_time) + time_ = mk_time.strftime("%Y-%m-%d") else: time_ = _("No Data") logging.debug("name: "+name+" | time: "+time_) @@ -211,14 +211,18 @@ #chequeamos que la altura sea correcta / check that the height is correct if ele is not None: if len(ele)<15: - tmp_alt = int(float(ele)) + tmp_alt = int(float(ele)) #Why convert to int? ele are like "156.3515625" + else: + print "ele len >= 15" + ele else: tmp_alt= 0 + print "tmp_alt:" + tmp_alt #evitamos los puntos blancos / we avoid the white points if (float(lat) < -0.000001) or (float(lat) > 0.0000001): - tmp_lat = float(lat)*0.01745329252 - tmp_lon = float(lon)*0.01745329252 + #Convert lat and lon from degrees to radians + tmp_lat = float(lat)*0.01745329252 #0.01745329252 = number of radians in a degree + tmp_lon = float(lon)*0.01745329252 #57.29577951 = 1/0.01745329252 or degrees per radian tmp_time = int(time_) #Para las vueltas diferentes a la primera / For the returns different from first @@ -228,8 +232,9 @@ #Caqlculate diference betwen last and new point #tempnum=(math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)) #try: - #Pasamos la distancia de radianes a metros.. creo - #David no me mates que esto lo escribi hace anhos + #Pasamos la distancia de radianes a metros.. creo / We convert the distance from radians to meters + #David no me mates que esto lo escribi hace anhos / Do not kill me this was written ages ago + #http://faculty.washington.edu/blewis/ocn499/EXER04.htm equation for the distance between 2 points on a spherical earth try: #dist=math.acos(tempnum)*111.302*57.29577951 dist=math.acos((math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)))*111.302*57.29577951 Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-27 06:29:53 UTC (rev 447) +++ pytrainer/trunk/pytrainer/main.py 2009-12-27 22:12:14 UTC (rev 448) @@ -97,13 +97,10 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#447" + self.version ="1.7.0_svn#448" self.date = Date() - main_dir = os.path.realpath(os.path.dirname(__file__)) #why? - sys.path.insert(0, main_dir) #why? # Checking profile self.profile = Profile(self.data_path,self) - #self.profile.setVersion("0.0") self.profile.isProfileConfigured() self.log_level = log_level self.validate = validate This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-27 06:30:02
|
Revision: 447 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=447&view=rev Author: jblance Date: 2009-12-27 06:29:53 +0000 (Sun, 27 Dec 2009) Log Message: ----------- Update lap display in googlemaps v3 Modified Paths: -------------- pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-26 18:48:33 UTC (rev 446) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-12-27 06:29:53 UTC (rev 447) @@ -87,8 +87,8 @@ timeHours = int(info[0][3]) / 3600 timeMin = (float(info[0][3]) / 3600.0 - timeHours) * 60 time = "%d%s %02d%s" % (timeHours, _("h"), timeMin, _("min")) - startinfo = "<div id='info_content'>%s: %s</div>" % (info[0][0], info[0][9]) - finishinfo = "<div id='info_content'>%s: %s<br>%s: %s%s</div>" % (_("Time"), time, _("Distance"), info[0][2], _("km")) + startinfo = "<div class='info_content'>%s: %s</div>" % (info[0][0], info[0][9]) + finishinfo = "<div class='info_content'>%s: %s<br>%s: %s%s</div>" % (_("Time"), time, _("Distance"), info[0][2], _("km")) startinfo = startinfo.encode('ascii', 'xmlcharrefreplace') #Encode for html finishinfo = finishinfo.encode('ascii', 'xmlcharrefreplace') #Encode for html self.createHtml_api3(polyline, minlat, minlon, maxlat, maxlon, startinfo, finishinfo, laps) @@ -115,6 +115,9 @@ content = ''' <html> <head> + <style type="text/css"> + div.info_content { font-family: sans-serif; font-size: 10px; } + </style> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> @@ -192,8 +195,13 @@ for lap in laps: lapNumber = laps.index(lap)+1 + elapsedTime = float(lap[0]) + elapsedTimeHours = int(elapsedTime/3600) + elapsedTimeMins = int((elapsedTime - (elapsedTimeHours * 3600)) / 60) + elapsedTimeSecs = elapsedTime - (elapsedTimeHours * 3600) - (elapsedTimeMins * 60) + strElapsedTime = "%0.0dh:%0.0dm:%0.2fs" % (elapsedTimeHours, elapsedTimeMins, elapsedTimeSecs) content += "var lap%dmarker = new google.maps.Marker({position: new google.maps.LatLng(%f, %f), icon: lapimage, map: map, title:\"Lap%d\"}); \n " % (lapNumber, float(lap[1]), float(lap[2]), lapNumber) - content += "var lap%d = new google.maps.InfoWindow({content: \"End of lap:%s<br>Elapsed time:%s<br>Distance:%s<br>Calories:%s\" });\n" % (lapNumber, lapNumber, lap[0], lap[4], lap[3]) + content += "var lap%d = new google.maps.InfoWindow({content: \"<div class='info_content'>End of lap:%s<br>Elapsed time:%s<br>Distance:%0.2f km<br>Calories:%s</div>\" });\n" % (lapNumber, lapNumber, strElapsedTime, float(lap[4])/1000, lap[3]) content += "google.maps.event.addListener(lap%dmarker, 'click', function() { lap%d.open(map,lap%dmarker); });\n" % (lapNumber,lapNumber,lapNumber) content += ''' Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-26 18:48:33 UTC (rev 446) +++ pytrainer/trunk/pytrainer/main.py 2009-12-27 06:29:53 UTC (rev 447) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#443" + self.version ="1.7.0_svn#447" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-12-26 18:48:41
|
Revision: 446 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=446&view=rev Author: dgranda Date: 2009-12-26 18:48:33 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Reviewing installation process to a more pythonic way. Check INSTALL file for more info Modified Paths: -------------- pytrainer/trunk/INSTALL pytrainer/trunk/bin/pytrainer pytrainer/trunk/setup.py Modified: pytrainer/trunk/INSTALL =================================================================== --- pytrainer/trunk/INSTALL 2009-12-26 18:46:42 UTC (rev 445) +++ pytrainer/trunk/INSTALL 2009-12-26 18:48:33 UTC (rev 446) @@ -10,11 +10,12 @@ 1.1.- Working packages (Fedora 12 package revisions as of 2009.12.06 for 1.7.0) python-2.6.2-2 +python-devel-2.6.2-2 (to run the installation from tarball) python-matplotlib-0.98.5.2-5 gnome-python2-gtkmozembed-2.25.3-13 -pygtk2-libglade-2.16.0-1.fc12.i686 -pygtk2-2.16.0-1.fc12.i686 -SOAPpy-0.11.6-10.fc12.noarch +pygtk2-libglade-2.16.0-1 +pygtk2-2.16.0-1 +SOAPpy-0.11.6-10 python-lxml-2.2.3-1 libxml2-python-2.7.6-1 libxml2-2.7.6-1 @@ -27,14 +28,15 @@ 2.- Installation process -Copy the tarball file to a location where you have write and execution rights. Make sure executables are under your $PATH. +Copy the tarball file to a location where you have write and execution rights (e.g. /tmp or ~/). Make sure executables are under your $PATH. -$ tar -xf pytrainer-X.Y.Z.tar.gz +$ tar -xzf pytrainer-X.Y.Z.tar.gz $ cd pytrainer-X.Y.Z -$ ./pytrainer.sh -i -*** Log level set to INFO *** -... +$ sudo python setup.py install +$ pytrainer -i +For more information about the process, please check http://docs.python.org/distutils/setupscript.html + 3.- USB access Currently PyTrainer is using gpsbabel (http://www.gpsbabel.org) to retrieve information from the Garmin device. There are some problems regarding driver to access usb ports, please take a look at http://www.gpsbabel.org/os/Linux_Hotplug.html Modified: pytrainer/trunk/bin/pytrainer =================================================================== --- pytrainer/trunk/bin/pytrainer 2009-12-26 18:46:42 UTC (rev 445) +++ pytrainer/trunk/bin/pytrainer 2009-12-26 18:48:33 UTC (rev 446) @@ -24,9 +24,10 @@ pygtk.require('2.0') import gtk import gtk.glade +import os +import commands data_path = "/usr/share/pytrainer/" - DIR = "/usr/share/locale" gettext.bindtextdomain("pytrainer", DIR) @@ -37,9 +38,13 @@ from pytrainer.main import pyTrainer -def main(): +os.environ['MOZILLA_FIVE_HOME']="/usr/lib/firefox" +os.environ['LD_LIBRARY_PATH']="/usr/lib/firefox" +#os.environ['MOZILLA_FIVE_HOME']="/usr/lib64/xulrunner-1.9.1" +os.environ['MOZILLA_FIVE_HOME']=commands.getstatusoutput("find /usr/li* -name xulrunner -exec dirname {} \; 2>/dev/null")[1] + +def main(argv): pytrainer = pyTrainer(None, data_path) - + if __name__ == "__main__": - main() - + main(sys.argv[1:]) Modified: pytrainer/trunk/setup.py =================================================================== --- pytrainer/trunk/setup.py 2009-12-26 18:46:42 UTC (rev 445) +++ pytrainer/trunk/setup.py 2009-12-26 18:48:33 UTC (rev 446) @@ -15,9 +15,9 @@ return "share/pytrainer/extensions/%s"%extension_name, glob("extensions/%s/*"%extension_name) setup( name="pytrainer", - version="1.6.0.9", + version="1.7.0", author="Fiz Vazquez", - author_email="vu...@si...", + maintainer_email="pyt...@li...", url="https://sourceforge.net/projects/pytrainer/", license="GNU General Public License(GPL)", packages=[ 'pytrainer', @@ -50,4 +50,4 @@ ('share/applications/',['pytrainer.desktop']) ], scripts=['bin/pytrainer'] -) +) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-12-26 18:46:49
|
Revision: 445 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=445&view=rev Author: dgranda Date: 2009-12-26 18:46:42 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Removing wrong start scripts to avoid confusion Removed Paths: ------------- pytrainer/trunk/pytrainer.py pytrainer/trunk/pytrainer.sh Deleted: pytrainer/trunk/pytrainer.py =================================================================== --- pytrainer/trunk/pytrainer.py 2009-12-26 15:06:35 UTC (rev 444) +++ pytrainer/trunk/pytrainer.py 2009-12-26 18:46:42 UTC (rev 445) @@ -1,54 +0,0 @@ -#!/usr/bin/python -# -*- coding: iso-8859-1 -*- - -#Copyright (C) Fiz Vazquez vu...@si... - -#This program is free software; you can redistribute it and/or -#modify it under the terms of the GNU General Public License -#as published by the Free Software Foundation; either version 2 -#of the License, or (at your option) any later version. - -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. - -#You should have received a copy of the GNU General Public License -#along with this program; if not, write to the Free Software -#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import locale -import gettext -import sys -import pygtk -pygtk.require('2.0') -import gtk -import gtk.glade -import os - -data_path = "./" - -DIR = "./locale" - -gettext.bindtextdomain("pytrainer", DIR) -gtk.glade.bindtextdomain("pytrainer", DIR) -gtk.glade.textdomain("pytrainer") -gettext.textdomain("pytrainer") -gettext.install("pytrainer",DIR,unicode=1) - -from pytrainer.main import pyTrainer - - -os.popen("MOZILLA_FIVE_HOME=/usr/lib/firefox") - -# 21.03.2008 - dgranda -# check command line arguments -# for more complex handling, see http://docs.python.org/lib/module-getopt.html -# only -d (for debug log level) is supported right now -def main(argv): - #Lanzamos el pytrainer - pytrainer = pyTrainer(None, data_path) - #pytrainer.run() - -if __name__ == "__main__": - main(sys.argv[1:]) Deleted: pytrainer/trunk/pytrainer.sh =================================================================== --- pytrainer/trunk/pytrainer.sh 2009-12-26 15:06:35 UTC (rev 444) +++ pytrainer/trunk/pytrainer.sh 2009-12-26 18:46:42 UTC (rev 445) @@ -1,9 +0,0 @@ -#/bin/sh -# First arg is log level, e.g. -d for DEBUG - -export LD_LIBRARY_PATH=/usr/lib/firefox -# Building xulrunner path to avoid problems when upgrading -PATH_XULRUNNER=/usr/lib -XULRUNNER_VERSION=`ls "$PATH_XULRUNNER" | grep xulrunner` -export MOZILLA_FIVE_HOME=$PATH_XULRUNNER/$XULRUNNER_VERSION -python pytrainer.py $* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-12-26 15:06:44
|
Revision: 444 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=444&view=rev Author: dgranda Date: 2009-12-26 15:06:35 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Changed link to python list for explanation on how to compare lists Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/sqliteUtils.py pytrainer/trunk/pytrainer/profile.py pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/pytrainer/lib/sqliteUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2009-12-26 10:14:10 UTC (rev 443) +++ pytrainer/trunk/pytrainer/lib/sqliteUtils.py 2009-12-26 15:06:35 UTC (rev 444) @@ -223,7 +223,7 @@ columnsDB.update(newField) logging.debug('Useful data retrieved from '+str(tableName)+' in DB: '+str(columnsDB)) - # http://mail.python.org/pipermail/python-list/2002-May/142854.html - not correct URL.... + # http://mail.python.org/pipermail/python-list/2002-May/141458.html #tempDict = dict(zip(columns,columns)) tempDict = dict(columns) #Test for columns that are in DB that shouldn't be Modified: pytrainer/trunk/pytrainer/profile.py =================================================================== --- pytrainer/trunk/pytrainer/profile.py 2009-12-26 10:14:10 UTC (rev 443) +++ pytrainer/trunk/pytrainer/profile.py 2009-12-26 15:06:35 UTC (rev 444) @@ -114,7 +114,7 @@ logging.debug("Default values: "+ str(defaultList)) #logging.debug("Default keys: "+ str(defaultListKeys)) # Comparing fields - # http://mail.python.org/pipermail/python-list/2002-May/142854.html + # http://mail.python.org/pipermail/python-list/2002-May/141458.html tempDict = dict(zip(currentListKeys,currentListKeys)) resultList = [x for x in defaultListKeys if x not in tempDict] logging.info('Fields to be added: '+str(resultList)) Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2009-12-26 10:14:10 UTC (rev 443) +++ pytrainer/trunk/pytrainer/record.py 2009-12-26 15:06:35 UTC (rev 444) @@ -526,7 +526,7 @@ def compareLists(self,list1,list2): # Optimizing comparison - 26042008 - # http://mail.python.org/pipermail/python-list/2002-May/142854.html + # http://mail.python.org/pipermail/python-list/2002-May/141458.html tempDict = dict(zip(list1,list1)) return [x for x in list2 if x not in tempDict] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |