[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.5-82-g48f4eda
Luca Niccoli
lultimouomo at gmail.com
Wed Nov 17 15:03:21 UTC 2010
The following commit has been merged in the master branch:
commit 904483f9f41da78f5002e67da73010b3e2f31020
Author: Luca Niccoli <lultimouomo at gmail.com>
Date: Wed Nov 17 16:01:27 2010 +0100
Fix DBus notifications and set reasonable defaults for icons.
Signed-off-by: Luca Niccoli <lultimouomo at gmail.com>
diff --git a/acpilib/notify.sh b/acpilib/notify.sh
index cddadb5..88cba84 100644
--- a/acpilib/notify.sh
+++ b/acpilib/notify.sh
@@ -2,15 +2,17 @@
#
# this file is to be sourced
+. /usr/share/acpi-support/power-funcs
notify() {
CATEGORY=$1
MSG=$2
- ICON_bluetooth=" "
- ICON_super_hybrid_engine=" "
- ICON_error=" "
- ICON_camera=" "
- ICON_touchpad=" "
- ICON_gsm=" "
+ ICON_bluetooth="bluetooth"
+ ICON_super_hybrid_engine="battery"
+ ICON_error="error"
+ ICON_camera="camera"
+ ICON_touchpad="input-touchpad"
+ ICON_gsm="gsm"
+ ICON_wifi="network-wireless"
if [ -n "$4" -o \( -n "$3" -a "$3" != 'fast' \) ]; then
echo "usage: notify 'category' 'message text' [fast]" > /dev/stderr
@@ -29,7 +31,11 @@ notify() {
fi
if [ -x /usr/bin/notify-send ]; then
- notify-send -i $ICON_"$1" "$2"
+ getXconsole
+ eval home=~$user
+ eval `grep -m 1 ^DBUS_SESSION_BUS_ADDRESS $home/.dbus/session-bus/*`
+ eval ICON=\$ICON_$1
+ su $user -c notify-send\ -i\ $ICON\ "$2"
else
echo "Please install libnotify-bin" > /dev/stderr
return 1
diff --git a/debian/changelog b/debian/changelog
index 56e0a72..e8388ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ eeepc-acpi-scripts (1.1.12) UNRELEASED; urgency=low
older kernels without rfkill input.
* Document acpi_fakekey alternative key handlers to provide input events
for keys not handled by the current kernel driver.
+ [Luca Niccoli]
+ * Fix DBus notifications.
-- Ben Armstrong <synrg at sanctuary.nslug.ns.ca> Sun, 14 Nov 2010 10:15:07 -0400
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list