applications: Fix terminal launch of application
Trying to launch the settings for a specific application from a terminal using "gnome-control-center applications APP_ID" currently fails, as the permission store async call is usually not done yet. Fix this by re-activating the attempted app selection when the async call finishes. Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2034>
This commit is contained in:
parent
85403f7563
commit
1def49b62b
1 changed files with 8 additions and 1 deletions
|
@ -88,6 +88,7 @@ struct _CcApplicationsPanel
|
|||
GtkButton *view_details_button;
|
||||
|
||||
GDBusProxy *perm_store;
|
||||
GtkListBoxRow *perm_store_pending_row;
|
||||
GSettings *notification_settings;
|
||||
GSettings *location_settings;
|
||||
GSettings *privacy_settings;
|
||||
|
@ -1390,7 +1391,8 @@ update_panel (CcApplicationsPanel *self,
|
|||
|
||||
if (self->perm_store == NULL)
|
||||
{
|
||||
g_message ("No permissions store proxy yet, come back later");
|
||||
/* Async permission store not initialized, row will be re-activated in the callback */
|
||||
self->perm_store_pending_row = row;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1549,6 +1551,11 @@ on_perm_store_ready (GObject *source_object,
|
|||
}
|
||||
|
||||
self->perm_store = proxy;
|
||||
|
||||
if (self->perm_store_pending_row)
|
||||
g_signal_emit_by_name (self->perm_store_pending_row, "activate");
|
||||
|
||||
self->perm_store_pending_row = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue