Typo.
The reference should be
http://code.google.com/p/gscreendump/source/browse/trunk/src/sd_interface.c



Osmo Maatta wrote:
Hello,

In my Gscreendump app I've used the following code.
http://code.google.com/p/gscreendump/source/browse/trunk/src/sd_interface.
Search for "g_app_info_get_all_for_type" function.

That converted to Python becomes:

import gio

# Mime type
mime_type = "image/png"

# Get list of supported apps
l = gio.app_info_get_all_for_type(mime_type)
print "l=", l

# For each app (GAppInfo *app) in the list
# See: http://library.gnome.org/devel/pygobject/stable/class-gioappinfo.html
for app in l:
   app_id = app.get_id()

   # Returns gio.Icon object. Read the manual page.
app_icon = app.get_icon() app_name = app.get_name()

   print "app_name=%s  id=%s  icon=%s" % (app_name, app_id, app_icon)


# To start an application, do
app.launch_uris("/home/moma/Screenshots/screenshot046.png", None)
Check the manual page before using this.
-------------

// Moma Antero





_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to