Comment 2 for bug 379280

Revision history for this message
Stani (stani) wrote :

This has been fixed upstream in bzr.

$ bzr diff
=== modified file 'phatch/app.py'
--- phatch/app.py 2009-05-14 22:36:43 +0000
+++ phatch/app.py 2009-05-25 14:22:50 +0000
@@ -23,7 +23,7 @@
 VERSION = "%(name)s %(version)s"%INFO

 def fix_path(path):
- if path[:7] == 'file://': return urllib.unquote(path[7:])
+ if path.startswith('file://'): return urllib.unquote(path[7:])
     return path

 def parse_locale(config_paths):
@@ -147,12 +147,12 @@
     from pyWx import gui
     gui.drop(actionlist=paths[0],paths=paths[1:],settings=settings)

-def ext(path):
- return os.path.splitext(path)[1].lower()
+def has_ext(path,ext):
+ return path.lower().endswith(ext)

 def _console(paths,settings):
     from console import console
- if paths and ext(paths[0]) == INFO['extension']:
+ if paths and has_ext(paths[0], INFO['extension']):
         console.main(actionlist=paths[0],paths=paths[1:],settings=settings)
     else:
         console.main(actionlist='',paths=paths,settings=settings)
@@ -169,7 +169,7 @@
     if settings['init_fonts']:
         _init_fonts()
         return
- if len(paths) == 1 and ext(paths[0])!= INFO['extension']:
+ if paths and not has_ext(paths[0], INFO['extension']):
         settings['droplet'] = True
         paths.insert(0,'recent')
     if settings['droplet']:

$ bzr commit -m "make Phatch work with several selected images"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/app.py
Committed revision 586.

@Fabian:
If you want this to work immediately, just copy app.py from here:
http://bazaar.launchpad.net/~stani/phatch/dev/annotate/head%3A/phatch/app.py

and overwrite your old app.py:
$ sudo cp app.py /usr/share/python-support/phatch/phatch/app.py