/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/frontend/gtk/handler.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-19 23:56:40 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060819235640-abdb3ecf8553b547
Fixed a bug when double-clicking a file.

2006-08-19  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/frontend/handler.py: fixed a long existing bug: double-clicking a
      file should open it with an application (supported under Windows)

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
        if newdir == '..':
234
234
            self.comm.set_path(os.path.split(self.comm.get_path())[0])
235
235
        else:
236
 
            self.comm.set_path(self.comm.get_path() + '/' + newdir)
 
236
            fullpath = self.comm.get_path() + '/' + newdir
 
237
            if os.path.isdir(fullpath):
 
238
                # selected item is an existant directory
 
239
                self.comm.set_path(fullpath)
 
240
            else:
 
241
                if sys.platform == 'win32':
 
242
                    # open the file with the default application
 
243
                    os.startfile(fullpath)
 
244
                else:
 
245
                    # TODO: support other OSes
 
246
                    print "DEBUG: double-click on non-Win32 platforms not supported."
237
247
        
238
248
        self.comm.refresh_right()
239
249