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

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