Accepting request 87771 from X11:xfce
- added xfce4-session-fix-gnome-mode.patch which removes obsolete GNOME compatibility code, treats GNOME-/KDE-only autostart files as inactive, and allows to enable them through xfce4-session-settings (bnc#710038, bxo#8014) OBS-URL: https://build.opensuse.org/request/show/87771 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xfce4-session?expand=0&rev=43
This commit is contained in:
parent
de29ad1f5f
commit
bfb6881f57
175
xfce4-session-fix-gnome-mode.patch
Normal file
175
xfce4-session-fix-gnome-mode.patch
Normal file
@ -0,0 +1,175 @@
|
||||
diff -urNp xfce4-session-4.8.2.orig/settings/xfae-model.c xfce4-session-4.8.2/settings/xfae-model.c
|
||||
--- xfce4-session-4.8.2.orig/settings/xfae-model.c 2011-09-13 18:17:10.000000000 +0200
|
||||
+++ xfce4-session-4.8.2/settings/xfae-model.c 2011-10-08 17:37:29.000000000 +0200
|
||||
@@ -73,6 +73,7 @@ static gboolean xfae_model_ite
|
||||
static XfaeItem *xfae_item_new (const gchar *relpath);
|
||||
static void xfae_item_free (XfaeItem *item);
|
||||
static gboolean xfae_item_is_removable (XfaeItem *item);
|
||||
+static gboolean xfae_item_is_compat (XfaeItem *item);
|
||||
|
||||
|
||||
|
||||
@@ -95,6 +96,7 @@ struct _XfaeItem
|
||||
GdkPixbuf *icon;
|
||||
gchar *comment;
|
||||
gchar *relpath;
|
||||
+ gchar **only_show_in;
|
||||
gboolean hidden;
|
||||
};
|
||||
|
||||
@@ -287,7 +289,7 @@ xfae_model_get_value (GtkTreeModel *tree
|
||||
|
||||
case XFAE_MODEL_COLUMN_ENABLED:
|
||||
g_value_init (value, G_TYPE_BOOLEAN);
|
||||
- g_value_set_boolean (value, !item->hidden);
|
||||
+ g_value_set_boolean (value, !(item->hidden || xfae_item_is_compat (item)));
|
||||
break;
|
||||
|
||||
case XFAE_MODEL_COLUMN_REMOVABLE:
|
||||
@@ -401,7 +403,6 @@ xfae_item_new (const gchar *relpath)
|
||||
XfaeItem *item = NULL;
|
||||
gboolean skip = FALSE;
|
||||
XfceRc *rc;
|
||||
- gchar **only_show_in;
|
||||
gchar **not_show_in;
|
||||
gchar **args;
|
||||
gchar *icon_name;
|
||||
@@ -457,18 +458,18 @@ xfae_item_new (const gchar *relpath)
|
||||
}
|
||||
|
||||
/* check the OnlyShowIn setting */
|
||||
- only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";");
|
||||
- if (G_UNLIKELY (only_show_in != NULL))
|
||||
+ item->only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";");
|
||||
+ if (G_UNLIKELY (item->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", "GNOME", or "KDE" are specified */
|
||||
+ for (m = 0, skip = TRUE; item->only_show_in[m] != NULL; ++m)
|
||||
+ if ((g_ascii_strcasecmp (item->only_show_in[m], "Xfce") == 0) ||
|
||||
+ (g_ascii_strcasecmp (item->only_show_in[m], "GNOME") == 0) ||
|
||||
+ (g_ascii_strcasecmp (item->only_show_in[m], "KDE") == 0))
|
||||
{
|
||||
skip = FALSE;
|
||||
break;
|
||||
}
|
||||
-
|
||||
- g_strfreev (only_show_in);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -515,6 +516,7 @@ xfae_item_free (XfaeItem *item)
|
||||
g_free (item->relpath);
|
||||
g_free (item->comment);
|
||||
g_free (item->name);
|
||||
+ g_strfreev (item->only_show_in);
|
||||
g_free (item);
|
||||
}
|
||||
|
||||
@@ -545,6 +547,32 @@ xfae_item_is_removable (XfaeItem *item)
|
||||
|
||||
|
||||
static gboolean
|
||||
+xfae_item_is_compat (XfaeItem *item)
|
||||
+{
|
||||
+ gint m;
|
||||
+ gboolean is_compat = FALSE;
|
||||
+
|
||||
+ if (item->only_show_in != NULL)
|
||||
+ {
|
||||
+ for (m = 0; item->only_show_in[m] != NULL; ++m)
|
||||
+ {
|
||||
+ if (g_ascii_strcasecmp (item->only_show_in[m], "Xfce") == 0)
|
||||
+ {
|
||||
+ is_compat = FALSE;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if ((g_ascii_strcasecmp (item->only_show_in[m], "GNOME") == 0) ||
|
||||
+ (g_ascii_strcasecmp (item->only_show_in[m], "KDE") == 0))
|
||||
+ is_compat = TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return is_compat;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+static gboolean
|
||||
xfae_item_remove (XfaeItem *item,
|
||||
GError **error)
|
||||
{
|
||||
@@ -899,12 +927,26 @@ xfae_model_toggle (XfaeModel *model,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- /* perform the toggle operation :-) */
|
||||
- item->hidden = !item->hidden;
|
||||
+ if (xfae_item_is_compat (item))
|
||||
+ {
|
||||
+ guint len;
|
||||
+
|
||||
+ /* append "XFCE;" to "OnlyShowIn" */
|
||||
+ len = g_strv_length (item->only_show_in) + 2;
|
||||
+ item->only_show_in = g_realloc_n (item->only_show_in, (gsize) len, sizeof (gchar *));
|
||||
+ item->only_show_in[len - 3] = g_strdup ("XFCE");
|
||||
+ item->only_show_in[len - 2] = g_strdup (""); /* force trailing semicolon */
|
||||
+ item->only_show_in[len - 1] = NULL;
|
||||
+
|
||||
+ item->hidden = FALSE;
|
||||
+ }
|
||||
+ else
|
||||
+ item->hidden = !item->hidden;
|
||||
|
||||
/* write the result */
|
||||
xfce_rc_set_group (rc, "Desktop Entry");
|
||||
xfce_rc_write_bool_entry (rc, "Hidden", item->hidden);
|
||||
+ xfce_rc_write_list_entry (rc, "OnlyShowIn", item->only_show_in, ";");
|
||||
xfce_rc_close (rc);
|
||||
|
||||
/* tell the view that we have most probably a new state */
|
||||
diff -urNp xfce4-session-4.8.2.orig/xfce4-session/xfsm-compat-gnome.c xfce4-session-4.8.2/xfce4-session/xfsm-compat-gnome.c
|
||||
--- xfce4-session-4.8.2.orig/xfce4-session/xfsm-compat-gnome.c 2011-09-13 18:17:17.000000000 +0200
|
||||
+++ xfce4-session-4.8.2/xfce4-session/xfsm-compat-gnome.c 2011-10-07 17:14:02.000000000 +0200
|
||||
@@ -294,7 +294,9 @@ xfsm_compat_gnome_startup (XfsmSplashScr
|
||||
if (G_UNLIKELY (gnome_compat_started))
|
||||
return;
|
||||
|
||||
+#if 0
|
||||
xfsm_compat_gnome_smproxy_startup ();
|
||||
+#endif
|
||||
|
||||
/* fire up the keyring daemon */
|
||||
if (G_LIKELY (splash != NULL))
|
||||
@@ -342,6 +344,7 @@ xfsm_compat_gnome_shutdown (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if 0
|
||||
/* shutdown the GConf daemon */
|
||||
if (!g_spawn_command_line_sync ("gconftool-2 --shutdown", NULL,
|
||||
NULL, &status, &error))
|
||||
@@ -357,6 +360,7 @@ xfsm_compat_gnome_shutdown (void)
|
||||
}
|
||||
|
||||
xfsm_compat_gnome_smproxy_shutdown ();
|
||||
+#endif
|
||||
|
||||
gnome_compat_started = FALSE;
|
||||
}
|
||||
diff -urNp xfce4-session-4.8.2.orig/xfce4-session/xfsm-startup.c xfce4-session-4.8.2/xfce4-session/xfsm-startup.c
|
||||
--- xfce4-session-4.8.2.orig/xfce4-session/xfsm-startup.c 2011-09-13 18:17:17.000000000 +0200
|
||||
+++ xfce4-session-4.8.2/xfce4-session/xfsm-startup.c 2011-10-07 17:14:02.000000000 +0200
|
||||
@@ -352,9 +352,7 @@ xfsm_startup_autostart_xdg (XfsmManager
|
||||
* then "KDE" is specified. */
|
||||
for (m = 0, skip = TRUE; only_show_in[m] != NULL; ++m)
|
||||
{
|
||||
- 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))
|
||||
+ if (g_ascii_strcasecmp (only_show_in[m], "XFCE") == 0)
|
||||
{
|
||||
skip = FALSE;
|
||||
break;
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 8 16:22:18 UTC 2011 - gber@opensuse.org
|
||||
|
||||
- added xfce4-session-fix-gnome-mode.patch which removes obsolete
|
||||
GNOME compatibility code, treats GNOME-/KDE-only autostart files
|
||||
as inactive, and allows to enable them through
|
||||
xfce4-session-settings (bnc#710038, bxo#8014)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 19 13:38:57 UTC 2011 - gber@opensuse.org
|
||||
|
||||
|
@ -27,6 +27,8 @@ Group: System/GUI/XFCE
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
# PATCH-FEATURE-OPENSUSE xfce4-session-simple-splash-remove-shadows.patch gber@opensuse.org -- Improves readability of the simple splash engine text by removing the text shadows
|
||||
Patch0: xfce4-session-simple-splash-remove-shadows.patch
|
||||
# PATCH-FIX-UPSTREAM xfce4-session-fix-gnome-mode.patch bnc#710038 bxo#8014 gber@opensuse.org -- Removes obsolete GNOME compatibility code, treats GNOME-/KDE-only autostart files as inactive, and allows to enable them through xfce4-session-settings
|
||||
Patch1: xfce4-session-fix-gnome-mode.patch
|
||||
BuildRequires: intltool
|
||||
BuildRequires: perl-XML-Parser
|
||||
BuildRequires: pkgconfig(dbus-glib-1)
|
||||
@ -87,6 +89,7 @@ This package provides the upstream look and feel for the Xfce Session Manager.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
|
Loading…
Reference in New Issue
Block a user