diff options
author | Stefano Karapetsas <[email protected]> | 2013-12-31 11:39:20 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-12-31 11:39:20 -0800 |
commit | 2a9f47827c557c32f36ef6c50827ca616db5ecea (patch) | |
tree | 4ca5d50ddaaa810e56a1ec6c99208939c66a702a | |
parent | e934e91226e9a93956121c9c84ecf3664fcd68be (diff) | |
parent | 3319a9bcff2059d474323daf666dd74bc3723621 (diff) | |
download | mate-session-manager-2a9f47827c557c32f36ef6c50827ca616db5ecea.tar.bz2 mate-session-manager-2a9f47827c557c32f36ef6c50827ca616db5ecea.tar.xz |
Merge pull request #40 from infirit/1.6
Cherrypick usefull commits from master
-rw-r--r-- | distro/archlinux/PKGBUILD | 38 | ||||
-rw-r--r-- | distro/archlinux/mate-session-manager.install | 22 | ||||
-rw-r--r-- | mate-session/gsm-systemd.c | 20 | ||||
-rw-r--r-- | mate-session/test-client-dbus.c | 2 |
4 files changed, 16 insertions, 66 deletions
diff --git a/distro/archlinux/PKGBUILD b/distro/archlinux/PKGBUILD deleted file mode 100644 index d2af40d..0000000 --- a/distro/archlinux/PKGBUILD +++ /dev/null @@ -1,38 +0,0 @@ -pkgname=mate-session-manager -pkgver=1.1.2 -pkgrel=1 -pkgdesc="The MATE Session Handler" -arch=(i686 x86_64) -license=('GPL' 'LGPL') -depends=('upower' 'gtk2' 'mate-conf' 'hicolor-icon-theme' 'libxtst' 'mate-polkit') # 'startup-notification' -makedepends=('pkgconfig' 'intltool' 'xtrans') -options=('!emptydirs' '!libtool') -install=mate-session-manager.install -url="http://matsusoft.com.ar/projects/mate/" -groups=('mate') -source=() -sha256sums=() - -build() { - cd "${srcdir}/../../../" - - ./autogen.sh \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --libexecdir=/usr/lib || return 1 - - make || return 1 -} - -package() { - cd "${srcdir}/../../../" - - make DESTDIR="${pkgdir}" MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 install || return 1 - - install -d -m755 "${pkgdir}/usr/share/mateconf/schemas" - mateconf-merge-schema "${pkgdir}/usr/share/mateconf/schemas/${pkgname}.schemas" --domain ${pkgname} ${pkgdir}/etc/mateconf/schemas/*.schemas || return 1 - - # --disable-schemas-compile <- check if work <- nop - rm -f ${pkgdir}/etc/mateconf/schemas/*.schemas -} diff --git a/distro/archlinux/mate-session-manager.install b/distro/archlinux/mate-session-manager.install deleted file mode 100644 index 2d4b799..0000000 --- a/distro/archlinux/mate-session-manager.install +++ /dev/null @@ -1,22 +0,0 @@ -pkgname=mate-session-manager - -post_install() { - usr/sbin/mateconfpkg --install ${pkgname} - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} - -pre_upgrade() { - pre_remove $1 -} - -post_upgrade() { - post_install $1 -} - -pre_remove() { - usr/sbin/mateconfpkg --uninstall ${pkgname} -} - -post_remove() { - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} diff --git a/mate-session/gsm-systemd.c b/mate-session/gsm-systemd.c index dbe8ea0..3804fed 100644 --- a/mate-session/gsm-systemd.c +++ b/mate-session/gsm-systemd.c @@ -547,7 +547,7 @@ gsm_systemd_set_session_idle (GsmSystemd *manager, gboolean is_idle) { GError *error; - char *session_path; + char *session_path = NULL; DBusMessage *message; DBusMessage *reply; DBusError dbus_error; @@ -564,6 +564,8 @@ gsm_systemd_set_session_idle (GsmSystemd *manager, gsm_systemd_get_session_path (dbus_g_connection_get_connection (manager->priv->dbus_connection), &session_path); + g_return_if_fail (session_path != NULL); + g_debug ("Updating Systemd idle status: %d", is_idle); message = dbus_message_new_method_call (SD_NAME, session_path, @@ -600,7 +602,9 @@ gsm_systemd_can_switch_user (GsmSystemd *manager) { GError *error; char *session_id = NULL; +#ifdef HAVE_SYSTEMD char *seat_id = NULL; +#endif int ret = 0; error = NULL; @@ -811,7 +815,7 @@ gsm_systemd_attempt_hibernate (GsmSystemd *manager) g_warning ("Could not connect to Systemd: %s", error->message); g_error_free (error); - return FALSE; + return; } res = dbus_g_proxy_call_with_timeout (manager->priv->sd_proxy, @@ -825,7 +829,7 @@ gsm_systemd_attempt_hibernate (GsmSystemd *manager) g_warning ("Could not make DBUS call: %s", error->message); g_error_free (error); - return FALSE; + return; } } @@ -842,7 +846,7 @@ gsm_systemd_attempt_suspend (GsmSystemd *manager) g_warning ("Could not connect to Systemd: %s", error->message); g_error_free (error); - return FALSE; + return; } res = dbus_g_proxy_call_with_timeout (manager->priv->sd_proxy, @@ -856,7 +860,7 @@ gsm_systemd_attempt_suspend (GsmSystemd *manager) g_warning ("Could not make DBUS call: %s", error->message); g_error_free (error); - return FALSE; + return; } } @@ -864,9 +868,11 @@ gchar * gsm_systemd_get_current_session_type (GsmSystemd *manager) { GError *gerror; - int session_id; + gchar *session_id; gchar *session_class = NULL; +#ifdef HAVE_SYSTEMD int res; +#endif gerror = NULL; @@ -890,6 +896,8 @@ gsm_systemd_get_current_session_type (GsmSystemd *manager) g_warning ("Could not get Systemd session class!"); return NULL; } + + g_free (session_id); #endif return session_class; diff --git a/mate-session/test-client-dbus.c b/mate-session/test-client-dbus.c index fa888ed..8f8fbe9 100644 --- a/mate-session/test-client-dbus.c +++ b/mate-session/test-client-dbus.c @@ -240,7 +240,9 @@ main (int argc, g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING); +#if !GLIB_CHECK_VERSION (2, 36, 0) g_type_init (); +#endif res = session_manager_connect (); if (! res) { |