[gnome-control-center/gnome-3-26] Only load panel corresponding to OnlyShowIn/NotShowIn



commit 43dbc708a120ed31bbc6d1949a94556a1a50fa1f
Author: Didier Roche <didrocks ubuntu com>
Date:   Wed Sep 6 10:04:25 2017 +0200

    Only load panel corresponding to OnlyShowIn/NotShowIn
    
    Most panel desktop files have an OnlyShowIn entry to display them
    in the previous iconish G-C-C UI. Some distributions (like ubuntu) prefers
    adding new panel rather than patching the existing ones to ensure that
    the upstream Control Center look it preserved under a vanilla GNOME session.
    This patch fix thus the new layout setting to respect the OnlyShowIn property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787347

 shell/cc-panel-loader.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index fc235fe..8be3bb9 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -197,6 +197,10 @@ cc_panel_loader_fill_model (CcShellModel *model)
       if (G_UNLIKELY (category < 0))
         continue;
 
+      /* Consult OnlyShowIn/NotShowIn for desktop environments */
+      if (!g_desktop_app_info_get_show_in (app, NULL))
+        continue;
+
       /* Only add the panel when it is not hidden, e.g. the Details subpanels
        * that are only visible in the new Shell.
        */


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