~ubuntu-branches/ubuntu/oneiric/policykit-1-gnome/oneiric

« back to all changes in this revision

Viewing changes to polkitgtk/polkitlockbutton.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-12-20 11:43:46 UTC
  • Revision ID: james.westby@ubuntu.com-20101220114346-qi71fxeveyo7720p
Tags: 0.99-1ubuntu2
* debian/patches/03-dialog-focus.patch:
  - Dropped patch, as PolicyKit does not allow non-root applications to set
    details (LP: #685655)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <glib/gi18n-lib.h>
25
25
#include <string.h>
26
26
#include <polkit/polkit.h>
27
 
#include <gdk/gdkx.h>
28
27
 
29
28
#include "polkitlockbutton.h"
30
29
 
948
947
 
949
948
  if (!button->priv->authorized && button->priv->can_obtain)
950
949
    {
951
 
      GtkWidget *window;
952
 
      PolkitDetails *details;
953
 
      gchar *xid;
954
 
 
955
950
      /* if we already have a pending interactive check, then do nothing */
956
951
      if (button->priv->interactive_check_cancellable != NULL)
957
952
        goto out;
958
953
 
959
954
      button->priv->interactive_check_cancellable = g_cancellable_new ();
960
955
 
961
 
      details = polkit_details_new ();
962
 
      window = gtk_widget_get_toplevel (GTK_WIDGET (button));
963
 
      xid = g_strdup_printf ("%lu", gdk_x11_drawable_get_xid (GDK_DRAWABLE (gtk_widget_get_window (window))));
964
 
      polkit_details_insert (details, "toplevel_xid", xid);
965
 
      g_free (xid);
966
 
 
967
956
      polkit_authority_check_authorization (button->priv->authority,
968
957
                                            button->priv->subject,
969
958
                                            button->priv->action_id,
970
 
                                            details,
 
959
                                            NULL, /* PolkitDetails */
971
960
                                            POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
972
961
                                            button->priv->interactive_check_cancellable,
973
962
                                            interactive_check_cb,