default application selection

svn: r6214
This commit is contained in:
Don Allingham 2006-03-28 20:11:48 +00:00
parent 3b927c9db0
commit 9dd96871ff
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2006-03-28 Don Allingham <don@gramps-project.org>
* src/Mime/_GnomeMime.py: find the default application instead of
using the first returned by mime_get_app_short_list
2006-03-27 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/DataViews/_PedigreeView.py (_PersonWidget_base): Use other name for
the drag_begin callback to not conflict with a gtk.Widget internal method.

View File

@ -25,10 +25,10 @@ import const
try:
from gnomevfs import mime_get_short_list_applications, \
mime_get_description, get_mime_type
mime_get_description, get_mime_type, mime_get_default_application
except:
from gnome.vfs import mime_get_short_list_applications, \
mime_get_description, get_mime_type
mime_get_description, get_mime_type, mime_get_default_application
from TransUtils import sgettext as _
@ -38,7 +38,7 @@ def get_application(type):
try:
applist = mime_get_short_list_applications(type)
if applist:
prog = applist[0]
prog = mime_get_default_application(type)
return (prog[2],prog[1])
else:
return None