diff options
author | Pacho Ramos <pacho@gentoo.org> | 2011-09-12 10:01:54 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2011-09-12 10:01:54 +0000 |
commit | 1db42854d95c6db4265edb9d76ebf8d54c99d29e (patch) | |
tree | 26c5747948a5318c01932d478d690c875e4b059f /gnome-base | |
parent | version bump (diff) | |
download | gentoo-2-1db42854d95c6db4265edb9d76ebf8d54c99d29e.tar.gz gentoo-2-1db42854d95c6db4265edb9d76ebf8d54c99d29e.tar.bz2 gentoo-2-1db42854d95c6db4265edb9d76ebf8d54c99d29e.zip |
Also support Gsettings conditions to work with latest libcanberra, fix race condition in idle monitor, fix dialog size, pull in x11-misc/xdg-user-dirs stuff as done in gnome-session-3. Remove old.
(Portage version: 2.1.10.14/cvs/Linux x86_64)
Diffstat (limited to 'gnome-base')
-rw-r--r-- | gnome-base/gnome-session/ChangeLog | 14 | ||||
-rw-r--r-- | gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size.patch | 21 | ||||
-rw-r--r-- | gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size2.patch | 25 | ||||
-rw-r--r-- | gnome-base/gnome-session/files/gnome-session-2.32.1-gsettings-conditions.patch | 135 | ||||
-rw-r--r-- | gnome-base/gnome-session/files/gnome-session-2.32.1-idle-transition.patch | 37 | ||||
-rw-r--r-- | gnome-base/gnome-session/gnome-session-2.32.1-r3.ebuild (renamed from gnome-base/gnome-session/gnome-session-2.32.1.ebuild) | 43 |
6 files changed, 268 insertions, 7 deletions
diff --git a/gnome-base/gnome-session/ChangeLog b/gnome-base/gnome-session/ChangeLog index 0ec49255e81a..b052b0b5b640 100644 --- a/gnome-base/gnome-session/ChangeLog +++ b/gnome-base/gnome-session/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for gnome-base/gnome-session # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/ChangeLog,v 1.295 2011/08/19 12:07:06 nirbheek Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/ChangeLog,v 1.296 2011/09/12 10:01:54 pacho Exp $ + +*gnome-session-2.32.1-r3 (12 Sep 2011) + + 12 Sep 2011; Pacho Ramos <pacho@gentoo.org> -gnome-session-2.32.1.ebuild, + +gnome-session-2.32.1-r3.ebuild, + +files/gnome-session-2.32.1-dialog-size.patch, + +files/gnome-session-2.32.1-dialog-size2.patch, + +files/gnome-session-2.32.1-gsettings-conditions.patch, + +files/gnome-session-2.32.1-idle-transition.patch: + Also support Gsettings conditions to work with latest libcanberra, fix race + condition in idle monitor, fix dialog size, pull in x11-misc/xdg-user-dirs + stuff as done in gnome-session-3. Remove old. 19 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org> gnome-session-3.0.2.ebuild: diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size.patch new file mode 100644 index 000000000000..c5cfcebbfd8b --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size.patch @@ -0,0 +1,21 @@ +From 8c4cdd5304929d19a27f876eb9cb5bbb67a4d59f Mon Sep 17 00:00:00 2001 +From: Vincent Untz <vuntz@gnome.org> +Date: Mon, 29 Nov 2010 21:44:03 +0000 +Subject: capplet: Give the dialog a reasonable default height + +https://bugzilla.gnome.org/show_bug.cgi?id=635891 +--- +diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c +index 4432b09..8b51169 100644 +--- a/capplet/gsm-properties-dialog.c ++++ b/capplet/gsm-properties-dialog.c +@@ -784,6 +784,7 @@ gsm_properties_dialog_init (GsmPropertiesDialog *dialog) + "main-notebook")); + gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); + ++ gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 450); + gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); + gtk_box_set_spacing (GTK_BOX (content_area), 2); +-- +cgit v0.9.0.2 diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size2.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size2.patch new file mode 100644 index 000000000000..39a02806d599 --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size2.patch @@ -0,0 +1,25 @@ +From 6fd301895a39fc32f302ea3fced74fc03e5c75c9 Mon Sep 17 00:00:00 2001 +From: Vincent Untz <vuntz@gnome.org> +Date: Mon, 29 Nov 2010 21:47:00 +0000 +Subject: capplet: Also give the dialog a reasonable width + +We don't want to depend on the natural size, which depends on the length +of strings for this. + +https://bugzilla.gnome.org/show_bug.cgi?id=635891 +--- +diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c +index 8b51169..487250e 100644 +--- a/capplet/gsm-properties-dialog.c ++++ b/capplet/gsm-properties-dialog.c +@@ -784,7 +784,7 @@ gsm_properties_dialog_init (GsmPropertiesDialog *dialog) + "main-notebook")); + gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); + +- gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 450); ++ gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 450); + gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); + gtk_box_set_spacing (GTK_BOX (content_area), 2); +-- +cgit v0.9.0.2 diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-gsettings-conditions.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-gsettings-conditions.patch new file mode 100644 index 000000000000..9c272375e3eb --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-gsettings-conditions.patch @@ -0,0 +1,135 @@ +--- gnome-session/gsm-autostart-app.c.old 2011-09-12 11:06:20.552420744 +0200 ++++ gnome-session/gsm-autostart-app.c 2011-09-12 11:18:39.934966203 +0200 +@@ -66,6 +66,7 @@ + + GFileMonitor *condition_monitor; + guint condition_notify_id; ++ GSettings *condition_settings; + + int launch_type; + GPid pid; +@@ -164,6 +165,8 @@ + kind = GSM_CONDITION_UNLESS_EXISTS; + } else if (!g_ascii_strncasecmp (condition_string, "GNOME", len)) { + kind = GSM_CONDITION_GNOME; ++ } else if (!g_ascii_strncasecmp (condition_string, "GSettings", len)) { ++ kind = GSM_CONDITION_GSETTINGS; + } else if (!g_ascii_strncasecmp (condition_string, "GNOME3", len)) { + condition_string = key; + space = condition_string + strcspn (condition_string, " "); +@@ -289,6 +292,81 @@ + } + + static void ++gsettings_condition_cb (GSettings *settings, ++ const char *key, ++ gpointer user_data) ++{ ++ GsmApp *app; ++ GsmAutostartAppPrivate *priv; ++ gboolean condition; ++ ++ g_return_if_fail (GSM_IS_APP (user_data)); ++ ++ app = GSM_APP (user_data); ++ ++ priv = GSM_AUTOSTART_APP (app)->priv; ++ ++ condition = g_settings_get_boolean (settings, key); ++ ++ g_debug ("GsmAutostartApp: app:%s condition changed condition:%d", ++ gsm_app_peek_id (app), ++ condition); ++ ++ /* Emit only if the condition actually changed */ ++ if (condition != priv->condition) { ++ priv->condition = condition; ++ g_signal_emit (app, signals[CONDITION_CHANGED], 0, condition); ++ } ++} ++ ++static gboolean ++setup_gsettings_condition_monitor (GsmAutostartApp *app, ++ const char *key) ++{ ++ GSettings *settings; ++ const char * const *schemas; ++ char **elems; ++ gboolean schema_exists; ++ guint i; ++ gboolean retval; ++ char *signal; ++ ++ elems = g_strsplit (key, " ", 2); ++ if (elems == NULL) ++ return FALSE; ++ if (elems[0] == NULL || elems[1] == NULL) { ++ g_strfreev (elems); ++ return FALSE; ++ } ++ ++ schemas = g_settings_list_schemas (); ++ schema_exists = FALSE; ++ for (i = 0; schemas[i] != NULL; i++) { ++ if (g_str_equal (schemas[i], elems[0])) { ++ schema_exists = TRUE; ++ break; ++ } ++ } ++ ++ if (schema_exists == FALSE) ++ return FALSE; ++ ++ settings = g_settings_new (elems[0]); ++ retval = g_settings_get_boolean (settings, elems[1]); ++ ++ signal = g_strdup_printf ("changed::%s", elems[1]); ++ g_signal_connect (G_OBJECT (settings), signal, ++ G_CALLBACK (gsettings_condition_cb), app); ++ g_free (signal); ++ ++ app->priv->condition_settings = settings; ++ ++ g_strfreev (elems); ++ ++ return retval; ++} ++ ++static void + setup_condition_monitor (GsmAutostartApp *app) + { + guint kind; +@@ -383,6 +461,8 @@ + gconf_condition_cb, + app, NULL, NULL); + g_object_unref (client); ++ } else if (kind == GSM_CONDITION_GSETTINGS) { ++ disabled = !setup_gsettings_condition_monitor (app, key); + } else if (kind == GSM_CONDITION_IF_SESSION) { + /* We treat GNOME 2.32 as the same as gnome-fallback */ + disabled = strcmp ("gnome-fallback", key) != 0; +@@ -578,6 +658,11 @@ + priv->condition_string = NULL; + } + ++ if (priv->condition_settings) { ++ g_object_unref (priv->condition_settings); ++ priv->condition_settings = NULL; ++ } ++ + if (priv->desktop_file) { + egg_desktop_file_free (priv->desktop_file); + priv->desktop_file = NULL; +@@ -672,6 +757,12 @@ + g_assert (GCONF_IS_CLIENT (client)); + disabled = !gconf_client_get_bool (client, key, NULL); + g_object_unref (client); ++ } else if (kind == GSM_CONDITION_GSETTINGS && ++ priv->condition_settings != NULL) { ++ char **elems; ++ elems = g_strsplit (key, " ", 2); ++ disabled = !g_settings_get_boolean (priv->condition_settings, elems[1]); ++ g_strfreev (elems); + } else if (kind == GSM_CONDITION_IF_SESSION) { + /* We treat GNOME 2.32 as the same as gnome-fallback */ + disabled = strcmp ("gnome-fallback", key) != 0; diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-idle-transition.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-idle-transition.patch new file mode 100644 index 000000000000..4fb215151d12 --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-idle-transition.patch @@ -0,0 +1,37 @@ +From 861313503a741f0129611ca005cf6d7c27124b54 Mon Sep 17 00:00:00 2001 +From: Christopher Halse Rogers <chalserogers@gmail.com> +Date: Thu, 26 May 2011 09:09:14 +0000 +Subject: gsm: Fix race condition in idle monitor + +In _xsync_alarm_set(), the positive and negative transition intervals +are set to the same value. However, the SYNC extension defines the +positive transition as set when the counter goes from strictly below the +threshold to greater than or equal to the threshold and similarly a +negative transition is triggered when the counter goes form strictly +greater than the threshold to less than or equal to the threshold. + +Thus in the current set up there's a chance that the positive transition +can trigger, marking the session as idle, and some user input occur on +the same click so the IDLETIME count will hit the threshold but not go +above so the negative transition will not trigger. Thus the session will +not be marked as active. + +The negative transition threshold should be set to 1ms less than the +positive transition to ensure that it always fires. + +https://bugzilla.gnome.org/show_bug.cgi?id=627903 +--- +diff --git a/gnome-session/gs-idle-monitor.c b/gnome-session/gs-idle-monitor.c +index cd38dcb..d25144f 100644 +--- a/gnome-session/gs-idle-monitor.c ++++ b/gnome-session/gs-idle-monitor.c +@@ -463,6 +463,7 @@ _xsync_alarm_set (GSIdleMonitor *monitor, + watch->xalarm_positive = XSyncCreateAlarm (monitor->priv->display, flags, &attr); + } + ++ attr.trigger.wait_value = _int64_to_xsyncvalue (_xsyncvalue_to_int64 (watch->interval) - 1); + attr.trigger.test_type = XSyncNegativeTransition; + if (watch->xalarm_negative != None) { + g_debug ("GSIdleMonitor: updating alarm for negative transition wait=%lld", +-- +cgit v0.9.0.2 diff --git a/gnome-base/gnome-session/gnome-session-2.32.1.ebuild b/gnome-base/gnome-session/gnome-session-2.32.1-r3.ebuild index fd4691c2a6f7..2e9424e5a04e 100644 --- a/gnome-base/gnome-session/gnome-session-2.32.1.ebuild +++ b/gnome-base/gnome-session/gnome-session-2.32.1-r3.ebuild @@ -1,9 +1,10 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/gnome-session-2.32.1.ebuild,v 1.11 2011/03/22 19:11:59 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/gnome-session-2.32.1-r3.ebuild,v 1.1 2011/09/12 10:01:54 pacho Exp $ -EAPI="3" +EAPI="4" GCONF_DEBUG="yes" +GNOME_TARBALL_SUFFIX="bz2" inherit autotools eutils gnome2 @@ -12,10 +13,13 @@ HOMEPAGE="http://www.gnome.org/" LICENSE="GPL-2 LGPL-2 FDL-1.1" SLOT="0" -KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" IUSE="doc ipv6 elibc_FreeBSD" +# x11-misc/xdg-user-dirs{,-gtk} are needed to create the various XDG_*_DIRs, and +# create .config/user-dirs.dirs which is read by glib to get G_USER_DIRECTORY_* +# xdg-user-dirs-update is run during login (see 10-user-dirs-update below). RDEPEND=">=dev-libs/glib-2.16:2 >=x11-libs/gtk+-2.22.0:2 >=dev-libs/dbus-glib-0.76 @@ -28,7 +32,10 @@ RDEPEND=">=dev-libs/glib-2.16:2 x11-libs/libX11 x11-libs/libXext x11-libs/libXtst - x11-apps/xdpyinfo" + x11-apps/xdpyinfo + + x11-misc/xdg-user-dirs + x11-misc/xdg-user-dirs-gtk" DEPEND="${RDEPEND} >=dev-lang/perl-5 >=sys-devel/gettext-0.10.40 @@ -59,6 +66,19 @@ src_prepare() { # Add "session saving" button back, upstream bug #575544 epatch "${FILESDIR}/${PN}-2.32.0-session-saving-button.patch" + # Fix support for GNOME3 conditions, bug #XXXXXX + epatch "${FILESDIR}/${PN}-2.32.1-gnome3-conditions.patch" + + # Also support Gsettings conditions to work with libcanberra + epatch "${FILESDIR}/${PN}-2.32.1-gsettings-conditions.patch" + + # gsm: Fix race condition in idle monitor + epatch "${FILESDIR}/${PN}-2.32.1-idle-transition.patch" + + # Fix dialog size + epatch "${FILESDIR}/${PN}-2.32.1-dialog-size.patch" + epatch "${FILESDIR}/${PN}-2.32.1-dialog-size2.patch" + intltoolize --force --copy --automake || die "intltoolize failed" eautoreconf } @@ -66,7 +86,18 @@ src_prepare() { src_install() { gnome2_src_install - dodir /etc/X11/Sessions || die "dodir failed" + dodir /etc/X11/Sessions exeinto /etc/X11/Sessions - doexe "${FILESDIR}/Gnome" || die "doexe failed" + doexe "${FILESDIR}/Gnome" + + dodir /usr/share/gnome/applications/ + insinto /usr/share/gnome/applications/ + doins "${FILESDIR}/defaults.list" + + dodir /etc/X11/xinit/xinitrc.d/ + exeinto /etc/X11/xinit/xinitrc.d/ + doexe "${FILESDIR}/15-xdg-data-gnome" + + # FIXME: this should be done by x11-misc/xdg-user-dirs + doexe "${FILESDIR}/10-user-dirs-update" } |