Re: [rfc][patch] Add optional PackageKit hook to install new applications



On Wed, 2008-12-10 at 12:54 +0100, Alexander Larsson wrote:
> On Tue, 2008-12-09 at 12:36 +0000, Richard Hughes wrote:
> > On Tue, 2008-12-09 at 12:00 +0100, Alexander Larsson wrote:
> > > Not really. Just let it fall through and the activation will be
> > > destroyed. No need to keep it around paused.
> > 
> > Fair enough.
> > 
> > > I think you can just save (ref) the NautilusFile objects and some extra
> > > info, then after the install start over with
> > > nautilus_mime_activate_files(). 
> > 
> > Something like the attached (v.5)?
> 
> Did you actually test this?

Yes, I sent v6 after I realised I was running the jhbuild copy, not the
local build copy. Apologies in this case.

> There was all sort of issued I had to fix to make it do anything at all,
> and then I don't have a recent enought PackageKit to make it work so i
> had to hack up checking for that (we don't actually get an error from
> dbus-glib, it just frees our data without calling the notifier). 

Right, thanks.

> However, I commited something I believe works. Can you try it and see if
> it actually installs something?

You also need to install the build fix attached. It also gives me the
"There was an internal error trying to search for applications" error
when it successfully searches, I'll try to track that one down now.

> I also cleaned up the messages a bit so that they show what type it is,
> and doesn't try to look for apps for files of unknown types.

Right. Good plan.

> During testing I noticed that this feature isn't as useful as it could
> be, because many mime types inherit from text/plain which generally has
> a handler, so they will open in gedit, not getting this dialog. Maybe we
> should additionally have a "search for applications" in the open with
> menu like someone proposed.

Do you want me to have a go at this?

Richard.

Index: libnautilus-private/nautilus-mime-actions.c
===================================================================
--- libnautilus-private/nautilus-mime-actions.c	(revision 14807)
+++ libnautilus-private/nautilus-mime-actions.c	(working copy)
@@ -1132,7 +1132,8 @@
 	/* invoke the method */
 	call = dbus_g_proxy_begin_call (proxy, "InstallMimeType",
 					(DBusGProxyCallNotify) search_for_application_dbus_call_notify_cb,
-					parameters_install, activate_parameters_install_free_with_error,
+					parameters_install,
+					(GDestroyNotify) activate_parameters_install_free_with_error,
 				        G_TYPE_UINT, xid,
 				        G_TYPE_UINT, 0,
 				        G_TYPE_STRING, mime_type,


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