Re: [gpm] Sound Event Control
- From: Ted Gould <ted ubuntu com>
- To: Richard Hughes <hughsient gmail com>
- Cc: GNOME Power Manager List <gnome-power-manager-list gnome org>, David Zeuthen <david fubar dk>
- Subject: Re: [gpm] Sound Event Control
- Date: Fri, 14 Mar 2008 14:50:35 -0700
On Fri, 2008-03-14 at 08:00 +0000, Richard Hughes wrote:
> On Thu, 2008-03-13 at 22:24 -0700, Ted Gould wrote:
> > I'm thinking about taking the brute force approach of disabling the
> > lid open, close and ac remove sounds in the C code with a patch.
> > While drastic, I'm unsure with a more creative path.
>
> The lid close and lid open should should probably go, but the AC removed
> sound is very useful. Sometimes it's the only way I've noticed I've
> pulled the plug from the machine.
Is the attached patch what you were thinking?
--Ted
diff -ur gnome-power-manager-orig/data/sounds/Makefile.am gnome-power-manager-ted/data/sounds/Makefile.am
--- gnome-power-manager-orig/data/sounds/Makefile.am 2007-07-31 06:06:43.000000000 -0700
+++ gnome-power-manager-ted/data/sounds/Makefile.am 2008-03-14 14:44:01.000000000 -0700
@@ -4,8 +4,6 @@
Datadir = $(pkgdatadir)
Data_DATA = \
- gpm-lid-up.wav \
- gpm-lid-down.wav \
gpm-critical-power.wav \
gpm-suspend-failure.wav \
gpm-unplugged.wav
diff -ur gnome-power-manager-orig/src/gpm-button.c gnome-power-manager-ted/src/gpm-button.c
--- gnome-power-manager-orig/src/gpm-button.c 2007-11-09 01:12:52.000000000 -0800
+++ gnome-power-manager-ted/src/gpm-button.c 2008-03-14 14:43:33.000000000 -0700
@@ -315,7 +315,6 @@
return;
}
button->priv->lid_is_closed = TRUE;
- gpm_sound_event (button->priv->sound, GPM_SOUND_LID_DOWN);
}
if (strcmp (atype, GPM_BUTTON_LID_OPEN) == 0) {
if (button->priv->lid_is_closed == FALSE) {
@@ -323,7 +322,6 @@
return;
}
button->priv->lid_is_closed = FALSE;
- gpm_sound_event (button->priv->sound, GPM_SOUND_LID_UP);
}
/* the names changed in 0.5.8 */
diff -ur gnome-power-manager-orig/src/gpm-sound.c gnome-power-manager-ted/src/gpm-sound.c
--- gnome-power-manager-orig/src/gpm-sound.c 2008-01-21 08:24:50.000000000 -0800
+++ gnome-power-manager-ted/src/gpm-sound.c 2008-03-14 14:42:34.000000000 -0700
@@ -104,10 +104,6 @@
filename = "gpm-critical-power.wav";
} else if (action == GPM_SOUND_SUSPEND_FAILURE) {
filename = "gpm-suspend-failure.wav";
- } else if (action == GPM_SOUND_LID_UP) {
- filename = "gpm-lid-up.wav";
- } else if (action == GPM_SOUND_LID_DOWN) {
- filename = "gpm-lid-down.wav";
} else {
g_error ("enum %i not known", action);
}
diff -ur gnome-power-manager-orig/src/gpm-sound.h gnome-power-manager-ted/src/gpm-sound.h
--- gnome-power-manager-orig/src/gpm-sound.h 2007-07-01 13:29:13.000000000 -0700
+++ gnome-power-manager-ted/src/gpm-sound.h 2008-03-14 14:42:18.000000000 -0700
@@ -37,8 +37,6 @@
GPM_SOUND_AC_UNPLUGGED,
GPM_SOUND_POWER_LOW,
GPM_SOUND_SUSPEND_FAILURE,
- GPM_SOUND_LID_UP,
- GPM_SOUND_LID_DOWN,
GPM_SOUND_LAST
} GpmSoundAction;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]