[gnome-software/1344-fedora-3rd-party-repos-updates-for-f35: 11/14] gs-overview-page: Stop using "show-nonfree-prompt" GSettings option




commit d931ee2e618bc3f67d696901364e81b4118789a5
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 2f54aa749..511195b88 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
@@ -429,10 +422,6 @@ reload_third_party_repo (GsOverviewPage *self)
 {
        g_autoptr(GTask) task = NULL;
 
-       /* only show if never prompted */
-       if (!g_settings_get_boolean (self->settings, "show-nonfree-prompt"))
-               return;
-
        /* Fedora-specific functionality */
        if (!is_fedora ())
                return;
@@ -654,7 +643,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
@@ -740,8 +728,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
@@ -791,7 +777,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]