Codebase list policykit-1-gnome / 22e9a00
Avoid deprecated polkit_authority_get() function Signed-off-by: David Zeuthen <davidz@redhat.com> David Zeuthen 13 years ago
4 changed file(s) with 29 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1313 Andre Klapper (1):
1414 Compile with -DGSEAL_ENABLE. Fixes bug 616386.
1515
16 David Zeuthen (7):
16 David Zeuthen (8):
1717 Fix build
1818 Remove lock down functionality
1919 Require polkit 0.97
2121 Post-release version bump to 0.97
2222 Port from dbus-glib to gdbus
2323 Silence the build
24 Avoid deprecated polkit_authority_get() function
2425
2526 Martin Pitt (1):
2627 Hide the agent autostart desktop file
376376 polkit_lock_button_constructed (GObject *object)
377377 {
378378 PolkitLockButton *button = POLKIT_LOCK_BUTTON (object);
379 GError *error;
379380
380381 gtk_box_set_spacing (GTK_BOX (button), 2);
381382
382 button->priv->authority = polkit_authority_get ();
383 /* TODO: should be async+failable (e.g. GAsyncInitable) instead of this */
384 error = NULL;
385 button->priv->authority = polkit_authority_get_sync (NULL /* GCancellable* */, &error);
386 if (button->priv->authority == NULL)
387 {
388 g_critical ("Error getting authority: %s", error->message);
389 g_error_free (error);
390 }
383391 g_signal_connect (button->priv->authority,
384392 "changed",
385393 G_CALLBACK (on_authority_changed),
222222
223223 loop = g_main_loop_new (NULL, FALSE);
224224
225 authority = polkit_authority_get ();
225 error = NULL;
226 authority = polkit_authority_get_sync (NULL /* GCancellable* */, &error);
227 if (authority == NULL)
228 {
229 g_warning ("Error getting authority: %s", error->message);
230 g_error_free (error);
231 goto out;
232 }
226233 g_signal_connect (authority,
227234 "changed",
228235 G_CALLBACK (on_authority_changed),
208208 PolkitGnomeAuthenticator *authenticator;
209209 GList *l;
210210 guint n;
211 GError *error;
211212
212213 authenticator = POLKIT_GNOME_AUTHENTICATOR (g_object_new (POLKIT_GNOME_TYPE_AUTHENTICATOR, NULL));
213214
214 authenticator->authority = polkit_authority_get ();
215 error = NULL;
216 authenticator->authority = polkit_authority_get_sync (NULL /* GCancellable* */, &error);
217 if (authenticator->authority == NULL)
218 {
219 g_critical ("Error getting authority: %s", error->message);
220 g_error_free (error);
221 goto error;
222 }
223
215224 authenticator->action_id = g_strdup (action_id);
216225 authenticator->message = g_strdup (message);
217226 authenticator->icon_name = g_strdup (icon_name);