Fix if-session

This commit is contained in:
Matthias Clasen 2011-02-28 19:46:27 -05:00
parent 880143a2ab
commit 11ec966011
2 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,54 @@
From 6131a4cfba214b89d0197510a4f4cab33a160bfd Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Mon, 28 Feb 2011 19:43:32 -0500
Subject: [PATCH] gsm_manager_get does not return a reference
This causes gnome-session to crash and burn whenever the new
if-session condition is used.
---
gnome-session/gsm-autostart-app.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c
index 81e66ce..05285d7 100644
--- a/gnome-session/gsm-autostart-app.c
+++ b/gnome-session/gsm-autostart-app.c
@@ -548,8 +548,6 @@ setup_condition_monitor (GsmAutostartApp *app)
g_signal_connect (manager, "notify::session-name",
G_CALLBACK (if_session_condition_cb), app);
g_free (session_name);
-
- g_object_unref (manager);
} else if (kind == GSM_CONDITION_UNLESS_SESSION) {
GsmManager *manager;
char *session_name;
@@ -563,8 +561,6 @@ setup_condition_monitor (GsmAutostartApp *app)
g_signal_connect (manager, "notify::session-name",
G_CALLBACK (unless_session_condition_cb), app);
g_free (session_name);
-
- g_object_unref (manager);
} else {
disabled = TRUE;
}
@@ -869,8 +865,6 @@ is_conditionally_disabled (GsmApp *app)
g_object_get (manager, "session-name", &session_name, NULL);
disabled = strcmp (session_name, key) != 0;
g_free (session_name);
-
- g_object_unref (manager);
} else if (kind == GSM_CONDITION_UNLESS_SESSION) {
GsmManager *manager;
char *session_name;
@@ -881,8 +875,6 @@ is_conditionally_disabled (GsmApp *app)
g_object_get (manager, "session-name", &session_name, NULL);
disabled = strcmp (session_name, key) == 0;
g_free (session_name);
-
- g_object_unref (manager);
} else {
disabled = TRUE;
}
--
1.7.4.1

View File

@ -3,7 +3,7 @@
Summary: GNOME session manager Summary: GNOME session manager
Name: gnome-session Name: gnome-session
Version: 2.91.90 Version: 2.91.90
Release: 4%{?dist} Release: 5%{?dist}
URL: http://www.gnome.org URL: http://www.gnome.org
#VCS: git:git://git.gnome.org/gnome-session #VCS: git:git://git.gnome.org/gnome-session
Source0: http://download.gnome.org/sources/gnome-session/2.91/%{name}-%{version}.tar.bz2 Source0: http://download.gnome.org/sources/gnome-session/2.91/%{name}-%{version}.tar.bz2
@ -69,6 +69,7 @@ Requires(postun): /usr/bin/gtk-update-icon-cache
Requires: dconf Requires: dconf
Patch0: fix-crashity-crash-crash.patch Patch0: fix-crashity-crash-crash.patch
Patch1: 0001-gsm_manager_get-does-not-return-a-reference.patch
%description %description
gnome-session manages a GNOME desktop or GDM login session. It starts up gnome-session manages a GNOME desktop or GDM login session. It starts up
@ -85,6 +86,7 @@ Desktop file to add GNOME to display manager session menu.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .fix-crashity-crash-crash %patch0 -p1 -b .fix-crashity-crash-crash
%patch1 -p1 -b .make-if-session-work
echo "ACLOCAL_AMFLAGS = -I m4" >> Makefile.am echo "ACLOCAL_AMFLAGS = -I m4" >> Makefile.am
@ -163,6 +165,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas || :
%{_datadir}/glib-2.0/schemas/org.gnome.SessionManager.gschema.xml %{_datadir}/glib-2.0/schemas/org.gnome.SessionManager.gschema.xml
%changelog %changelog
* Mon Feb 28 2011 Matthias Clasen <mclasen@redhat.com> 2.91.90-5
- Make the new if-session Autostart condition work
* Mon Feb 28 2011 Matthias Clasen <mclasen@redhat.com> 2.91.90-4 * Mon Feb 28 2011 Matthias Clasen <mclasen@redhat.com> 2.91.90-4
- Fix the autostart syntax - Fix the autostart syntax