[gnome-software: 1/9] packagekit: Don’t set PkClient properties to default values explicitly
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/9] packagekit: Don’t set PkClient properties to default values explicitly
- Date: Wed, 1 Jun 2022 13:37:38 +0000 (UTC)
commit d60780b1a905fda52f083e218080deccfe2d1128
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue May 31 16:46:55 2022 +0100
packagekit: Don’t set PkClient properties to default values explicitly
`PkClient`s have `background=FALSE` and `cache-age=G_MAXUINT` by
default, so there’s no need to explicitly set those values again at
construction time.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1762
plugins/packagekit/gs-plugin-packagekit.c | 9 ---------
1 file changed, 9 deletions(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index c5fc7ef58..2d1804bb5 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -124,8 +124,6 @@ gs_plugin_packagekit_init (GsPluginPackagekit *self)
/* core */
g_mutex_init (&self->task_mutex);
self->task = gs_packagekit_task_new (plugin);
- pk_client_set_background (PK_CLIENT (self->task), FALSE);
- pk_client_set_cache_age (PK_CLIENT (self->task), G_MAXUINT);
pk_client_set_interactive (PK_CLIENT (self->task), gs_plugin_has_flags (plugin,
GS_PLUGIN_FLAGS_INTERACTIVE));
/* refine */
@@ -136,22 +134,17 @@ gs_plugin_packagekit_init (GsPluginPackagekit *self)
G_CALLBACK (gs_plugin_packagekit_updates_changed_cb), plugin);
g_signal_connect (self->control_refine, "repo-list-changed",
G_CALLBACK (gs_plugin_packagekit_repo_list_changed_cb), plugin);
- pk_client_set_background (self->client_refine, FALSE);
- pk_client_set_cache_age (self->client_refine, G_MAXUINT);
pk_client_set_interactive (self->client_refine, gs_plugin_has_flags (plugin,
GS_PLUGIN_FLAGS_INTERACTIVE));
/* local */
g_mutex_init (&self->task_mutex_local);
self->task_local = gs_packagekit_task_new (plugin);
- pk_client_set_background (PK_CLIENT (self->task_local), FALSE);
pk_client_set_interactive (PK_CLIENT (self->task_local), gs_plugin_has_flags (plugin,
GS_PLUGIN_FLAGS_INTERACTIVE));
/* url-to-app */
g_mutex_init (&self->client_mutex_url_to_app);
self->client_url_to_app = pk_client_new ();
- pk_client_set_background (self->client_url_to_app, FALSE);
- pk_client_set_cache_age (self->client_url_to_app, G_MAXUINT);
pk_client_set_interactive (self->client_url_to_app, gs_plugin_has_flags (plugin,
GS_PLUGIN_FLAGS_INTERACTIVE));
/* proxy */
@@ -191,8 +184,6 @@ gs_plugin_packagekit_init (GsPluginPackagekit *self)
/* repos refine */
g_mutex_init (&self->client_mutex_refine_repos);
self->client_refine_repos = pk_client_new ();
- pk_client_set_background (self->client_refine_repos, FALSE);
- pk_client_set_cache_age (self->client_refine_repos, G_MAXUINT);
pk_client_set_interactive (self->client_refine_repos, gs_plugin_has_flags (plugin,
GS_PLUGIN_FLAGS_INTERACTIVE));
/* offline updates */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]