[gnome-software] Rename gsetting keys after sources->repos change in the UI



commit a75b4f9053bd9cc9f324c3cf60bae68c02f1e98d
Author: Kalev Lember <klember redhat com>
Date:   Thu Feb 15 00:42:45 2018 +0100

    Rename gsetting keys after sources->repos change in the UI
    
    It's going to be a bit painful for downstreams to adapt, but let's just
    get over with it now that we've done the rename in the UI.

 contrib/gnome-software.spec.in              |  2 +-
 data/org.gnome.software.gschema.xml         | 16 ++++++++--------
 plugins/core/gs-plugin-provenance-license.c |  8 ++++----
 plugins/core/gs-plugin-provenance.c         |  4 ++--
 src/gs-application.c                        |  6 +++---
 5 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/contrib/gnome-software.spec.in b/contrib/gnome-software.spec.in
index 024c4243..889cb706 100644
--- a/contrib/gnome-software.spec.in
+++ b/contrib/gnome-software.spec.in
@@ -147,7 +147,7 @@ desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.deskto
 # set up for Fedora
 cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschema.override << FOE
 [org.gnome.software]
-official-sources = [ 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 
'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 
'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-cisco-openh264' ]
+official-repos = [ 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 
'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 
'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-cisco-openh264' ]
 FOE
 
 %find_lang %name --with-gnome
diff --git a/data/org.gnome.software.gschema.xml b/data/org.gnome.software.gschema.xml
index 98647c02..0722fe46 100644
--- a/data/org.gnome.software.gschema.xml
+++ b/data/org.gnome.software.gschema.xml
@@ -77,15 +77,15 @@
       <summary>The minimum karma score for reviews</summary>
       <description>Reviews with karma less than this number will not be shown.</description>
     </key>
-    <key name="official-sources" type="as">
+    <key name="official-repos" type="as">
       <default>[]</default>
-      <summary>A list of official sources that should not be considered 3rd party</summary>
+      <summary>A list of official repositories that should not be considered 3rd party</summary>
     </key>
-    <key name="free-sources" type="as">
+    <key name="free-repos" type="as">
       <default>[]</default>
-      <summary>A list of official sources that should be considered free software</summary>
+      <summary>A list of official repositories that should be considered free software</summary>
     </key>
-    <key name="free-sources-url" type="s">
+    <key name="free-repos-url" type="s">
       <default>''</default>
       <summary>The licence URL to use when an application should be considered free software</summary>
     </key>
@@ -97,9 +97,9 @@
       <default>true</default>
       <summary>Show the folder management UI</summary>
     </key>
-    <key name="enable-software-sources" type="b">
+    <key name="enable-repos-dialog" type="b">
       <default>true</default>
-      <summary>Allow access to the Software Sources dialog</summary>
+      <summary>Allow access to the Software Repositories dialog</summary>
     </key>
     <key name="show-upgrade-prerelease" type="b">
       <default>false</default>
@@ -111,7 +111,7 @@
     </key>
     <key name="show-nonfree-prompt" type="b">
       <default>true</default>
-      <summary>Show the prompt to install nonfree software sources</summary>
+      <summary>Show the prompt to install nonfree software repositories</summary>
     </key>
     <key name="installed-page-show-size" type="b">
       <default>true</default>
diff --git a/plugins/core/gs-plugin-provenance-license.c b/plugins/core/gs-plugin-provenance-license.c
index ec24fca5..51e97bdd 100644
--- a/plugins/core/gs-plugin-provenance-license.c
+++ b/plugins/core/gs-plugin-provenance-license.c
@@ -47,7 +47,7 @@ gs_plugin_provenance_license_get_sources (GsPlugin *plugin)
                g_debug ("using custom provenance_license sources of %s", tmp);
                return g_strsplit (tmp, ",", -1);
        }
-       return g_settings_get_strv (priv->settings, "free-sources");
+       return g_settings_get_strv (priv->settings, "free-repos");
 }
 
 static gchar *
@@ -62,7 +62,7 @@ gs_plugin_provenance_license_get_id (GsPlugin *plugin)
                g_debug ("using custom license generic sources of %s", tmp);
                url = g_strdup (tmp);
        } else {
-               url = g_settings_get_string (priv->settings, "free-sources-url");
+               url = g_settings_get_string (priv->settings, "free-repos-url");
                if (url == NULL)
                        return g_strdup ("LicenseRef-free");
        }
@@ -75,11 +75,11 @@ gs_plugin_provenance_license_changed_cb (GSettings *settings,
                                         GsPlugin *plugin)
 {
        GsPluginData *priv = gs_plugin_get_data (plugin);
-       if (g_strcmp0 (key, "free-sources") == 0) {
+       if (g_strcmp0 (key, "free-repos") == 0) {
                g_strfreev (priv->sources);
                priv->sources = gs_plugin_provenance_license_get_sources (plugin);
        }
-       if (g_strcmp0 (key, "free-sources-url") == 0) {
+       if (g_strcmp0 (key, "free-repos-url") == 0) {
                g_free (priv->license_id);
                priv->license_id = gs_plugin_provenance_license_get_id (plugin);
        }
diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c
index 55f41cbb..f65ee258 100644
--- a/plugins/core/gs-plugin-provenance.c
+++ b/plugins/core/gs-plugin-provenance.c
@@ -44,7 +44,7 @@ gs_plugin_provenance_get_sources (GsPlugin *plugin)
                g_debug ("using custom provenance sources of %s", tmp);
                return g_strsplit (tmp, ",", -1);
        }
-       return g_settings_get_strv (priv->settings, "official-sources");
+       return g_settings_get_strv (priv->settings, "official-repos");
 }
 
 static void
@@ -53,7 +53,7 @@ gs_plugin_provenance_settings_changed_cb (GSettings *settings,
                                          GsPlugin *plugin)
 {
        GsPluginData *priv = gs_plugin_get_data (plugin);
-       if (g_strcmp0 (key, "official-sources") == 0) {
+       if (g_strcmp0 (key, "official-repos") == 0) {
                g_strfreev (priv->sources);
                priv->sources = gs_plugin_provenance_get_sources (plugin);
        }
diff --git a/src/gs-application.c b/src/gs-application.c
index 8c9c6119..d2b18515 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -47,7 +47,7 @@
 #include "gs-shell-search-provider.h"
 #include "gs-folders.h"
 
-#define ENABLE_SOFTWARE_SOURCES_CONF_KEY "enable-software-sources"
+#define ENABLE_REPOS_DIALOG_CONF_KEY "enable-repos-dialog"
 
 struct _GsApplication {
        GtkApplication   parent;
@@ -836,7 +836,7 @@ gs_application_update_software_sources_presence (GApplication *self)
        action = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP (self),
                                                              "sources"));
        enable_sources = g_settings_get_boolean (app->settings,
-                                                ENABLE_SOFTWARE_SOURCES_CONF_KEY);
+                                                ENABLE_REPOS_DIALOG_CONF_KEY);
        g_simple_action_set_enabled (action, enable_sources);
 }
 
@@ -845,7 +845,7 @@ gs_application_settings_changed_cb (GApplication *self,
                                    const gchar *key,
                                    gpointer data)
 {
-       if (g_strcmp0 (key, ENABLE_SOFTWARE_SOURCES_CONF_KEY) == 0) {
+       if (g_strcmp0 (key, ENABLE_REPOS_DIALOG_CONF_KEY) == 0) {
                gs_application_update_software_sources_presence (self);
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]