OBS User unknown 2008-04-21 16:43:54 +00:00 committed by Git OBS Bridge
parent d3deef8631
commit 30635036e3
4 changed files with 22 additions and 138 deletions

View File

@ -1,120 +0,0 @@
Index: gnome-session/gsm-sound.c
===================================================================
--- gnome-session/gsm-sound.c.orig
+++ gnome-session/gsm-sound.c
@@ -10,6 +10,8 @@
#include "util.h"
#include <libgnome/libgnome.h>
+#include <libgnome/gnome-util.h>
+#include <libgnome/gnome-config.h>
#define ENABLE_SOUND_KEY "/desktop/gnome/sound/enable_esd"
#define ENABLE_EVENT_SOUNDS_KEY "/desktop/gnome/sound/event_sounds"
@@ -69,7 +71,7 @@ reset_esd_pid (GPid pid,
static void
start_esd (void)
{
- gchar *argv[] = {ESD_SERVER, "-nobeeps", NULL};
+ gchar *argv[] = {ESD_SERVER, "-terminate", "-nobeeps", NULL};
GError *err = NULL;
time_t starttime;
@@ -93,6 +95,81 @@ start_esd (void)
}
}
+
+static gboolean
+load_login_sample_from (const char *file,
+ gboolean *isset)
+{
+ char *key;
+ char *sample_file;
+ int sample_id;
+
+ if (!file)
+ return FALSE;
+
+ key = g_strconcat ("=", file, "=login/file", NULL);
+ sample_file = gnome_config_get_string (key);
+ g_free (key);
+
+ if (sample_file && isset)
+ *isset = TRUE;
+ else if (isset)
+ *isset = FALSE;
+
+ if (sample_file && *sample_file && *sample_file != '/')
+ {
+ char *tmp_sample_file;
+ tmp_sample_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_SOUND, sample_file, TRUE, NULL);
+ g_free (sample_file);
+ sample_file = tmp_sample_file;
+ }
+
+ if (!(sample_file && *sample_file))
+ {
+ g_free (sample_file);
+ return FALSE;
+ }
+
+ sample_id = esd_sample_getid (gnome_sound_connection_get (), "gnome-2/login");
+ if (sample_id >= 0)
+ esd_sample_free (gnome_sound_connection_get (), sample_id);
+
+ sample_id = gnome_sound_sample_load ("gnome-2/login", sample_file);
+
+ if (sample_id < 0)
+ {
+ g_warning ("Couldn't load sound file %s\n", sample_file);
+ return FALSE;
+ }
+
+ g_free (sample_file);
+
+ return TRUE;
+}
+
+#define SOUND_EVENT_FILE "sound/events/gnome-2.soundlist"
+ static gboolean
+load_login_sample (void)
+{
+ char *s;
+ gboolean loaded;
+ gboolean isset;
+
+ s = gnome_util_home_file (SOUND_EVENT_FILE);
+ loaded = load_login_sample_from (s, &isset);
+ g_free (s);
+
+ if (isset)
+ return loaded;
+
+ s = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_CONFIG, SOUND_EVENT_FILE, TRUE, NULL);
+ loaded = load_login_sample_from (s, NULL);
+ g_free (s);
+
+ return loaded;
+}
+
+
static void
stop_esd (void)
{
@@ -126,7 +203,7 @@ sound_init (void)
return FALSE;
}
- return TRUE;
+ return load_login_sample();
}
static void
@@ -229,6 +306,4 @@ gsm_sound_logout (void)
{
if (sound_events_enabled ())
play_sound_event ("logout");
-
- sound_shutdown ();
}

View File

@ -1,10 +1,9 @@
Index: gnome-session/main.c
===================================================================
--- gnome-session/main.c.orig
+++ gnome-session/main.c
@@ -37,12 +37,16 @@
#include <libgnomeui/gnome-window-icon.h>
diff -Naurp gnome-session-2.22.1.1/gnome-session/main.c gnome-session-2.22.1.1-patched/gnome-session/main.c
--- gnome-session-2.22.1.1/gnome-session/main.c 2008-04-10 16:32:20.000000000 +0200
+++ gnome-session-2.22.1.1-patched/gnome-session/main.c 2008-04-21 12:38:40.112936000 +0200
@@ -41,12 +41,16 @@
#include <libgnomeui/gnome-ui-init.h>
#include <libgnome/gnome-config.h>
+#include <gdk/gdkx.h>
+
@ -19,7 +18,7 @@ Index: gnome-session/main.c
#include "gsm-dbus.h"
#include "gsm-sound.h"
#include "gsm-gsd.h"
@@ -192,6 +196,84 @@ gsm_shutdown_gconfd (void)
@@ -600,6 +604,84 @@ gsm_shutdown_gconfd (void)
g_free (command);
}
@ -104,12 +103,12 @@ Index: gnome-session/main.c
int
main (int argc, char *argv[])
{
@@ -363,6 +445,8 @@ main (int argc, char *argv[])
putenv (session_name_env);
@@ -777,6 +859,8 @@ main (int argc, char *argv[])
g_setenv ("GNOME_DESKTOP_SESSION_ID", session_name, TRUE);
the_session = read_session (session_name);
+ fix_wm (the_session);
+
gsm_sound_login ();
gsm_remote_desktop_start ();
if (splashing)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 21 12:34:16 CEST 2008 - vuntz@suse.de
- Drop gnome-session-sound.patch, it's fixed another way upstream.
- Update gnome-session-wm-switch.patch so that it applies.
-------------------------------------------------------------------
Wed Apr 16 16:12:30 CEST 2008 - jpr@suse.de

View File

@ -16,7 +16,7 @@ BuildRequires: control-center2-devel fdupes gnome-common gnome-desktop-devel gn
License: GPL v2 or later; LGPL v2.1 or later
Group: System/GUI/GNOME
Version: 2.22.1.1
Release: 7
Release: 10
Summary: Session Tools for the GNOME 2.x Desktop
Source: %{name}-%{version}.tar.bz2
Source1: gnome
@ -44,9 +44,6 @@ Patch13: gnome-session-no-devel-fatals.patch
Patch14: gnome-session-tile-ui.patch
#PATCH-FIX-UPSTREAM gnome-session-2.20.0-safe-a11y-startup.patch bnc302316 bgo469958 cgaisford@novell.com -- hpj@novell.com modified this for bnc332498
Patch15: gnome-session-2.20.0-safe-a11y-startup.patch
#PATCH-FIX-UPSTREAM gnome-session-sound.patch bnc294396 bgo466458 cgaisford@novell.com -- there is a newer version upstream from mandriva
#PATCH-NEEDS-REBASE gnome-session-sound.patch
Patch16: gnome-session-sound.patch
#PATCH-FIX-OPENSUSE gnome-session-sound.patch bnc294396 bgo466458 cgaisford@novell.com -- there is a newer version upstream from mandriva
Patch17: gnome-session-gcc4.3-fixes.patch
Url: http://www.gnome.org
@ -119,11 +116,10 @@ gnome-patch-translation-prepare
%patch7
%patch8
%patch10
#%patch12
%patch12 -p1
%patch13
%patch14 -p1
%patch15 -p1
#%patch16
%patch17 -p1
%patch18
%patch19 -p0
@ -181,6 +177,9 @@ rm -rf $RPM_BUILD_ROOT
%files lang -f %{name}-2.0.lang
%changelog
* Mon Apr 21 2008 vuntz@suse.de
- Drop gnome-session-sound.patch, it's fixed another way upstream.
- Update gnome-session-wm-switch.patch so that it applies.
* Wed Apr 16 2008 jpr@suse.de
- Check for existence of
/usr/share/applications/YaST2/live-installer.desktop to indicate