[gnome-settings-daemon/wip/fmuellner/remove-app-menu] xsettings: Stop advertising app menu



commit 9db6df384920463b82bc64476275604297b28e60
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Oct 8 12:53:08 2018 +0200

    xsettings: Stop advertising app menu
    
    The shell stopped displaying it, so the setting is now always
    false.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/624

 plugins/xsettings/gsd-xsettings-manager.c | 47 +------------------------------
 1 file changed, 1 insertion(+), 46 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index eb55b8b7..c6772dd7 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -453,6 +453,7 @@ static FixedEntry fixed_entries [] = {
         { "Gtk/AutoMnemonics",       fixed_true_int },
         { "Gtk/DialogsUseHeader",    fixed_true_int },
         { "Gtk/SessionBusId",        fixed_bus_id },
+        { "Gtk/ShellShowsAppMenu",   fixed_false_int },
         { "Gtk/ColorPalette",        fixed_string,      { .str = DEFAULT_COLOR_PALETTE } },
         { "Net/FallbackIconTheme",   fixed_string,      { .str = "gnome" } },
         { "Gtk/ToolbarStyle",        fixed_string,      { .str =  "both-horiz" } },
@@ -1001,36 +1002,6 @@ start_fontconfig_monitor (GnomeXSettingsManager  *manager)
         gnome_settings_profile_end (NULL);
 }
 
-static void
-notify_have_shell (GnomeXSettingsManager   *manager,
-                   gboolean                 have_shell)
-{
-        gnome_settings_profile_start (NULL);
-        if (manager->priv->have_shell == have_shell)
-                return;
-        manager->priv->have_shell = have_shell;
-        xsettings_manager_set_int (manager->priv->manager, "Gtk/ShellShowsAppMenu", have_shell);
-        queue_notify (manager);
-        gnome_settings_profile_end (NULL);
-}
-
-static void
-on_shell_appeared (GDBusConnection *connection,
-                   const gchar     *name,
-                   const gchar     *name_owner,
-                   gpointer         user_data)
-{
-        notify_have_shell (user_data, TRUE);
-}
-
-static void
-on_shell_disappeared (GDBusConnection *connection,
-                      const gchar     *name,
-                      gpointer         user_data)
-{
-        notify_have_shell (user_data, FALSE);
-}
-
 static void
 process_value (GnomeXSettingsManager *manager,
                TranslationEntry      *trans,
@@ -1138,20 +1109,6 @@ setup_xsettings_managers (GnomeXSettingsManager *manager)
         return TRUE;
 }
 
-static void
-start_shell_monitor (GnomeXSettingsManager *manager)
-{
-        notify_have_shell (manager, TRUE);
-        manager->priv->have_shell = TRUE;
-        manager->priv->shell_name_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
-                                                               "org.gnome.Shell",
-                                                               0,
-                                                               on_shell_appeared,
-                                                               on_shell_disappeared,
-                                                               manager,
-                                                               NULL);
-}
-
 static void
 force_disable_animation_changed (GObject    *gobject,
                                  GParamSpec *pspec,
@@ -1339,8 +1296,6 @@ gnome_xsettings_manager_start (GnomeXSettingsManager *manager,
 
         start_fontconfig_monitor (manager);
 
-        start_shell_monitor (manager);
-
         overrides = g_settings_get_value (manager->priv->plugin_settings, XSETTINGS_OVERRIDE_KEY);
         xsettings_manager_set_overrides (manager->priv->manager, overrides);
         queue_notify (manager);


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