[Xfce4-commits] <xfce4-session:master> Show all applications in autostart (bug #8014).

Nick Schermer noreply at xfce.org
Mon Mar 26 17:38:01 CEST 2012


Updating branch refs/heads/master
         to 0fea8c64bfc32915d9e397e7029de150167a737d (commit)
       from 19a41033ea3563d961736a9bc803c8682664af53 (commit)

commit 0fea8c64bfc32915d9e397e7029de150167a737d
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Mar 25 13:38:32 2012 +0200

    Show all applications in autostart (bug #8014).
    
    Show also non-XFCE applications in the autostart list but
    do no enable them. If OnlyShowIn does not list XFCE, show
    it cursive in the list and set X-XFCE-Autostart-Override=true
    when toggled. This way we don't alter the Hidden and OnlyShowIn
    keys for other environments.
    
    If X-XFCE-Autostart-Override is true, skip the OnlyShowIn check
    and try to start it (unless Hidden is set etcetc).

 settings/Makefile.am                     |    3 +-
 settings/main.c                          |   27 +++++-
 settings/startup-settings.c              |   69 --------------
 settings/xfae-model.c                    |  152 ++++++++++++++++++++----------
 settings/xfae-model.h                    |    1 +
 settings/xfae-window.c                   |   66 +------------
 settings/xfae-window.h                   |    3 -
 settings/xfce4-session-settings-common.h |    1 -
 settings/xfce4-session-settings.glade    |    4 +-
 xfce4-session/xfsm-startup.c             |   68 ++++++-------
 10 files changed, 167 insertions(+), 227 deletions(-)

diff --git a/settings/Makefile.am b/settings/Makefile.am
index 65bb99e..203a3ed 100644
--- a/settings/Makefile.am
+++ b/settings/Makefile.am
@@ -5,8 +5,7 @@ xfce4_session_settings_SOURCES = \
 	module.c \
 	module.h \
 	session-editor.c \
-	splash-settings.c  \
-	startup-settings.c \
+	splash-settings.c \
 	xfae-dialog.c \
 	xfae-dialog.h \
 	xfae-model.c \
diff --git a/settings/main.c b/settings/main.c
index b831acd..31a6815 100644
--- a/settings/main.c
+++ b/settings/main.c
@@ -63,6 +63,7 @@ main(int argc,
     GtkBuilder *builder;
     GtkWidget *notebook, *xfae_page, *lbl;
     GError *error = NULL;
+    XfconfChannel *channel;
 
     xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
 
@@ -117,7 +118,6 @@ main(int argc,
         return EXIT_FAILURE;
     }
 
-    startup_settings_init(builder);
     splash_settings_init(builder);
     session_editor_init(builder);
 
@@ -129,6 +129,31 @@ main(int argc,
     gtk_widget_show(lbl);
     gtk_notebook_insert_page(GTK_NOTEBOOK(notebook), xfae_page, lbl, 2);
 
+    channel = xfconf_channel_get(SETTINGS_CHANNEL);
+
+    /* bind widgets to xfconf */
+    xfconf_g_property_bind(channel, "/chooser/AlwaysDisplay", G_TYPE_BOOLEAN,
+                           gtk_builder_get_object(builder, "chk_display_chooser"),
+                           "active");
+    xfconf_g_property_bind(channel, "/general/AutoSave", G_TYPE_BOOLEAN,
+                           gtk_builder_get_object(builder, "chk_session_autosave"),
+                           "active");
+    xfconf_g_property_bind(channel, "/general/PromptOnLogout", G_TYPE_BOOLEAN,
+                           gtk_builder_get_object(builder, "chk_logout_prompt"),
+                           "active");
+    xfconf_g_property_bind(channel, "/compat/LaunchGNOME", G_TYPE_BOOLEAN,
+                           gtk_builder_get_object(builder, "chk_compat_gnome"),
+                           "active");
+    xfconf_g_property_bind(channel, "/compat/LaunchKDE", G_TYPE_BOOLEAN,
+                           gtk_builder_get_object(builder, "chk_compat_kde"),
+                           "active");
+    xfconf_g_property_bind(channel, "/security/EnableTcp", G_TYPE_BOOLEAN,
+                           gtk_builder_get_object(builder, "chk_enable_tcp"),
+                           "active");
+    xfconf_g_property_bind(channel, "/shutdown/LockScreen", G_TYPE_BOOLEAN,
+                           gtk_builder_get_object(builder, "chk_lock_screen"),
+                           "active");
+
     if(G_UNLIKELY(opt_socket_id == 0)) {
         GtkWidget *dialog = GTK_WIDGET(gtk_builder_get_object(builder, "xfce4_session_settings_dialog"));
 
diff --git a/settings/startup-settings.c b/settings/startup-settings.c
deleted file mode 100644
index 2d412bc..0000000
--- a/settings/startup-settings.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *  Copyright (c) 2008 Brian Tarricone <bjt23 at cornell.edu>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; version 2 of the License ONLY.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <xfconf/xfconf.h>
-#include <gtk/gtk.h>
-
-#include "xfce4-session-settings-common.h"
-
-#define DISP_CHOOSER_PROP   "/chooser/AlwaysDisplay"
-
-#define AUTO_SAVE_PROP      "/general/AutoSave"
-#define LOGOUT_PROMPT_PROP  "/general/PromptOnLogout"
-
-#define GNOME_SUPPORT_PROP  "/compat/LaunchGNOME"
-#define KDE_SUPPORT_PROP    "/compat/LaunchKDE"
-
-#define ENABLE_TCP_PROP     "/security/EnableTcp"
-
-#define LOCK_SCREEN_PROP     "/shutdown/LockScreen"
-
-void
-startup_settings_init(GtkBuilder *builder)
-{
-    XfconfChannel *channel = xfconf_channel_get(SETTINGS_CHANNEL);
-
-    xfconf_g_property_bind(channel, DISP_CHOOSER_PROP, G_TYPE_BOOLEAN,
-                           gtk_builder_get_object(builder, "chk_display_chooser"),
-                           "active");
-
-    xfconf_g_property_bind(channel, AUTO_SAVE_PROP, G_TYPE_BOOLEAN,
-                           gtk_builder_get_object(builder, "chk_session_autosave"),
-                           "active");
-    xfconf_g_property_bind(channel, LOGOUT_PROMPT_PROP, G_TYPE_BOOLEAN,
-                           gtk_builder_get_object(builder, "chk_logout_prompt"),
-                           "active");
-
-    xfconf_g_property_bind(channel, GNOME_SUPPORT_PROP, G_TYPE_BOOLEAN,
-                           gtk_builder_get_object(builder, "chk_compat_gnome"),
-                           "active");
-    xfconf_g_property_bind(channel, KDE_SUPPORT_PROP, G_TYPE_BOOLEAN,
-                           gtk_builder_get_object(builder, "chk_compat_kde"),
-                           "active");
-
-    xfconf_g_property_bind(channel, ENABLE_TCP_PROP, G_TYPE_BOOLEAN,
-                           gtk_builder_get_object(builder, "chk_enable_tcp"),
-                           "active");
-
-    xfconf_g_property_bind(channel, LOCK_SCREEN_PROP, G_TYPE_BOOLEAN,
-                           gtk_builder_get_object(builder, "chk_lock_screen"),
-                           "active");
-}
diff --git a/settings/xfae-model.c b/settings/xfae-model.c
index 89c861a..d53dabb 100644
--- a/settings/xfae-model.c
+++ b/settings/xfae-model.c
@@ -69,7 +69,8 @@ static gboolean           xfae_model_iter_nth_child   (GtkTreeModel       *tree_
 static gboolean           xfae_model_iter_parent      (GtkTreeModel       *tree_model,
                                                        GtkTreeIter        *iter,
                                                        GtkTreeIter        *child);
-
+static gint               xfae_model_sort_items       (gconstpointer       a,
+                                                       gconstpointer       b);
 static XfaeItem          *xfae_item_new               (const gchar        *relpath);
 static void               xfae_item_free              (XfaeItem           *item);
 static gboolean           xfae_item_is_removable      (XfaeItem           *item);
@@ -96,6 +97,10 @@ struct _XfaeItem
   gchar     *comment;
   gchar     *relpath;
   gboolean   hidden;
+  gchar     *tooltip;
+
+  gboolean   show_in_xfce;
+  gboolean   show_in_override;
 };
 
 
@@ -133,9 +138,11 @@ xfae_model_init (XfaeModel *model)
     {
       item = xfae_item_new (files[n]);
       if (G_LIKELY (item != NULL))
-        model->items = g_list_append (model->items, item);
+        model->items = g_list_prepend (model->items, item);
     }
   g_strfreev (files);
+
+  model->items = g_list_sort (model->items, xfae_model_sort_items);
 }
 
 
@@ -196,14 +203,13 @@ xfae_model_get_column_type (GtkTreeModel *tree_model,
   switch (index_)
     {
     case XFAE_MODEL_COLUMN_NAME:
+    case XFAE_MODEL_COLUMN_TOOLTIP:
       return G_TYPE_STRING;
 
     case XFAE_MODEL_COLUMN_ICON:
       return GDK_TYPE_PIXBUF;
 
     case XFAE_MODEL_COLUMN_ENABLED:
-      return G_TYPE_BOOLEAN;
-
     case XFAE_MODEL_COLUMN_REMOVABLE:
       return G_TYPE_BOOLEAN;
     }
@@ -265,6 +271,7 @@ xfae_model_get_value (GtkTreeModel *tree_model,
   XfaeModel *model = XFAE_MODEL (tree_model);
   XfaeItem  *item = ((GList *) iter->user_data)->data;
   gchar     *name;
+  gchar     *cursive;
 
   g_return_if_fail (XFAE_IS_MODEL (model));
   g_return_if_fail (iter->stamp == model->stamp);
@@ -277,6 +284,14 @@ xfae_model_get_value (GtkTreeModel *tree_model,
         name = g_strdup_printf ("%s (%s)", item->name, item->comment);
       else
         name = g_strdup (item->name);
+
+      if (!item->show_in_xfce)
+        {
+          cursive = g_markup_printf_escaped ("<i>%s</i>", name);
+          g_free (name);
+          name = cursive;
+        }
+
       g_value_take_string (value, name);
       break;
 
@@ -287,7 +302,11 @@ xfae_model_get_value (GtkTreeModel *tree_model,
 
     case XFAE_MODEL_COLUMN_ENABLED:
       g_value_init (value, G_TYPE_BOOLEAN);
-      g_value_set_boolean (value, !item->hidden);
+
+      if (item->show_in_xfce)
+        g_value_set_boolean (value, !item->hidden);
+      else
+        g_value_set_boolean (value, !item->hidden && item->show_in_override);
       break;
 
     case XFAE_MODEL_COLUMN_REMOVABLE:
@@ -295,6 +314,11 @@ xfae_model_get_value (GtkTreeModel *tree_model,
       g_value_set_boolean (value, xfae_item_is_removable (item));
       break;
 
+    case XFAE_MODEL_COLUMN_TOOLTIP:
+      g_value_init (value, G_TYPE_STRING);
+      g_value_set_static_string (value, item->tooltip);
+      break;
+
     default:
       g_assert_not_reached ();
     }
@@ -393,6 +417,21 @@ xfae_model_iter_parent (GtkTreeModel *tree_model,
 
 
 
+static gint
+xfae_model_sort_items (gconstpointer a,
+                       gconstpointer b)
+{
+  const XfaeItem *item_a = a;
+  const XfaeItem *item_b = b;
+
+  /* sort non-xfce items below */
+  if (item_a->show_in_xfce != item_b->show_in_xfce)
+    return item_a->show_in_xfce ? -1 : 1;
+
+  return g_utf8_collate (item_a->name, item_b->name);
+}
+
+
 
 static XfaeItem*
 xfae_item_new (const gchar *relpath)
@@ -404,7 +443,6 @@ xfae_item_new (const gchar *relpath)
   gchar        **only_show_in;
   gchar        **not_show_in;
   gchar        **args;
-  gchar         *icon_name;
   gint           m;
   GtkIconTheme  *icon_theme;
   gchar         *command;
@@ -428,45 +466,51 @@ xfae_item_new (const gchar *relpath)
           if (G_LIKELY (value != NULL))
             item->name = g_strdup (value);
 
-          value = xfce_rc_read_entry (rc, "Icon", NULL);
+          value = xfce_rc_read_entry (rc, "Icon", "application-x-executable");
           if (G_UNLIKELY (value != NULL))
             item->icon = gtk_icon_theme_load_icon (icon_theme, value, 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
-          else
-            {
-              /* we try to be smart here in that we try to guess
-               * the icon name from the "Exec" key if no "Icon"
-               * key is provided.
-               */
-              value = xfce_rc_read_entry (rc, "Exec", NULL);
-              if (G_LIKELY (value != NULL))
-                {
-                  args = g_strsplit_set (value, " \t", -1);
-                  if (G_LIKELY (*args != NULL))
-                    {
-                      icon_name = g_path_get_basename (*args);
-                      item->icon = gtk_icon_theme_load_icon (icon_theme, icon_name, 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
-                      g_free (icon_name);
-                    }
-                  g_strfreev (args);
-                }
-            }
 
           value = xfce_rc_read_entry (rc, "Comment", NULL);
           if (G_LIKELY (value != NULL))
             item->comment = g_strdup (value);
 
+          value = xfce_rc_read_entry (rc, "Exec", NULL);
+          if (G_LIKELY (value != NULL))
+            item->tooltip = g_markup_printf_escaped ("<b>%s</b> %s", _("Command:"), value);
+
           item->hidden = xfce_rc_read_bool_entry (rc, "Hidden", FALSE);
         }
+      else
+        {
+          return NULL;
+        }
+
+      item->show_in_override = xfce_rc_read_bool_entry (rc, "X-XFCE-Autostart-Override", FALSE);
+
+      /* check the NotShowIn setting */
+      not_show_in = xfce_rc_read_list_entry (rc, "NotShowIn", ";");
+      if (G_UNLIKELY (not_show_in != NULL))
+        {
+          /* check if "XFCE" is specified */
+          for (m = 0; not_show_in[m] != NULL; ++m)
+            if (g_ascii_strcasecmp (not_show_in[m], "XFCE") == 0)
+              {
+                skip = TRUE;
+                break;
+              }
+
+          g_strfreev (not_show_in);
+        }
 
       /* check the OnlyShowIn setting */
       only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";");
       if (G_UNLIKELY (only_show_in != NULL))
         {
-          /* check if "Xfce" is specified */
-          for (m = 0, skip = TRUE; only_show_in[m] != NULL; ++m)
-            if (g_ascii_strcasecmp (only_show_in[m], "Xfce") == 0)
+          /* check if "XFCE" is specified */
+          for (m = 0; only_show_in[m] != NULL; ++m)
+            if (g_ascii_strcasecmp (only_show_in[m], "XFCE") == 0)
               {
-                skip = FALSE;
+                item->show_in_xfce = TRUE;
                 break;
               }
 
@@ -474,20 +518,8 @@ xfae_item_new (const gchar *relpath)
         }
       else
         {
-          /* check the NotShowIn setting */
-          not_show_in = xfce_rc_read_list_entry (rc, "NotShowIn", ";");
-          if (G_UNLIKELY (not_show_in != NULL))
-            {
-              /* check if "Xfce" is not specified */
-              for (m = 0; not_show_in[m] != NULL; ++m)
-                if (g_ascii_strcasecmp (not_show_in[m], "Xfce") == 0)
-                  {
-                    skip = TRUE;
-                    break;
-                  }
-
-              g_strfreev (not_show_in);
-            }
+          /* no OnlyShowIn, treat it like a normal application */
+          item->show_in_xfce = TRUE;
         }
 
       value = xfce_rc_read_entry (rc, "TryExec", NULL);
@@ -531,6 +563,7 @@ xfae_item_free (XfaeItem *item)
   g_free (item->relpath);
   g_free (item->comment);
   g_free (item->name);
+  g_free (item->tooltip);
   g_free (item);
 }
 
@@ -676,6 +709,7 @@ xfae_model_add (XfaeModel   *model,
   xfce_rc_write_entry (rc, "Name", name);
   xfce_rc_write_entry (rc, "Comment", description);
   xfce_rc_write_entry (rc, "Exec", command);
+  xfce_rc_write_entry (rc, "OnlyShowIn", "XFCE;");
   xfce_rc_write_bool_entry (rc, "StartupNotify", FALSE);
   xfce_rc_write_bool_entry (rc, "Terminal", FALSE);
   xfce_rc_write_bool_entry (rc, "Hidden", FALSE);
@@ -915,12 +949,32 @@ xfae_model_toggle (XfaeModel   *model,
       return FALSE;
     }
 
-  /* perform the toggle operation :-) */
-  item->hidden = !item->hidden;
-
-  /* write the result */
   xfce_rc_set_group (rc, "Desktop Entry");
-  xfce_rc_write_bool_entry (rc, "Hidden", item->hidden);
+
+  if (item->show_in_xfce)
+    {
+      /* This is an application with no OnlyShowIn categories or with
+       * XFCE in it. In this case, toggle the Hidden flag */
+
+      item->hidden = !item->hidden;
+      xfce_rc_write_bool_entry (rc, "Hidden", item->hidden);
+    }
+  else
+    {
+      /* Normally a non-Xfce autostart application, toggle the override
+       * boolean so we don't hide the service in other desktops */
+
+      item->show_in_override = !item->show_in_override;
+      xfce_rc_write_bool_entry (rc, "X-XFCE-Autostart-Override", item->show_in_override);
+
+      /* if we override, but the item is still hidden, toggle that as well then */
+      if (item->hidden && item->show_in_override)
+        {
+          item->hidden = !item->hidden;
+          xfce_rc_write_bool_entry (rc, "Hidden", item->hidden);
+        }
+    }
+
   xfce_rc_close (rc);
 
   /* tell the view that we have most probably a new state */
diff --git a/settings/xfae-model.h b/settings/xfae-model.h
index 1bce514..731a691 100644
--- a/settings/xfae-model.h
+++ b/settings/xfae-model.h
@@ -48,6 +48,7 @@ typedef enum
   XFAE_MODEL_COLUMN_NAME,
   XFAE_MODEL_COLUMN_ENABLED,
   XFAE_MODEL_COLUMN_REMOVABLE,
+  XFAE_MODEL_COLUMN_TOOLTIP,
   XFAE_MODEL_N_COLUMNS,
 } XfaeModelColumn;
 
diff --git a/settings/xfae-window.c b/settings/xfae-window.c
index 88fe8e7..b6f65f8 100644
--- a/settings/xfae-window.c
+++ b/settings/xfae-window.c
@@ -113,7 +113,7 @@ xfae_window_init (XfaeWindow *window)
                        "vadjustment", NULL,
                        "shadow-type", GTK_SHADOW_IN,
                        "vscrollbar-policy", GTK_POLICY_AUTOMATIC,
-                       "hscrollbar-policy", GTK_POLICY_NEVER,
+                       "hscrollbar-policy", GTK_POLICY_AUTOMATIC,
                        NULL);
   gtk_box_pack_start (GTK_BOX (vbox), swin, TRUE, TRUE, 0);
   gtk_widget_show (swin);
@@ -130,6 +130,7 @@ xfae_window_init (XfaeWindow *window)
 
   model = xfae_model_new ();
   gtk_tree_view_set_model (GTK_TREE_VIEW (window->treeview), model);
+  gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (window->treeview), XFAE_MODEL_COLUMN_TOOLTIP);
   g_object_unref (G_OBJECT (model));
 
   window->selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (window->treeview));
@@ -160,7 +161,7 @@ xfae_window_init (XfaeWindow *window)
   renderer = gtk_cell_renderer_text_new ();
   gtk_tree_view_column_pack_start (column, renderer, TRUE);
   gtk_tree_view_column_set_attributes (column, renderer,
-                                       "text", XFAE_MODEL_COLUMN_NAME,
+                                       "markup", XFAE_MODEL_COLUMN_NAME,
                                        NULL);
   renderer = gtk_cell_renderer_text_new ();
   gtk_tree_view_append_column (GTK_TREE_VIEW (window->treeview), column);
@@ -444,64 +445,3 @@ xfae_window_new (void)
 {
   return g_object_new (XFAE_TYPE_WINDOW, NULL);
 }
-
-
-
-
-#if 0
-/**
- * xfae_window_create_plug_child:
- *
- * Creates a widget that can be used to embed the window contents
- * into a GtkPlug widget. After this function call, the XfaeWindow can
- * no longer be used and has to be re-created.
- *
- * Return value: A widget holding the most important contents of the
- *               window.
- **/
-GtkWidget*
-xfae_window_create_plug_child (XfaeWindow *window)
-{
-  GtkWidget *vbox;
-  GtkWidget *bbox;
-  GtkWidget *button;
-
-  g_return_val_if_fail (XFAE_IS_WINDOW (window), NULL);
-
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
-  gtk_widget_show (vbox);
-
-  gtk_widget_reparent (window->ibox, vbox);
-  gtk_widget_show (window->ibox);
-
-  bbox = gtk_hbutton_box_new ();
-  gtk_box_set_spacing (GTK_BOX (bbox), 12);
-  gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_CENTER);
-  gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, TRUE, 0);
-  gtk_widget_show (bbox);
-
-  button = gtk_button_new_from_stock (GTK_STOCK_ADD);
-  g_signal_connect_swapped (G_OBJECT (button), "clicked",
-                            G_CALLBACK (xfae_window_add), window);
-  gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
-  g_signal_connect_swapped (G_OBJECT (button), "clicked",
-                            G_CALLBACK (xfae_window_remove), window);
-  gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  button = gtk_button_new_from_stock (GTK_STOCK_EDIT);
-  g_signal_connect_swapped (G_OBJECT (button), "clicked",
-                            G_CALLBACK (xfae_window_edit), window);
-  gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  g_signal_connect (G_OBJECT (window->selection), "changed",
-                    G_CALLBACK (xfae_window_selection_changed), button);
-  xfae_window_selection_changed (window->selection, button);
-  return vbox;
-}
-#endif
diff --git a/settings/xfae-window.h b/settings/xfae-window.h
index 6dae741..099e909 100644
--- a/settings/xfae-window.h
+++ b/settings/xfae-window.h
@@ -40,9 +40,6 @@ typedef struct _XfaeWindow      XfaeWindow;
 GType      xfae_window_get_type          (void) G_GNUC_CONST;
 
 GtkWidget *xfae_window_new               (void) G_GNUC_MALLOC;
-#if 0
-GtkWidget *xfae_window_create_plug_child (XfaeWindow *window);
-#endif
 
 G_END_DECLS;
 
diff --git a/settings/xfce4-session-settings-common.h b/settings/xfce4-session-settings-common.h
index 633a5c5..03623be 100644
--- a/settings/xfce4-session-settings-common.h
+++ b/settings/xfce4-session-settings-common.h
@@ -21,7 +21,6 @@
 
 #define  SETTINGS_CHANNEL  "xfce4-session"
 
-void startup_settings_init(GtkBuilder *builder);
 void splash_settings_init(GtkBuilder *builder);
 void session_editor_init(GtkBuilder *builder);
 
diff --git a/settings/xfce4-session-settings.glade b/settings/xfce4-session-settings.glade
index 0d0a798..b5916d9 100644
--- a/settings/xfce4-session-settings.glade
+++ b/settings/xfce4-session-settings.glade
@@ -658,7 +658,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="tooltip_text" translatable="yes">Start GNOME services, such as gnome-keyring and the GNOME accessibility framework</property>
+                                <property name="tooltip_text" translatable="yes">Start GNOME services, such as gnome-keyring</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -673,7 +673,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="tooltip_text" translatable="yes">Start KDE services, such as "kdeinit," DCOP, and ARTS</property>
+                                <property name="tooltip_text" translatable="yes">Start KDE services, such as kdeinit</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
index 3c08a78..0fdbcf5 100644
--- a/xfce4-session/xfsm-startup.c
+++ b/xfce4-session/xfsm-startup.c
@@ -311,8 +311,6 @@ xfsm_startup_autostart_xdg (XfsmManager *manager,
   const gchar *exec;
   gboolean     startup_notify;
   gboolean     terminal;
-  gboolean     gnome;
-  gboolean     kde;
   gboolean     skip;
   GError      *error = NULL;
   XfceRc      *rc;
@@ -327,10 +325,6 @@ xfsm_startup_autostart_xdg (XfsmManager *manager,
   /* migrate the old autostart location (if still present) */
   xfsm_startup_autostart_migrate ();
 
-  /* Get if we should start KDE and GNOME applications */
-  kde = xfsm_manager_get_compat_startup (manager, XFSM_MANAGER_COMPAT_KDE);
-  gnome = xfsm_manager_get_compat_startup (manager, XFSM_MANAGER_COMPAT_GNOME);
-
   /* pattern for only at-spi desktop files or everything */
   if (start_at_spi)
     pattern = "autostart/at-spi-*.desktop";
@@ -350,44 +344,44 @@ xfsm_startup_autostart_xdg (XfsmManager *manager,
       skip = xfce_rc_read_bool_entry (rc, "Hidden", FALSE);
       if (G_LIKELY (!skip))
         {
-          /* check the OnlyShowIn setting */
-          only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";");
-          if (G_UNLIKELY (only_show_in != NULL))
+          if (xfce_rc_read_bool_entry (rc, "X-XFCE-Autostart-Override", FALSE))
             {
-              /* check if "XFCE" is specified */
-              /* If we start the GNOME components, also start the applications when
-               * then "GNOME" is specified. */
-              /* If we start the KDE components, also start the applications when
-               * then "KDE" is specified. */
-              for (m = 0, skip = TRUE; only_show_in[m] != NULL; ++m)
+              /* override the OnlyShowIn check */
+              skip = FALSE;
+            }
+          else
+            {
+              /* check the OnlyShowIn setting */
+              only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";");
+              if (G_UNLIKELY (only_show_in != NULL))
                 {
-                  if ((g_ascii_strcasecmp (only_show_in[m], "XFCE") == 0) ||
-                      (gnome && g_ascii_strcasecmp (only_show_in[m], "GNOME") == 0) ||
-                      (kde && g_ascii_strcasecmp (only_show_in[m], "KDE") == 0))
+                  /* check if "XFCE" is specified */
+                  for (m = 0, skip = TRUE; only_show_in[m] != NULL; ++m)
                     {
-                      skip = FALSE;
-                      break;
+                      if (g_ascii_strcasecmp (only_show_in[m], "XFCE") == 0)
+                        {
+                          skip = FALSE;
+                          break;
+                        }
                     }
-                }
 
-              g_strfreev (only_show_in);
+                  g_strfreev (only_show_in);
+                }
             }
-          else
+
+          /* check the NotShowIn setting */
+          not_show_in = xfce_rc_read_list_entry (rc, "NotShowIn", ";");
+          if (G_UNLIKELY (not_show_in != NULL))
             {
-              /* check the NotShowIn setting */
-              not_show_in = xfce_rc_read_list_entry (rc, "NotShowIn", ";");
-              if (G_UNLIKELY (not_show_in != NULL))
-                {
-                  /* check if "Xfce" is not specified */
-                  for (m = 0; not_show_in[m] != NULL; ++m)
-                    if (g_ascii_strcasecmp (not_show_in[m], "Xfce") == 0)
-                      {
-                        skip = TRUE;
-                        break;
-                      }
-
-                  g_strfreev (not_show_in);
-                }
+              /* check if "Xfce" is not specified */
+              for (m = 0; not_show_in[m] != NULL; ++m)
+                if (g_ascii_strcasecmp (not_show_in[m], "XFCE") == 0)
+                  {
+                    skip = TRUE;
+                    break;
+                  }
+
+              g_strfreev (not_show_in);
             }
 
           /* skip at-spi launchers if not in at-spi mode or don't skip


More information about the Xfce4-commits mailing list