[packagekit] gnome-packagekit flames^Wreview

David Zeuthen david at fubar.dk
Tue Jan 1 13:16:59 PST 2008


On Tue, 2008-01-01 at 19:49 +0000, Richard Hughes wrote:
> A good one. I'll have a think on how I can work this into the current
> codebase. I've never used GtkAssistant before, so I might get it wrong
> a few times before we get it correct.

Btw, when redoing this code you should use PolKitGnomeAction 

http://hal.freedesktop.org/docs/PolicyKit-gnome/PolKitGnomeAction.html

for the "Update System" action widget on the first page of the
assistant. This is new in PolKit 0.7 and I think you already depend on
it. Should be really simple, look at the example app that is in the
docs, e.g. something like

 pk_action = polkit_action_new ();
 polkit_action_set_action_id (pk_action, "org.freedesktop.packagekit.update");
 action = polkit_gnome_action_new_default ("update", pk_action, _("Update System"), NULL);
 polkit_action_unref (pk_action);
 button = polkit_gnome_action_create_button (action);
 gtk_assistant_add_action_widget (assistant, button);

should do it and then all the PolicyKit interactions happen in the
background and you get a padlock icon when the user needs to
authenticate. Easy as pie!

Cheers,
David





More information about the PackageKit mailing list