[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.5-74-g83c9b5c

Ben Armstrong synrg at debian.org
Fri Nov 12 11:01:39 UTC 2010


The following commit has been merged in the master branch:
commit cf3badc665bf16d22a863cef3d0e12b9c7aef948
Author: Luca Niccoli <lultimouomo at gmail.com>
Date:   Mon Oct 4 00:51:02 2010 +0200

    Use notify-send for notifications
    
    Signed-off-by: Luca Niccoli <lultimouomo at gmail.com>

diff --git a/acpilib/notify.sh b/acpilib/notify.sh
index d602e91..cddadb5 100644
--- a/acpilib/notify.sh
+++ b/acpilib/notify.sh
@@ -5,6 +5,13 @@
 notify() {
     CATEGORY=$1
     MSG=$2
+    ICON_bluetooth=" "
+    ICON_super_hybrid_engine=" "
+    ICON_error=" "
+    ICON_camera=" "
+    ICON_touchpad=" "
+    ICON_gsm=" "
+
     if [ -n "$4" -o \( -n "$3" -a "$3" != 'fast' \) ]; then
 	echo "usage: notify 'category' 'message text' [fast]" > /dev/stderr
 	return 1
@@ -21,49 +28,11 @@ notify() {
         return
     fi
 
-    detect_x_display
-
-    OSD_SHOWN=
-
-    # try to show a nice OSD notification via GNOME OSD service
-    GOSDC=/usr/bin/gnome-osd-client
-    if [ -z "$OSD_SHOWN" ] && [ -x "$GOSDC" ]; then
-	if ps -u $user -o cmd= | grep -q '^/usr/bin/python /usr/bin/gnome-osd-event-bridge'; then
-	    if echo "$MSG" | grep -q '[0-9]'; then
-		animations='off'
-	    else
-		animations='on'
-	    fi
-	    if [ "$3" = 'fast' ]; then
-		timeout=150
-	    else
-		timeout=1200
-	    fi
-	    echo "<message id='eee-$CATEGORY' osd_fake_translucent_bg='off' osd_vposition='bottom' animations='$animations' hide_timeout='$timeout' osd_halignment='center'>$MSG</message>" \
-		| su "$user" -c "$GOSDC -s --dbus"
-	    OSD_SHOWN=1
-	fi
-    fi
-
-    if [ -z "$OSD_SHOWN" ] && [ -x /usr/bin/aosd_cat ]; then
-	killall -q aosd_cat
-	if [ "$3" = 'fast' ]; then
-		echo "$MSG" | aosd_cat -n "$OSD_FONT" -f 0 -u 150 -o 0 &
-	else
-		echo "$MSG" | aosd_cat -n "$OSD_FONT" -f 100 -u 1000 -o 100 &
-	fi
-	OSD_SHOWN=1
+    if [ -x /usr/bin/notify-send ]; then
+        notify-send -i $ICON_"$1" "$2"
+    else
+        echo "Please install libnotify-bin" > /dev/stderr
+        return 1
     fi
-
-    if [ -z "$OSD_SHOWN" ] && [ -x /usr/bin/dcop ]; then
-	dcop --user "$user" knotify Notify notify "notification" "knotify" "$MSG" "" "" 16 2
-	OSD_SHOWN=1
-    fi
-
-    if [ -z "$OSD_SHOWN" ] && [ -x /usr/bin/kdialog ]; then
-	su "$user" -c "kdialog --passivepopup '$MSG' 2 --title 'Eee PC'" &
-	OSD_SHOWN=1
-    fi
-
 }
 
diff --git a/eeepc-acpi-scripts/volume.sh b/eeepc-acpi-scripts/volume.sh
index e09fe35..49d655a 100755
--- a/eeepc-acpi-scripts/volume.sh
+++ b/eeepc-acpi-scripts/volume.sh
@@ -11,7 +11,6 @@ DEFAULT=/etc/default/$PKG
 [ -e "$FUNC_LIB" ] || exit 0
 
 . $FUNC_LIB
-. $PKG_DIR/lib/notify.sh
 . $PKG_DIR/lib/sound.sh
 action=$1
 
@@ -42,7 +41,6 @@ show_muteness() {
     if [ "$all_equal" ]; then
 	msg=" $status"
     fi
-    notify audio "Audio$msg"
 }
 
 show_volume() {
@@ -60,7 +58,6 @@ show_volume() {
     if [ "$all_equal" ]; then
 	msg="$percent%"
     fi
-    notify audio "Volume $msg" fast
 }
 
 # cope with control names which contain spaces

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list