Blame SOURCES/0019-capplet-fix-disable-check-items.patch

f47161
From 76189ca50976f5f146ad86914a0c5ba932e77171 Mon Sep 17 00:00:00 2001
b31790
From: Ray Strode <rstrode@redhat.com>
b31790
Date: Mon, 27 Mar 2017 15:34:51 -0400
b31790
Subject: [PATCH 19/19] capplet: fix disable check items
b31790
b31790
An optimzation that tries to prevent transient desktop files from
b31790
accumulating in the user's homedirectory inadvertently broke the
b31790
ability for a user to disable startup applications.
b31790
b31790
This commit restores the broken functionality.
b31790
---
b31790
 capplet/gsp-app.c | 9 +++++----
b31790
 1 file changed, 5 insertions(+), 4 deletions(-)
b31790
b31790
diff --git a/capplet/gsp-app.c b/capplet/gsp-app.c
b31790
index 123ab217..1a0580e6 100644
b31790
--- a/capplet/gsp-app.c
b31790
+++ b/capplet/gsp-app.c
b31790
@@ -315,64 +315,65 @@ _gsp_app_user_equal_system (GspApp  *app,
b31790
         char          *str = NULL;
b31790
         GKeyFile      *keyfile = NULL;
b31790
         GDesktopAppInfo *app_info = NULL;
b31790
 
b31790
         manager = gsp_app_manager_get ();
b31790
         system_dir = gsp_app_manager_get_dir (manager,
b31790
                                               app->priv->xdg_system_position);
b31790
         g_object_unref (manager);
b31790
         if (!system_dir) {
b31790
                 goto out;
b31790
         }
b31790
 
b31790
         path = g_build_filename (system_dir, app->priv->basename, NULL);
b31790
 
b31790
         keyfile = g_key_file_new ();
b31790
         if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) {
b31790
                 goto out;
b31790
         }
b31790
 
b31790
         app_info = g_desktop_app_info_new_from_keyfile (keyfile);
b31790
 
b31790
         if (!app_info) {
b31790
                 goto out;
b31790
         }
b31790
 
b31790
         if (g_desktop_app_info_get_is_hidden (app_info)) {
b31790
                 goto out;
b31790
         }
b31790
 
b31790
         if (g_desktop_app_info_has_key (app_info,
b31790
-                                        GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED) &&
b31790
-            !g_desktop_app_info_get_boolean (app_info,
b31790
-                                             GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED)) {
b31790
-                goto out;
b31790
+                                        GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED)) {
b31790
+                if (app->priv->enabled != g_desktop_app_info_get_boolean (app_info, GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED))
b31790
+                        goto out;
b31790
+        } else if (!app->priv->enabled) {
b31790
+                        goto out;
b31790
         }
b31790
 
b31790
         if (!g_desktop_app_info_get_show_in (app_info, NULL)) {
b31790
                 goto out;
b31790
         }
b31790
 
b31790
         if (g_desktop_app_info_get_nodisplay (app_info)) {
b31790
                 goto out;
b31790
         }
b31790
 
b31790
         str = gsp_key_file_get_locale_string (keyfile,
b31790
                                               G_KEY_FILE_DESKTOP_KEY_NAME);
b31790
         if (!_gsp_str_equal (str, app->priv->name)) {
b31790
                 goto out;
b31790
         }
b31790
         g_clear_pointer (&str, g_free);
b31790
 
b31790
         str = gsp_key_file_get_locale_string (keyfile,
b31790
                                               G_KEY_FILE_DESKTOP_KEY_COMMENT);
b31790
         if (!_gsp_str_equal (str, app->priv->comment)) {
b31790
                 goto out;
b31790
         }
b31790
         g_clear_pointer (&str, g_free);
b31790
 
b31790
         str = gsp_key_file_get_string (keyfile,
b31790
                                        G_KEY_FILE_DESKTOP_KEY_EXEC);
b31790
         if (!_gsp_str_equal (str, app->priv->exec)) {
b31790
                 goto out;
b31790
         }
b31790
         g_clear_pointer (&str, g_free);
b31790
-- 
f47161
2.17.0
b31790