[gnome-software/1344-fedora-3rd-party-repos-updates-for-f35: 30/34] gs-overview-page: Stop using "show-nonfree-prompt" GSettings option
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1344-fedora-3rd-party-repos-updates-for-f35: 30/34] gs-overview-page: Stop using "show-nonfree-prompt" GSettings option
- Date: Fri, 13 Aug 2021 14:29:40 +0000 (UTC)
commit 9fa516537aa27fce9aa3046be3e685ed1354cfc7
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 12 18:58:24 2021 +0200
gs-overview-page: Stop using "show-nonfree-prompt" GSettings option
This is covered by the new fedora-third-party command line tool.
src/gs-overview-page.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 70894b9df..c72c757d5 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -39,7 +39,6 @@ struct _GsOverviewPage
gboolean empty;
gchar *category_of_day;
GHashTable *category_hash; /* id : GsCategory */
- GSettings *settings;
gchar *third_party_cmdtool;
gboolean third_party_needs_question;
@@ -353,13 +352,7 @@ out:
static void
refresh_third_party_repo (GsOverviewPage *self)
{
- /* only show if never prompted and needs checking */
- if (g_settings_get_boolean (self->settings, "show-nonfree-prompt") &&
- self->third_party_needs_question) {
- gtk_widget_set_visible (self->infobar_third_party, TRUE);
- } else {
- gtk_widget_set_visible (self->infobar_third_party, FALSE);
- }
+ gtk_widget_set_visible (self->infobar_third_party, self->third_party_needs_question);
}
static gboolean
@@ -473,10 +466,6 @@ reload_third_party_repo (GsOverviewPage *self)
NULL
};
- /* only show if never prompted */
- if (!g_settings_get_boolean (self->settings, "show-nonfree-prompt"))
- return;
-
/* Fedora-specific functionality */
if (!is_fedora ())
return;
@@ -656,7 +645,6 @@ third_party_response_cb (GtkInfoBar *info_bar,
gint response_id,
GsOverviewPage *self)
{
- g_settings_set_boolean (self->settings, "show-nonfree-prompt", FALSE);
if (response_id == GTK_RESPONSE_YES)
fedora_third_party_enable (self);
else
@@ -742,8 +730,6 @@ gs_overview_page_init (GsOverviewPage *self)
gtk_widget_init_template (GTK_WIDGET (self));
g_signal_connect (self, "refreshed", G_CALLBACK (refreshed_cb), self);
-
- self->settings = g_settings_new ("org.gnome.software");
}
static void
@@ -793,7 +779,6 @@ gs_overview_page_dispose (GObject *object)
g_clear_object (&self->plugin_loader);
g_clear_object (&self->cancellable);
- g_clear_object (&self->settings);
g_clear_pointer (&self->third_party_cmdtool, g_free);
g_clear_pointer (&self->category_of_day, g_free);
g_clear_pointer (&self->category_hash, g_hash_table_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]