x-content patches



Hey,

Here's a patch [1]

http://people.freedesktop.org/~david/nautilus-use-gio-content-sniffing.patch

  $ diffstat ~/Patches/nautilus-use-gio-content-sniffing.patch
   ChangeLog                                                |   27 
   configure.in                                             |    2 
   data/nautilus.xml.in                                     |   99 --
   libnautilus-private/apps_nautilus_preferences.schemas.in |   27 
   libnautilus-private/nautilus-autorun.c                   |  610 +++++----------
   libnautilus-private/nautilus-autorun.h                   |   16 
   libnautilus-private/nautilus-global-preferences.c        |    2 
   libnautilus-private/nautilus-global-preferences.h        |    2 
   src/nautilus-file-management-properties.c                |    3 
   9 files changed, 258 insertions(+), 530 deletions(-)

that

 - uses the new x-content/* definitions from shared-mime-info instead
   of defining them here

 - uses g_mount_guess_content_type() now that is in gio 2.17.5

 - provides a "Open with other Application..." option:
   http://people.freedesktop.org/~david/nautilus-x-content-other-app.png
   http://bugzilla.gnome.org/show_bug.cgi?id=532474

   that many users have missed. There's a big TODO about how to remove
   the association; that can't be implemented right now due to #545350.
   Probably something for 2.26

 - Changes the defaults to be "Ask what to do" since I think that's
   a lot more polite; it's what we've been doing in Fedora anyway
   by patching media_autorun_x_content_ask to include all the known
   x-content/* types.

   (the exception here is software autorun where there is another dialog
    already that is included in the nautilus distribution.). 

   Users can simply just click "Always perform this action", e.g.

    http://people.freedesktop.org/~david/nautilus-utopia-4.png

   and distros can patch the key

    /apps/nautilus/preferences/media_autorun_x_content_start_app

   as they see fit if they want to avoid the confirmation dialog
   and just start the software.

   Also now that 3rd party apps can define x-content/* types themselves
   (see below) this is the polite thing to do if we don't want to
   surprise users.

Finally, the integration with gio and shared-mime-info allows 3rd party
applications to define their own x-content/* types and things should
Just Work(tm). Here's a small example

 http://people.freedesktop.org/~david/acme-app-x-content-type.tar.gz

FWIW, I intend to submit that example for the gio docs. I know that both
PackageKit (for CD's with software updates) and libvirt (for e.g.
virtual machines on USB sticks) are interested in this.

Also, since x-content/* is now in a freedesktop.org spec there are good
chances that KDE, XFCE and others might support x-content/* as well.

OK to commit? Thanks!

     David

[1] : btw, can someone bump the attachment size limit on this mailing
list from 40kb to something more reasonable... like 400kb?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]