diff --git a/0001-Avoid-volumes-going-over-100.patch b/0001-Avoid-volumes-going-over-100.patch new file mode 100644 index 0000000..27108e3 --- /dev/null +++ b/0001-Avoid-volumes-going-over-100.patch @@ -0,0 +1,35 @@ +From c05c9b8c19f4c735ac1809f8bc61a3c13ea42c12 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 5 Nov 2009 22:21:52 +0000 +Subject: [PATCH] Avoid volumes going over 100% + +Because we don't handle that. + +https://bugzilla.gnome.org/show_bug.cgi?id=600770 +--- + plugins/media-keys/gsd-media-keys-manager.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c +index b10fc64..86cb9d4 100644 +--- a/plugins/media-keys/gsd-media-keys-manager.c ++++ b/plugins/media-keys/gsd-media-keys-manager.c +@@ -618,11 +618,13 @@ update_dialog (GsdMediaKeysManager *manager, + guint vol, + gboolean muted) + { ++ vol = (int) (100 * (double) vol / PA_VOLUME_NORM); ++ vol = CLAMP (vol, 0, 100); ++ + dialog_init (manager); + gsd_media_keys_window_set_volume_muted (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + muted); +- gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), +- (int) (100 * (double)vol / PA_VOLUME_NORM)); ++ gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), vol); + gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + dialog_show (manager); +-- +1.6.5.2 + diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index a6e6f3b..3169d1d 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.28.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -37,6 +37,8 @@ Patch0: 0002-Use-a-rounded-instead-of-curved-rectangle.patch Patch1: 0003-Improve-the-media-keys-overlay-design.patch # https://bugzilla.gnome.org/show_bug.cgi?id=567249 Patch4: 0001-Fix-bluriness-in-level-bar-and-popup.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=600770 +Patch5: 0001-Avoid-volumes-going-over-100.patch # https://bugzilla.redhat.com/show_bug.cgi?id=498249 Patch2: left-handed-touchpad.patch @@ -66,6 +68,7 @@ developing applications that use %{name}. %patch1 -p1 -b .osd-visual-refresh %patch2 -p1 -b .left-handed-touchpad %patch3 -p1 -b .slight-hinting +%patch5 -p1 -b .too-high-volume %build %configure --enable-static=no --enable-profiling --disable-esd @@ -177,6 +180,9 @@ fi %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Thu Nov 05 2009 Bastien Nocera 2.28.1-6 +- Fix the volume going over 100% in the OSD + * Wed Oct 28 2009 Bastien Nocera 2.28.1-5 - Update OSD code again