# HG changeset patch
# User Andreas Schneider <[email protected]>
# Date 1239964121 -7200
# Branch foo
# Node ID b8201b8be3cc4581edffe9cb2ff141f43ab4edd1
# Parent  75d94a9fcf98c3597c60ced00934889413c5faa5
Use pm-utils to send the suspend and resume message.

The acpi resume is obsolete.

diff --git a/wengophone/res/70QuteCom b/wengophone/res/70QuteCom
new file mode 100644
--- /dev/null
+++ b/wengophone/res/70QuteCom
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+. /usr/lib/pm-utils/functions
+
+suspend_qc() {
+  # Tell QuteCom that the system shuts down
+  #dbus-send --system                       \
+  #  --print-reply --reply-timeout=200      \
+  #  --dest=org.qutecom                     \
+  #  /                                      \
+  #  org.qutecom.Wakeup.wakeup
+}
+
+resume_qc() {
+  # Wake up QuteCom and make it do a new connection
+  dbus-send --system                       \
+    /                                      \
+    org.qutecom.Wakeup.wakeup
+}
+
+case "$1" in
+  hibernate|suspend)
+    suspend_qc
+  ;;
+  thaw|resume)
+    resume_qc
+  ;;
+  *)
+  ;;
+esac
+
+exit $?
diff --git a/wengophone/src/presentation/qt/CMakeLists-install-linux.txt 
b/wengophone/src/presentation/qt/CMakeLists-install-linux.txt
--- a/wengophone/src/presentation/qt/CMakeLists-install-linux.txt
+++ b/wengophone/src/presentation/qt/CMakeLists-install-linux.txt
@@ -71,8 +71,8 @@
        PATTERN "CMakeLists.txt" EXCLUDE)
 
 install(FILES
-       ${CMAKE_SOURCE_DIR}/wengophone/res/qutecom-resume.sh
-       DESTINATION etc/acpi/resume.d RENAME 70-qutecom-resume.sh)
+       ${CMAKE_SOURCE_DIR}/wengophone/res/70QuteCom
+       DESTINATION lib/pm-utils/sleep.d)
 
 install(FILES
        ${CMAKE_SOURCE_DIR}/wengophone/res/qutecom.desktop

_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev

Reply via email to