Avoid deprecated polkit_authority_get() function
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen
13 years ago
13 | 13 |
Andre Klapper (1):
|
14 | 14 |
Compile with -DGSEAL_ENABLE. Fixes bug 616386.
|
15 | 15 |
|
16 | |
David Zeuthen (7):
|
|
16 |
David Zeuthen (8):
|
17 | 17 |
Fix build
|
18 | 18 |
Remove lock down functionality
|
19 | 19 |
Require polkit 0.97
|
|
21 | 21 |
Post-release version bump to 0.97
|
22 | 22 |
Port from dbus-glib to gdbus
|
23 | 23 |
Silence the build
|
|
24 |
Avoid deprecated polkit_authority_get() function
|
24 | 25 |
|
25 | 26 |
Martin Pitt (1):
|
26 | 27 |
Hide the agent autostart desktop file
|
376 | 376 |
polkit_lock_button_constructed (GObject *object)
|
377 | 377 |
{
|
378 | 378 |
PolkitLockButton *button = POLKIT_LOCK_BUTTON (object);
|
|
379 |
GError *error;
|
379 | 380 |
|
380 | 381 |
gtk_box_set_spacing (GTK_BOX (button), 2);
|
381 | 382 |
|
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 |
}
|
383 | 391 |
g_signal_connect (button->priv->authority,
|
384 | 392 |
"changed",
|
385 | 393 |
G_CALLBACK (on_authority_changed),
|
222 | 222 |
|
223 | 223 |
loop = g_main_loop_new (NULL, FALSE);
|
224 | 224 |
|
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 |
}
|
226 | 233 |
g_signal_connect (authority,
|
227 | 234 |
"changed",
|
228 | 235 |
G_CALLBACK (on_authority_changed),
|
208 | 208 |
PolkitGnomeAuthenticator *authenticator;
|
209 | 209 |
GList *l;
|
210 | 210 |
guint n;
|
|
211 |
GError *error;
|
211 | 212 |
|
212 | 213 |
authenticator = POLKIT_GNOME_AUTHENTICATOR (g_object_new (POLKIT_GNOME_TYPE_AUTHENTICATOR, NULL));
|
213 | 214 |
|
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 |
|
215 | 224 |
authenticator->action_id = g_strdup (action_id);
|
216 | 225 |
authenticator->message = g_strdup (message);
|
217 | 226 |
authenticator->icon_name = g_strdup (icon_name);
|