[arch-commits] Commit in xfce4-session/repos (8 files)

Evangelos Foutras foutrelis at nymeria.archlinux.org
Sat Aug 3 15:37:32 UTC 2013


    Date: Saturday, August 3, 2013 @ 17:37:32
  Author: foutrelis
Revision: 191980

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  xfce4-session/repos/testing-i686/
  xfce4-session/repos/testing-i686/PKGBUILD
    (from rev 191979, xfce4-session/trunk/PKGBUILD)
  xfce4-session/repos/testing-i686/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch
    (from rev 191979, xfce4-session/trunk/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch)
  xfce4-session/repos/testing-i686/xfce4-session.install
    (from rev 191979, xfce4-session/trunk/xfce4-session.install)
  xfce4-session/repos/testing-x86_64/
  xfce4-session/repos/testing-x86_64/PKGBUILD
    (from rev 191979, xfce4-session/trunk/PKGBUILD)
  xfce4-session/repos/testing-x86_64/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch
    (from rev 191979, xfce4-session/trunk/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch)
  xfce4-session/repos/testing-x86_64/xfce4-session.install
    (from rev 191979, xfce4-session/trunk/xfce4-session.install)

--------------------------------------------------------------------------------+
 testing-i686/PKGBUILD                                                          |   56 ++
 testing-i686/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch   |  275 ++++++++++
 testing-i686/xfce4-session.install                                             |   13 
 testing-x86_64/PKGBUILD                                                        |   56 ++
 testing-x86_64/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch |  275 ++++++++++
 testing-x86_64/xfce4-session.install                                           |   13 
 6 files changed, 688 insertions(+)

Copied: xfce4-session/repos/testing-i686/PKGBUILD (from rev 191979, xfce4-session/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2013-08-03 15:37:32 UTC (rev 191980)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: tobias <tobias funnychar archlinux.org>
+
+pkgname=xfce4-session
+pkgver=4.10.1
+pkgrel=3
+pkgdesc="A session manager for Xfce"
+arch=('i686' 'x86_64')
+url="http://www.xfce.org/"
+license=('GPL2')
+groups=('xfce4')
+depends=('libxfce4ui' 'libwnck' 'libsm' 'xorg-iceauth' 'upower' 'xorg-xinit'
+         'xorg-xrdb' 'hicolor-icon-theme')
+makedepends=('intltool' 'xfce4-dev-tools')
+optdepends=('gnome-keyring: for keyring support when GNOME compatibility is enabled'
+            'xscreensaver: for locking screen with xflock4'
+            'gnome-screensaver: for locking screen with xflock4'
+            'xlockmore: for locking screen with xflock4')
+replaces=('xfce-utils')
+options=('!libtool')
+install=$pkgname.install
+source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2
+        xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch)
+sha256sums=('0154fabdc398798c3445374ccc52a2f5bcb2d867fc94bc54114395b24f9cfc83'
+            '1fc10b6495624ddfb9e18419c835f7b929ad738c602a64ee7aab8327d3aac981')
+
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  # Use logind interfaces for suspend and hibernate
+  # https://bugzilla.xfce.org/show_bug.cgi?id=9952
+  patch -Np1 -i "$srcdir/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch"
+
+  xdt-autogen
+}
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --libexecdir=/usr/lib/xfce4 \
+    --localstatedir=/var \
+    --disable-static \
+    --disable-debug
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: xfce4-session/repos/testing-i686/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch (from rev 191979, xfce4-session/trunk/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch)
===================================================================
--- testing-i686/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch	                        (rev 0)
+++ testing-i686/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch	2013-08-03 15:37:32 UTC (rev 191980)
@@ -0,0 +1,275 @@
+From b076b5592579b397b7d4888eb8062e646b9a4dec Mon Sep 17 00:00:00 2001
+From: Mikhail Efremov <sem at altlinux.org>
+Date: Wed, 10 Apr 2013 17:10:09 +0400
+Subject: [PATCH] Add systemd-logind support for suspend/hibernate.
+
+---
+ xfce4-session/Makefile.am     |  8 +++----
+ xfce4-session/xfsm-shutdown.c | 42 +++++++++++++++++++++++++++-------
+ xfce4-session/xfsm-systemd.c  | 52 +++++++++++++++++++++++++++++++++++++++++++
+ xfce4-session/xfsm-systemd.h  | 14 ++++++++++++
+ 4 files changed, 104 insertions(+), 12 deletions(-)
+
+diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am
+index 5472b33..5e2973b 100644
+--- a/xfce4-session/Makefile.am
++++ b/xfce4-session/Makefile.am
+@@ -59,9 +59,7 @@ xfce4_session_SOURCES =							\
+ 	xfsm-splash-screen.c						\
+ 	xfsm-splash-screen.h						\
+ 	xfsm-startup.c							\
+-	xfsm-startup.h							\
+-	xfsm-upower.c							\
+-	xfsm-upower.h
++	xfsm-startup.h
+ 
+ if HAVE_SYSTEMD
+ xfce4_session_SOURCES +=						\
+@@ -70,7 +68,9 @@ xfce4_session_SOURCES +=						\
+ else
+ xfce4_session_SOURCES +=						\
+ 	xfsm-consolekit.c						\
+-	xfsm-consolekit.h
++	xfsm-consolekit.h                       \
++	xfsm-upower.c							\
++	xfsm-upower.h
+ endif
+ 
+ xfce4_session_CFLAGS =							\
+diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
+index 4c483a7..8a2ba8d 100644
+--- a/xfce4-session/xfsm-shutdown.c
++++ b/xfce4-session/xfsm-shutdown.c
+@@ -66,12 +66,12 @@
+ #include <xfce4-session/xfsm-fadeout.h>
+ #include <xfce4-session/xfsm-global.h>
+ #include <xfce4-session/xfsm-legacy.h>
+-#include <xfce4-session/xfsm-upower.h>
+ 
+ #ifdef HAVE_SYSTEMD
+ #include <xfce4-session/xfsm-systemd.h>
+ #else
+ #include <xfce4-session/xfsm-consolekit.h>
++#include <xfce4-session/xfsm-upower.h>
+ #endif
+ 
+ static void xfsm_shutdown_finalize  (GObject      *object);
+@@ -100,8 +100,8 @@ struct _XfsmShutdown
+   XfsmSystemd    *systemd;
+ #else
+   XfsmConsolekit *consolekit;
+-#endif
+   XfsmUPower     *upower;
++#endif
+ 
+   /* kiosk settings */
+   gboolean        kiosk_can_shutdown;
+@@ -142,8 +142,8 @@ xfsm_shutdown_init (XfsmShutdown *shutdown)
+   shutdown->systemd = xfsm_systemd_get ();
+ #else
+   shutdown->consolekit = xfsm_consolekit_get ();
+-#endif
+   shutdown->upower = xfsm_upower_get ();
++#endif
+   shutdown->helper_state = SUDO_NOT_INITIAZED;
+   shutdown->helper_require_password = FALSE;
+ 
+@@ -165,8 +165,8 @@ xfsm_shutdown_finalize (GObject *object)
+   g_object_unref (G_OBJECT (shutdown->systemd));
+ #else
+   g_object_unref (G_OBJECT (shutdown->consolekit));
+-#endif
+   g_object_unref (G_OBJECT (shutdown->upower));
++#endif
+ 
+   /* close down helper */
+   xfsm_shutdown_sudo_free (shutdown);
+@@ -692,7 +692,11 @@ xfsm_shutdown_try_suspend (XfsmShutdown  *shutdown,
+ {
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
++#ifdef HAVE_SYSTEMD
++  return xfsm_systemd_try_suspend (shutdown->systemd, error);
++#else
+   return xfsm_upower_try_suspend (shutdown->upower, error);
++#endif
+ }
+ 
+ 
+@@ -703,7 +707,11 @@ xfsm_shutdown_try_hibernate (XfsmShutdown  *shutdown,
+ {
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
++#ifdef HAVE_SYSTEMD
++  return xfsm_systemd_try_hibernate (shutdown->systemd, error);
++#else
+   return xfsm_upower_try_hibernate (shutdown->upower, error);
++#endif
+ }
+ 
+ 
+@@ -776,6 +784,8 @@ xfsm_shutdown_can_suspend (XfsmShutdown  *shutdown,
+                            gboolean      *auth_suspend,
+                            GError       **error)
+ {
++  gboolean ret;
++
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
+   if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
+@@ -784,8 +794,15 @@ xfsm_shutdown_can_suspend (XfsmShutdown  *shutdown,
+       return TRUE;
+     }
+ 
+-  return xfsm_upower_can_suspend (shutdown->upower, can_suspend, 
+-                                  auth_suspend, error);
++#ifdef HAVE_SYSTEMD
++  ret = xfsm_systemd_can_suspend (shutdown->systemd, can_suspend, error);
++  *auth_suspend = *can_suspend;
++#else
++  ret = xfsm_upower_can_suspend (shutdown->upower, can_suspend,
++                                 auth_suspend, error);
++#endif
++
++  return ret;
+ }
+ 
+ 
+@@ -796,6 +813,8 @@ xfsm_shutdown_can_hibernate (XfsmShutdown  *shutdown,
+                              gboolean      *auth_hibernate,
+                              GError       **error)
+ {
++  gboolean ret;
++
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
+   if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
+@@ -804,8 +823,15 @@ xfsm_shutdown_can_hibernate (XfsmShutdown  *shutdown,
+       return TRUE;
+     }
+ 
+-  return xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
+-                                    auth_hibernate, error);
++#ifdef HAVE_SYSTEMD
++  ret = xfsm_systemd_can_hibernate (shutdown->systemd, can_hibernate, error);
++  *auth_hibernate = *can_hibernate;
++#else
++  ret = xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
++                                   auth_hibernate, error);
++#endif
++
++  return ret;
+ }
+ 
+ 
+diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c
+index 7bdd39d..cfe7bf4 100644
+--- a/xfce4-session/xfsm-systemd.c
++++ b/xfce4-session/xfsm-systemd.c
+@@ -33,8 +33,12 @@
+ #define SYSTEMD_DBUS_INTERFACE          "org.freedesktop.login1.Manager"
+ #define SYSTEMD_REBOOT_ACTION           "Reboot"
+ #define SYSTEMD_POWEROFF_ACTION         "PowerOff"
++#define SYSTEMD_SUSPEND_ACTION          "Suspend"
++#define SYSTEMD_HIBERNATE_ACTION        "Hibernate"
+ #define SYSTEMD_REBOOT_TEST             "org.freedesktop.login1.reboot"
+ #define SYSTEMD_POWEROFF_TEST           "org.freedesktop.login1.power-off"
++#define SYSTEMD_SUSPEND_TEST            "org.freedesktop.login1.suspend"
++#define SYSTEMD_HIBERNATE_TEST          "org.freedesktop.login1.hibernate"
+ 
+ 
+ 
+@@ -205,6 +209,28 @@ xfsm_systemd_try_shutdown (XfsmSystemd  *systemd,
+ 
+ 
+ gboolean
++xfsm_systemd_try_suspend (XfsmSystemd  *systemd,
++                          GError      **error)
++{
++  return xfsm_systemd_try_method (systemd,
++                                  SYSTEMD_SUSPEND_ACTION,
++                                  error);
++}
++
++
++
++gboolean
++xfsm_systemd_try_hibernate (XfsmSystemd  *systemd,
++                            GError      **error)
++{
++  return xfsm_systemd_try_method (systemd,
++                                  SYSTEMD_HIBERNATE_ACTION,
++                                  error);
++}
++
++
++
++gboolean
+ xfsm_systemd_can_restart (XfsmSystemd  *systemd,
+                           gboolean     *can_restart,
+                           GError      **error)
+@@ -227,3 +253,29 @@ xfsm_systemd_can_shutdown (XfsmSystemd  *systemd,
+                                   SYSTEMD_POWEROFF_TEST,
+                                   error);
+ }
++
++
++
++gboolean
++xfsm_systemd_can_suspend (XfsmSystemd  *systemd,
++                          gboolean     *can_suspend,
++                          GError      **error)
++{
++  return xfsm_systemd_can_method (systemd,
++                                  can_suspend,
++                                  SYSTEMD_SUSPEND_TEST,
++                                  error);
++}
++
++
++
++gboolean
++xfsm_systemd_can_hibernate (XfsmSystemd  *systemd,
++                            gboolean     *can_hibernate,
++                            GError      **error)
++{
++  return xfsm_systemd_can_method (systemd,
++                                  can_hibernate,
++                                  SYSTEMD_HIBERNATE_TEST,
++                                  error);
++}
+diff --git a/xfce4-session/xfsm-systemd.h b/xfce4-session/xfsm-systemd.h
+index 8223622..6cf803f 100644
+--- a/xfce4-session/xfsm-systemd.h
++++ b/xfce4-session/xfsm-systemd.h
+@@ -42,6 +42,12 @@ gboolean     xfsm_systemd_try_restart  (XfsmSystemd  *systemd,
+ gboolean     xfsm_systemd_try_shutdown (XfsmSystemd  *systemd,
+                                         GError      **error);
+ 
++gboolean     xfsm_systemd_try_suspend  (XfsmSystemd  *systemd,
++                                        GError      **error);
++
++gboolean     xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
++                                        GError      **error);
++
+ gboolean     xfsm_systemd_can_restart  (XfsmSystemd  *systemd,
+                                         gboolean     *can_restart,
+                                         GError      **error);
+@@ -50,6 +56,14 @@ gboolean     xfsm_systemd_can_shutdown (XfsmSystemd  *systemd,
+                                         gboolean     *can_shutdown,
+                                         GError      **error);
+ 
++gboolean     xfsm_systemd_can_suspend  (XfsmSystemd  *systemd,
++                                        gboolean     *can_suspend,
++                                        GError      **error);
++
++gboolean     xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
++                                        gboolean     *can_hibernate,
++                                        GError      **error);
++
+ G_END_DECLS
+ 
+ #endif  /* __XFSM_SYSTEMD_H__ */
+-- 
+1.8.1.5
+

Copied: xfce4-session/repos/testing-i686/xfce4-session.install (from rev 191979, xfce4-session/trunk/xfce4-session.install)
===================================================================
--- testing-i686/xfce4-session.install	                        (rev 0)
+++ testing-i686/xfce4-session.install	2013-08-03 15:37:32 UTC (rev 191980)
@@ -0,0 +1,13 @@
+post_install() {
+  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+  post_install
+}
+
+post_remove() {
+  post_install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: xfce4-session/repos/testing-x86_64/PKGBUILD (from rev 191979, xfce4-session/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2013-08-03 15:37:32 UTC (rev 191980)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: tobias <tobias funnychar archlinux.org>
+
+pkgname=xfce4-session
+pkgver=4.10.1
+pkgrel=3
+pkgdesc="A session manager for Xfce"
+arch=('i686' 'x86_64')
+url="http://www.xfce.org/"
+license=('GPL2')
+groups=('xfce4')
+depends=('libxfce4ui' 'libwnck' 'libsm' 'xorg-iceauth' 'upower' 'xorg-xinit'
+         'xorg-xrdb' 'hicolor-icon-theme')
+makedepends=('intltool' 'xfce4-dev-tools')
+optdepends=('gnome-keyring: for keyring support when GNOME compatibility is enabled'
+            'xscreensaver: for locking screen with xflock4'
+            'gnome-screensaver: for locking screen with xflock4'
+            'xlockmore: for locking screen with xflock4')
+replaces=('xfce-utils')
+options=('!libtool')
+install=$pkgname.install
+source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2
+        xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch)
+sha256sums=('0154fabdc398798c3445374ccc52a2f5bcb2d867fc94bc54114395b24f9cfc83'
+            '1fc10b6495624ddfb9e18419c835f7b929ad738c602a64ee7aab8327d3aac981')
+
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  # Use logind interfaces for suspend and hibernate
+  # https://bugzilla.xfce.org/show_bug.cgi?id=9952
+  patch -Np1 -i "$srcdir/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch"
+
+  xdt-autogen
+}
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --libexecdir=/usr/lib/xfce4 \
+    --localstatedir=/var \
+    --disable-static \
+    --disable-debug
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: xfce4-session/repos/testing-x86_64/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch (from rev 191979, xfce4-session/trunk/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch)
===================================================================
--- testing-x86_64/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch	                        (rev 0)
+++ testing-x86_64/xfce4-session-4.10.1-logind-support-for-suspend-hibernate.patch	2013-08-03 15:37:32 UTC (rev 191980)
@@ -0,0 +1,275 @@
+From b076b5592579b397b7d4888eb8062e646b9a4dec Mon Sep 17 00:00:00 2001
+From: Mikhail Efremov <sem at altlinux.org>
+Date: Wed, 10 Apr 2013 17:10:09 +0400
+Subject: [PATCH] Add systemd-logind support for suspend/hibernate.
+
+---
+ xfce4-session/Makefile.am     |  8 +++----
+ xfce4-session/xfsm-shutdown.c | 42 +++++++++++++++++++++++++++-------
+ xfce4-session/xfsm-systemd.c  | 52 +++++++++++++++++++++++++++++++++++++++++++
+ xfce4-session/xfsm-systemd.h  | 14 ++++++++++++
+ 4 files changed, 104 insertions(+), 12 deletions(-)
+
+diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am
+index 5472b33..5e2973b 100644
+--- a/xfce4-session/Makefile.am
++++ b/xfce4-session/Makefile.am
+@@ -59,9 +59,7 @@ xfce4_session_SOURCES =							\
+ 	xfsm-splash-screen.c						\
+ 	xfsm-splash-screen.h						\
+ 	xfsm-startup.c							\
+-	xfsm-startup.h							\
+-	xfsm-upower.c							\
+-	xfsm-upower.h
++	xfsm-startup.h
+ 
+ if HAVE_SYSTEMD
+ xfce4_session_SOURCES +=						\
+@@ -70,7 +68,9 @@ xfce4_session_SOURCES +=						\
+ else
+ xfce4_session_SOURCES +=						\
+ 	xfsm-consolekit.c						\
+-	xfsm-consolekit.h
++	xfsm-consolekit.h                       \
++	xfsm-upower.c							\
++	xfsm-upower.h
+ endif
+ 
+ xfce4_session_CFLAGS =							\
+diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
+index 4c483a7..8a2ba8d 100644
+--- a/xfce4-session/xfsm-shutdown.c
++++ b/xfce4-session/xfsm-shutdown.c
+@@ -66,12 +66,12 @@
+ #include <xfce4-session/xfsm-fadeout.h>
+ #include <xfce4-session/xfsm-global.h>
+ #include <xfce4-session/xfsm-legacy.h>
+-#include <xfce4-session/xfsm-upower.h>
+ 
+ #ifdef HAVE_SYSTEMD
+ #include <xfce4-session/xfsm-systemd.h>
+ #else
+ #include <xfce4-session/xfsm-consolekit.h>
++#include <xfce4-session/xfsm-upower.h>
+ #endif
+ 
+ static void xfsm_shutdown_finalize  (GObject      *object);
+@@ -100,8 +100,8 @@ struct _XfsmShutdown
+   XfsmSystemd    *systemd;
+ #else
+   XfsmConsolekit *consolekit;
+-#endif
+   XfsmUPower     *upower;
++#endif
+ 
+   /* kiosk settings */
+   gboolean        kiosk_can_shutdown;
+@@ -142,8 +142,8 @@ xfsm_shutdown_init (XfsmShutdown *shutdown)
+   shutdown->systemd = xfsm_systemd_get ();
+ #else
+   shutdown->consolekit = xfsm_consolekit_get ();
+-#endif
+   shutdown->upower = xfsm_upower_get ();
++#endif
+   shutdown->helper_state = SUDO_NOT_INITIAZED;
+   shutdown->helper_require_password = FALSE;
+ 
+@@ -165,8 +165,8 @@ xfsm_shutdown_finalize (GObject *object)
+   g_object_unref (G_OBJECT (shutdown->systemd));
+ #else
+   g_object_unref (G_OBJECT (shutdown->consolekit));
+-#endif
+   g_object_unref (G_OBJECT (shutdown->upower));
++#endif
+ 
+   /* close down helper */
+   xfsm_shutdown_sudo_free (shutdown);
+@@ -692,7 +692,11 @@ xfsm_shutdown_try_suspend (XfsmShutdown  *shutdown,
+ {
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
++#ifdef HAVE_SYSTEMD
++  return xfsm_systemd_try_suspend (shutdown->systemd, error);
++#else
+   return xfsm_upower_try_suspend (shutdown->upower, error);
++#endif
+ }
+ 
+ 
+@@ -703,7 +707,11 @@ xfsm_shutdown_try_hibernate (XfsmShutdown  *shutdown,
+ {
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
++#ifdef HAVE_SYSTEMD
++  return xfsm_systemd_try_hibernate (shutdown->systemd, error);
++#else
+   return xfsm_upower_try_hibernate (shutdown->upower, error);
++#endif
+ }
+ 
+ 
+@@ -776,6 +784,8 @@ xfsm_shutdown_can_suspend (XfsmShutdown  *shutdown,
+                            gboolean      *auth_suspend,
+                            GError       **error)
+ {
++  gboolean ret;
++
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
+   if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
+@@ -784,8 +794,15 @@ xfsm_shutdown_can_suspend (XfsmShutdown  *shutdown,
+       return TRUE;
+     }
+ 
+-  return xfsm_upower_can_suspend (shutdown->upower, can_suspend, 
+-                                  auth_suspend, error);
++#ifdef HAVE_SYSTEMD
++  ret = xfsm_systemd_can_suspend (shutdown->systemd, can_suspend, error);
++  *auth_suspend = *can_suspend;
++#else
++  ret = xfsm_upower_can_suspend (shutdown->upower, can_suspend,
++                                 auth_suspend, error);
++#endif
++
++  return ret;
+ }
+ 
+ 
+@@ -796,6 +813,8 @@ xfsm_shutdown_can_hibernate (XfsmShutdown  *shutdown,
+                              gboolean      *auth_hibernate,
+                              GError       **error)
+ {
++  gboolean ret;
++
+   g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+ 
+   if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
+@@ -804,8 +823,15 @@ xfsm_shutdown_can_hibernate (XfsmShutdown  *shutdown,
+       return TRUE;
+     }
+ 
+-  return xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
+-                                    auth_hibernate, error);
++#ifdef HAVE_SYSTEMD
++  ret = xfsm_systemd_can_hibernate (shutdown->systemd, can_hibernate, error);
++  *auth_hibernate = *can_hibernate;
++#else
++  ret = xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
++                                   auth_hibernate, error);
++#endif
++
++  return ret;
+ }
+ 
+ 
+diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c
+index 7bdd39d..cfe7bf4 100644
+--- a/xfce4-session/xfsm-systemd.c
++++ b/xfce4-session/xfsm-systemd.c
+@@ -33,8 +33,12 @@
+ #define SYSTEMD_DBUS_INTERFACE          "org.freedesktop.login1.Manager"
+ #define SYSTEMD_REBOOT_ACTION           "Reboot"
+ #define SYSTEMD_POWEROFF_ACTION         "PowerOff"
++#define SYSTEMD_SUSPEND_ACTION          "Suspend"
++#define SYSTEMD_HIBERNATE_ACTION        "Hibernate"
+ #define SYSTEMD_REBOOT_TEST             "org.freedesktop.login1.reboot"
+ #define SYSTEMD_POWEROFF_TEST           "org.freedesktop.login1.power-off"
++#define SYSTEMD_SUSPEND_TEST            "org.freedesktop.login1.suspend"
++#define SYSTEMD_HIBERNATE_TEST          "org.freedesktop.login1.hibernate"
+ 
+ 
+ 
+@@ -205,6 +209,28 @@ xfsm_systemd_try_shutdown (XfsmSystemd  *systemd,
+ 
+ 
+ gboolean
++xfsm_systemd_try_suspend (XfsmSystemd  *systemd,
++                          GError      **error)
++{
++  return xfsm_systemd_try_method (systemd,
++                                  SYSTEMD_SUSPEND_ACTION,
++                                  error);
++}
++
++
++
++gboolean
++xfsm_systemd_try_hibernate (XfsmSystemd  *systemd,
++                            GError      **error)
++{
++  return xfsm_systemd_try_method (systemd,
++                                  SYSTEMD_HIBERNATE_ACTION,
++                                  error);
++}
++
++
++
++gboolean
+ xfsm_systemd_can_restart (XfsmSystemd  *systemd,
+                           gboolean     *can_restart,
+                           GError      **error)
+@@ -227,3 +253,29 @@ xfsm_systemd_can_shutdown (XfsmSystemd  *systemd,
+                                   SYSTEMD_POWEROFF_TEST,
+                                   error);
+ }
++
++
++
++gboolean
++xfsm_systemd_can_suspend (XfsmSystemd  *systemd,
++                          gboolean     *can_suspend,
++                          GError      **error)
++{
++  return xfsm_systemd_can_method (systemd,
++                                  can_suspend,
++                                  SYSTEMD_SUSPEND_TEST,
++                                  error);
++}
++
++
++
++gboolean
++xfsm_systemd_can_hibernate (XfsmSystemd  *systemd,
++                            gboolean     *can_hibernate,
++                            GError      **error)
++{
++  return xfsm_systemd_can_method (systemd,
++                                  can_hibernate,
++                                  SYSTEMD_HIBERNATE_TEST,
++                                  error);
++}
+diff --git a/xfce4-session/xfsm-systemd.h b/xfce4-session/xfsm-systemd.h
+index 8223622..6cf803f 100644
+--- a/xfce4-session/xfsm-systemd.h
++++ b/xfce4-session/xfsm-systemd.h
+@@ -42,6 +42,12 @@ gboolean     xfsm_systemd_try_restart  (XfsmSystemd  *systemd,
+ gboolean     xfsm_systemd_try_shutdown (XfsmSystemd  *systemd,
+                                         GError      **error);
+ 
++gboolean     xfsm_systemd_try_suspend  (XfsmSystemd  *systemd,
++                                        GError      **error);
++
++gboolean     xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
++                                        GError      **error);
++
+ gboolean     xfsm_systemd_can_restart  (XfsmSystemd  *systemd,
+                                         gboolean     *can_restart,
+                                         GError      **error);
+@@ -50,6 +56,14 @@ gboolean     xfsm_systemd_can_shutdown (XfsmSystemd  *systemd,
+                                         gboolean     *can_shutdown,
+                                         GError      **error);
+ 
++gboolean     xfsm_systemd_can_suspend  (XfsmSystemd  *systemd,
++                                        gboolean     *can_suspend,
++                                        GError      **error);
++
++gboolean     xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
++                                        gboolean     *can_hibernate,
++                                        GError      **error);
++
+ G_END_DECLS
+ 
+ #endif  /* __XFSM_SYSTEMD_H__ */
+-- 
+1.8.1.5
+

Copied: xfce4-session/repos/testing-x86_64/xfce4-session.install (from rev 191979, xfce4-session/trunk/xfce4-session.install)
===================================================================
--- testing-x86_64/xfce4-session.install	                        (rev 0)
+++ testing-x86_64/xfce4-session.install	2013-08-03 15:37:32 UTC (rev 191980)
@@ -0,0 +1,13 @@
+post_install() {
+  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+  post_install
+}
+
+post_remove() {
+  post_install
+}
+
+# vim:set ts=2 sw=2 et:




More information about the arch-commits mailing list