Index: nautilus-2.29.92.1/libnautilus-private/nautilus-mime-actions.c =================================================================== --- nautilus-2.29.92.1.orig/libnautilus-private/nautilus-mime-actions.c 2010-03-10 14:59:13.000000000 +0100 +++ nautilus-2.29.92.1/libnautilus-private/nautilus-mime-actions.c 2010-03-10 21:55:06.000000000 +0100 @@ -1470,6 +1470,27 @@ g_object_unref (proxy); } +void launch_gnome_app_install_mimetype(GdkScreen *screen, + NautilusFile *file, + char *uri) { + char *qmimetype, *quri, *qduri, *command; + if (!screen) + screen = gdk_display_get_default_screen(gdk_display_get_default ()); + + qmimetype = g_shell_quote (nautilus_file_info_get_mime_type (file)); + quri = g_shell_quote (uri); + command = g_strconcat("gnome-app-install --mime-type=", + qmimetype, " ", quri, + (char*)0 /* NB NULL is wrong */); + g_free (qmimetype); + g_free (quri); + g_free (qduri); + + //eel_gnome_shell_execute_on_screen (command, screen); + gdk_spawn_command_line_on_screen (screen, command, NULL); + g_free (command); +} + static void application_unhandled_uri (ActivateParameters *parameters, char *uri) { @@ -1518,6 +1539,12 @@ goto out; } + // try g-a-i now + if (g_find_program_in_path("gnome-app-install")) { + launch_gnome_app_install_mimetype(NULL, file, uri); + goto out; + } + /* Check whether PackageKit can be spawned */ connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); if (connection == NULL) {