Changeset 164

Show
Ignore:
Timestamp:
01/19/08 23:54:31 (1 year ago)
Author:
vud1
Message:

"1.5.0.0.1 tag"

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pytrainer/tags/1.5.0.0.1/mozpytrainer.sh

    r144 r164  
    11#/bin/sh 
    22 
    3 LD_LIBRARY_PATH=/usr/lib/firefox MOZILLA_FIVE_HOME=/usr/lib/firefox python pytrainer/pytrainer.py 
     3LD_LIBRARY_PATH=/usr/lib/firefox MOZILLA_FIVE_HOME=/usr/lib/firefox python pytrainer.py 
  • pytrainer/tags/1.5.0.0.1/pytrainer/extensions/googlemaps.py

    r123 r164  
    4141                if not os.path.isdir(extensiondir): 
    4242                        os.mkdir(extensiondir) 
    43  
     43                points = [] 
     44                levels = [] 
     45                pointlist = [] 
     46                htmlfile = self.conf.getValue("tmpdir")+"/index.html" 
     47                 
    4448                gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx" %id_record 
    45                 gpx = Gpx(self.data_path,gpxfile) 
    46                 list_values = gpx.getTrackList(
    47                 pointlist = [] 
    48                 for i in list_values: 
    49                         pointlist.append((i[4],i[5])) 
    50                 points,levels = Points.encodePoints(pointlist) 
    51                 points = points.replace("\\","\\\\") 
     49                if os.path.isfile(gpxfile): 
     50                       gpx = Gpx(self.data_path,gpxfile
     51                       list_values = gpx.getTrackList() 
     52                       for i in list_values: 
     53                               pointlist.append((i[4],i[5])) 
     54                       points,levels = Points.encodePoints(pointlist) 
     55                       points = points.replace("\\","\\\\") 
    5256         
    53                 htmlfile = self.conf.getValue("tmpdir")+"/index.html" 
    54                 self.createHtml(points,levels,pointlist[0]) 
    55                 htmlfile = os.path.abspath(htmlfile) 
    56                 if htmlfile != self.htmlfile: 
     57                        self.createHtml(points,levels,pointlist[0]) 
     58                        htmlfile = os.path.abspath(htmlfile) 
     59                        if htmlfile != self.htmlfile: 
     60                                self.moz.load_url("file://"+htmlfile) 
     61                else: 
     62                        self.createErrorHtml() 
    5763                        self.moz.load_url("file://"+htmlfile) 
    5864                #       self.htmlfile = htmlfile 
     
    159165                file.run() 
    160166                 
    161  
     167        def createErrorHtml(self): 
     168                content = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \n" 
     169                content += "            \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" 
     170                content += "    <html xmlns=\"http://www.w3.org/1999/xhtml\"  xmlns:v=\"urn:schemas-microsoft-com:vml\">\n" 
     171                content += """  <head>\n 
     172<body> 
     173No Gpx Data 
     174</body> 
     175</html> 
     176                """ 
     177                tmpdir = self.conf.getValue("tmpdir") 
     178                filename = tmpdir+"/index.html" 
     179                file = fileUtils(filename,content) 
     180                file.run() 
  • pytrainer/tags/1.5.0.0.1/pytrainer/gui/aboutdialog.py

    r4 r164  
    3030                 about_widget = aboutwindow.get_widget("aboutdialog1") 
    3131                 about_widget.set_version(self.version) 
     32                 about_widget.set_name("pyTrainer") 
    3233                 
  • pytrainer/tags/1.5.0.0.1/pytrainer/lib/gpx.py

    r140 r164  
    2828class Gpx: 
    2929        def __init__(self, data_path = None, filename = None, trkname = None): 
     30                print filename 
    3031                self.data_path = data_path 
    3132                self.filename = filename 
     
    7071                 
    7172        def _getValues(self): 
     73                if not os.path.isfile(self.filename): 
     74                        return None 
    7275                dom = xml.dom.minidom.parse(self.filename) 
    7376                content = dom.toxml() 
  • pytrainer/tags/1.5.0.0.1/pytrainer/main.py

    r143 r164  
    166166                if view=="graphs": 
    167167                        selected,iter = self.windowmain.recordTreeView.get_selection().get_selected() 
     168                        gpx_tracklist = [] 
    168169                        if iter: 
    169170                                id_record = selected.get_value(iter,0) 
     
    172173                                        gpx = Gpx(self.data_path,gpxfile) 
    173174                                        gpx_tracklist = gpx.getTrackList() 
    174                         else: 
    175                                 gpx_tracklist = [] 
    176175                        self.windowmain.actualize_recordgraph(gpx_tracklist) 
    177176                if view=="map":