aboutsummaryrefslogtreecommitdiff
path: root/x11/gnome-session
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2009-11-28 20:06:37 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2009-11-28 20:06:37 +0000
commitf76d32b8e89fed7c0e459c1a7fe7a4b57661b01c (patch)
treead29e6808ff698f84e08dab8e047f0ae72838df9 /x11/gnome-session
parent873cae3ab41a109b6f9cf9f4149f101d6d996235 (diff)
downloadports-f76d32b8e89fed7c0e459c1a7fe7a4b57661b01c.tar.gz
ports-f76d32b8e89fed7c0e459c1a7fe7a4b57661b01c.zip
Notes
Diffstat (limited to 'x11/gnome-session')
-rw-r--r--x11/gnome-session/Makefile13
-rw-r--r--x11/gnome-session/distinfo6
-rw-r--r--x11/gnome-session/files/patch-configure85
-rw-r--r--x11/gnome-session/files/patch-configure.in18
-rw-r--r--x11/gnome-session/files/patch-gnome-session_Makefile.am21
-rw-r--r--x11/gnome-session/files/patch-gnome-session_Makefile.in41
-rw-r--r--x11/gnome-session/files/patch-gnome-session_gsm-logout-dialog.c66
-rw-r--r--x11/gnome-session/files/patch-gnome-session_gsm-manager.c150
-rw-r--r--x11/gnome-session/files/patch-gnome-session_gsm-power-manager.c483
-rw-r--r--x11/gnome-session/files/patch-gnome-session_gsm-power-manager.h90
-rw-r--r--x11/gnome-session/pkg-plist12
11 files changed, 968 insertions, 17 deletions
diff --git a/x11/gnome-session/Makefile b/x11/gnome-session/Makefile
index 33213548525c..5dfdb755e918 100644
--- a/x11/gnome-session/Makefile
+++ b/x11/gnome-session/Makefile
@@ -3,12 +3,11 @@
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports-stable/x11/gnome-session/Makefile,v 1.3 2009/04/16 01:54:40 kwm Exp $
+# $MCom: ports/x11/gnome-session/Makefile,v 1.175 2009/09/22 09:18:35 kwm Exp $
#
PORTNAME= gnome-session
-PORTVERSION= 2.26.2
-PORTREVISION= 1
+PORTVERSION= 2.28.0
CATEGORIES= x11 gnome
MASTER_SITES= GNOME \
http://www.marcuscom.com/downloads/:local
@@ -26,17 +25,19 @@ LIB_DEPENDS= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \
notify.1:${PORTSDIR}/devel/libnotify \
execinfo:${PORTSDIR}/devel/libexecinfo
RUN_DEPENDS= ${LOCALBASE}/libexec/gnome-settings-daemon:${PORTSDIR}/sysutils/gnome-settings-daemon \
+ ${LOCALBASE}/sbin/console-kit-daemon:${PORTSDIR}/sysutils/consolekit \
${LOCALBASE}/bin/xdpyinfo:${PORTSDIR}/x11/xdpyinfo
INSTALLS_ICONS= yes
USE_GETTEXT= yes
USE_BZIP2= yes
-USE_XORG= xau xrandr
-USE_GNOME= gnomeprefix gnomehack intlhack libgnomeui
+USE_XORG= ice sm xau xrandr
+USE_GNOME= gnomeprefix gnomehack intlhack gconf2
GNOME_DESKTOP_VERSION=2
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --disable-docbook-docs
+CONFIGURE_ARGS= --disable-docbook-docs \
+ --enable-splash
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
diff --git a/x11/gnome-session/distinfo b/x11/gnome-session/distinfo
index 0e03e58531cf..7870703d67b6 100644
--- a/x11/gnome-session/distinfo
+++ b/x11/gnome-session/distinfo
@@ -1,6 +1,6 @@
-MD5 (gnome2/gnome-session-2.26.2.tar.bz2) = 2cc3ff808592d95c3b364d608e99dea4
-SHA256 (gnome2/gnome-session-2.26.2.tar.bz2) = e089c7349bb6bc73d19f65c0a4536757968b929825ec38c616c8049bfd2d6905
-SIZE (gnome2/gnome-session-2.26.2.tar.bz2) = 804340
+MD5 (gnome2/gnome-session-2.28.0.tar.bz2) = b1a2307b02e833010d6c5312b9ff9048
+SHA256 (gnome2/gnome-session-2.28.0.tar.bz2) = 83e89a04fb090f1a1f6b609bdc39f1e69390269b885b7da6b32e980f4e765c0c
+SIZE (gnome2/gnome-session-2.28.0.tar.bz2) = 822009
MD5 (gnome2/freebsd-splashes-gnome-2.18_1.tar) = 80eb8c52fcf9fe977e0bf8ed48b85fe5
SHA256 (gnome2/freebsd-splashes-gnome-2.18_1.tar) = fcca0f6eb759a4ef0211ecd61340f84ce8ad4d7493f725ac8613724faadbb508
SIZE (gnome2/freebsd-splashes-gnome-2.18_1.tar) = 1630720
diff --git a/x11/gnome-session/files/patch-configure b/x11/gnome-session/files/patch-configure
new file mode 100644
index 000000000000..6c8c58f69eac
--- /dev/null
+++ b/x11/gnome-session/files/patch-configure
@@ -0,0 +1,85 @@
+--- configure.orig 2009-08-26 14:16:17.000000000 -0400
++++ configure 2009-08-26 14:16:27.000000000 -0400
+@@ -13057,7 +13057,6 @@ GLIB_REQUIRED=2.16.0
+ LIBGNOMEUI_REQUIRED=2.2.0
+ GTK_REQUIRED=2.14.0
+ DBUS_GLIB_REQUIRED=0.76
+-DEVKIT_POWER_REQUIRED=008
+
+
+
+@@ -13189,13 +13188,11 @@ if test -n "$GNOME_SESSION_CFLAGS"; then
+ gio-2.0 >= \$GLIB_REQUIRED
+ gtk+-2.0 >= \$GTK_REQUIRED
+ dbus-glib-1 >= \$DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= \$DEVKIT_POWER_REQUIRED
+ \"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+@@ -13204,7 +13201,6 @@ if test -n "$GNOME_SESSION_CFLAGS"; then
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ " 2>/dev/null`
+ else
+ pkg_failed=yes
+@@ -13220,13 +13216,11 @@ if test -n "$GNOME_SESSION_LIBS"; then
+ gio-2.0 >= \$GLIB_REQUIRED
+ gtk+-2.0 >= \$GTK_REQUIRED
+ dbus-glib-1 >= \$DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= \$DEVKIT_POWER_REQUIRED
+ \"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+@@ -13235,7 +13229,6 @@ if test -n "$GNOME_SESSION_LIBS"; then
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ " 2>/dev/null`
+ else
+ pkg_failed=yes
+@@ -13258,14 +13251,12 @@ fi
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ " 2>&1`
+ else
+ GNOME_SESSION_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ " 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+@@ -13275,7 +13266,6 @@ fi
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ ) were not met:
+
+ $GNOME_SESSION_PKG_ERRORS
+@@ -13291,7 +13281,6 @@ $as_echo "$as_me: error: Package require
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ ) were not met:
+
+ $GNOME_SESSION_PKG_ERRORS
diff --git a/x11/gnome-session/files/patch-configure.in b/x11/gnome-session/files/patch-configure.in
new file mode 100644
index 000000000000..02a19373b902
--- /dev/null
+++ b/x11/gnome-session/files/patch-configure.in
@@ -0,0 +1,18 @@
+--- configure.in.orig 2009-08-25 10:09:56.000000000 -0400
++++ configure.in 2009-08-26 14:12:40.000000000 -0400
+@@ -49,7 +49,6 @@ GLIB_REQUIRED=2.16.0
+ LIBGNOMEUI_REQUIRED=2.2.0
+ GTK_REQUIRED=2.14.0
+ DBUS_GLIB_REQUIRED=0.76
+-DEVKIT_POWER_REQUIRED=008
+
+ dnl ====================================================================
+ dnl Dependency Checks
+@@ -61,7 +60,6 @@ PKG_CHECK_MODULES(GNOME_SESSION,
+ gio-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED
+ )
+
+ PKG_CHECK_MODULES(SESSION_PROPERTIES,
diff --git a/x11/gnome-session/files/patch-gnome-session_Makefile.am b/x11/gnome-session/files/patch-gnome-session_Makefile.am
new file mode 100644
index 000000000000..aff8ee55c44b
--- /dev/null
+++ b/x11/gnome-session/files/patch-gnome-session_Makefile.am
@@ -0,0 +1,21 @@
+--- gnome-session/Makefile.am.orig 2009-08-25 10:07:24.000000000 -0400
++++ gnome-session/Makefile.am 2009-08-26 14:11:18.000000000 -0400
+@@ -23,8 +23,7 @@ INCLUDES = \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DGTKBUILDER_DIR=\""$(pkgdatadir)"\" \
+ -DGCONF_SANITY_CHECK=\""$(GCONF_SANITY_CHECK)"\" \
+- -DGCONFTOOL_CMD=\"$(GCONFTOOL)\" \
+- -DI_KNOW_THE_DEVICEKIT_POWER_API_IS_SUBJECT_TO_CHANGE
++ -DGCONFTOOL_CMD=\"$(GCONFTOOL)\"
+
+ test_inhibit_SOURCES = \
+ test-inhibit.c \
+@@ -73,6 +72,8 @@ gnome_session_SOURCES = \
+ gsm-logout-dialog.c \
+ gsm-inhibit-dialog.h \
+ gsm-inhibit-dialog.c \
++ gsm-power-manager.h \
++ gsm-power-manager.c \
+ gs-idle-monitor.h \
+ gs-idle-monitor.c \
+ gsm-presence.h \
diff --git a/x11/gnome-session/files/patch-gnome-session_Makefile.in b/x11/gnome-session/files/patch-gnome-session_Makefile.in
index 7febc702d2bf..dcf1a21e9f09 100644
--- a/x11/gnome-session/files/patch-gnome-session_Makefile.in
+++ b/x11/gnome-session/files/patch-gnome-session_Makefile.in
@@ -1,6 +1,24 @@
---- gnome-session/Makefile.in.orig 2009-02-21 19:46:07.000000000 +0100
-+++ gnome-session/Makefile.in 2009-02-21 19:46:57.000000000 +0100
-@@ -317,6 +317,7 @@
+--- gnome-session/Makefile.in.orig 2009-08-26 14:18:15.000000000 -0400
++++ gnome-session/Makefile.in 2009-08-26 14:20:10.000000000 -0400
+@@ -73,6 +73,7 @@ am_gnome_session_OBJECTS = gsm-app.$(OBJ
+ gdm-log.$(OBJEXT) main.$(OBJEXT) gsm-store.$(OBJEXT) \
+ gsm-inhibitor.$(OBJEXT) gsm-manager.$(OBJEXT) \
+ gsm-session-save.$(OBJEXT) gsm-xsmp-server.$(OBJEXT) \
++ gsm-power-manager.$(OBJEXT) \
+ $(am__objects_1)
+ gnome_session_OBJECTS = $(am_gnome_session_OBJECTS)
+ gnome_session_DEPENDENCIES = libgsmutil.la \
+@@ -339,8 +340,7 @@ INCLUDES = \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DGTKBUILDER_DIR=\""$(pkgdatadir)"\" \
+ -DGCONF_SANITY_CHECK=\""$(GCONF_SANITY_CHECK)"\" \
+- -DGCONFTOOL_CMD=\"$(GCONFTOOL)\" \
+- -DI_KNOW_THE_DEVICEKIT_POWER_API_IS_SUBJECT_TO_CHANGE
++ -DGCONFTOOL_CMD=\"$(GCONFTOOL)\"
+
+ test_inhibit_SOURCES = \
+ test-inhibit.c \
+@@ -360,6 +360,7 @@ test_client_dbus_LDADD = \
gnome_session_LDADD = \
libgsmutil.la \
@@ -8,3 +26,20 @@
$(top_builddir)/egg/libeggdesktopfile.la \
$(SM_LIBS) \
$(ICE_LIBS) \
+@@ -389,6 +390,8 @@ gnome_session_SOURCES = \
+ gsm-logout-dialog.c \
+ gsm-inhibit-dialog.h \
+ gsm-inhibit-dialog.c \
++ gsm-power-manager.c \
++ gsm-power-manager.h \
+ gs-idle-monitor.h \
+ gs-idle-monitor.c \
+ gsm-presence.h \
+@@ -574,6 +577,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm-dbus-client.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm-gconf.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm-inhibit-dialog.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm-power-manager.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm-inhibitor.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm-logout-dialog.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm-manager.Po@am__quote@
diff --git a/x11/gnome-session/files/patch-gnome-session_gsm-logout-dialog.c b/x11/gnome-session/files/patch-gnome-session_gsm-logout-dialog.c
new file mode 100644
index 000000000000..1ca12557d678
--- /dev/null
+++ b/x11/gnome-session/files/patch-gnome-session_gsm-logout-dialog.c
@@ -0,0 +1,66 @@
+--- gnome-session/gsm-logout-dialog.c.orig 2009-08-25 04:03:42.000000000 -0400
++++ gnome-session/gsm-logout-dialog.c 2009-08-26 14:27:18.000000000 -0400
+@@ -27,9 +27,8 @@
+ #include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+
+-#include <devkit-power-gobject/devicekit-power.h>
+-
+ #include "gsm-logout-dialog.h"
++#include "gsm-power-manager.h"
+ #include "gsm-consolekit.h"
+ #include "gdm.h"
+
+@@ -50,7 +49,7 @@ struct _GsmLogoutDialogPrivate
+ {
+ GsmDialogLogoutType type;
+
+- DkpClient *dkp_client;
++ GsmPowerManager *power_manager;
+ GsmConsolekit *consolekit;
+
+ int timeout;
+@@ -142,7 +141,7 @@ gsm_logout_dialog_init (GsmLogoutDialog
+ gtk_window_set_keep_above (GTK_WINDOW (logout_dialog), TRUE);
+ gtk_window_stick (GTK_WINDOW (logout_dialog));
+
+- logout_dialog->priv->dkp_client = dkp_client_new ();
++ logout_dialog->priv->power_manager = gsm_get_power_manager ();
+
+ logout_dialog->priv->consolekit = gsm_get_consolekit ();
+
+@@ -166,9 +165,9 @@ gsm_logout_dialog_destroy (GsmLogoutDial
+ logout_dialog->priv->timeout_id = 0;
+ }
+
+- if (logout_dialog->priv->dkp_client) {
+- g_object_unref (logout_dialog->priv->dkp_client);
+- logout_dialog->priv->dkp_client = NULL;
++ if (logout_dialog->priv->power_manager) {
++ g_object_unref (logout_dialog->priv->power_manager);
++ logout_dialog->priv->power_manager = NULL;
+ }
+
+ if (logout_dialog->priv->consolekit) {
+@@ -183,9 +182,7 @@ static gboolean
+ gsm_logout_supports_system_suspend (GsmLogoutDialog *logout_dialog)
+ {
+ gboolean ret;
+- g_object_get (logout_dialog->priv->dkp_client,
+- "can-suspend", &ret,
+- NULL);
++ ret = gsm_power_manager_can_suspend (logout_dialog->priv->power_manager);
+ return ret;
+ }
+
+@@ -193,9 +190,7 @@ static gboolean
+ gsm_logout_supports_system_hibernate (GsmLogoutDialog *logout_dialog)
+ {
+ gboolean ret;
+- g_object_get (logout_dialog->priv->dkp_client,
+- "can-hibernate", &ret,
+- NULL);
++ ret = gsm_power_manager_can_hibernate (logout_dialog->priv->power_manager);
+ return ret;
+ }
+
diff --git a/x11/gnome-session/files/patch-gnome-session_gsm-manager.c b/x11/gnome-session/files/patch-gnome-session_gsm-manager.c
new file mode 100644
index 000000000000..befa415d9c6e
--- /dev/null
+++ b/x11/gnome-session/files/patch-gnome-session_gsm-manager.c
@@ -0,0 +1,150 @@
+--- gnome-session/gsm-manager.c.orig 2009-09-18 18:36:04.000000000 +0200
++++ gnome-session/gsm-manager.c 2009-09-22 11:12:05.000000000 +0200
+@@ -38,8 +38,6 @@
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+
+-#include <devkit-power-gobject/devicekit-power.h>
+-
+ #include <gtk/gtk.h> /* for logout dialog */
+ #include <gconf/gconf-client.h>
+
+@@ -60,6 +58,7 @@
+ #include "gsm-logout-dialog.h"
+ #include "gsm-inhibit-dialog.h"
+ #include "gsm-consolekit.h"
++#include "gsm-power-manager.h"
+ #include "gsm-session-save.h"
+
+ #define GSM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_MANAGER, GsmManagerPrivate))
+@@ -133,9 +132,6 @@ struct GsmManagerPrivate
+
+ DBusGProxy *bus_proxy;
+ DBusGConnection *connection;
+-
+- /* Interface with other parts of the system */
+- DkpClient *dkp_client;
+ };
+
+ enum {
+@@ -971,53 +967,29 @@ manager_perhaps_lock (GsmManager *manage
+ static void
+ manager_attempt_hibernate (GsmManager *manager)
+ {
+- gboolean can_hibernate;
+- GError *error;
+- gboolean ret;
++ GsmPowerManager *power_manager;
+
+- g_object_get (manager->priv->dkp_client,
+- "can-hibernate", &can_hibernate,
+- NULL);
+-
+- if (can_hibernate) {
+-
+- /* lock the screen before we suspend */
+- manager_perhaps_lock (manager);
+-
+- error = NULL;
+- ret = dkp_client_hibernate (manager->priv->dkp_client, &error);
+- if (!ret) {
+- g_warning ("Unexpected hibernate failure: %s",
+- error->message);
+- g_error_free (error);
+- }
+- }
++ power_manager = gsm_get_power_manager ();
++
++ if (gsm_power_manager_can_hibernate (power_manager)) {
++ gsm_power_manager_attempt_hibernate (power_manager);
++ }
++
++ g_object_unref (power_manager);
+ }
+
+ static void
+ manager_attempt_suspend (GsmManager *manager)
+ {
+- gboolean can_suspend;
+- GError *error;
+- gboolean ret;
++ GsmPowerManager *power_manager;
+
+- g_object_get (manager->priv->dkp_client,
+- "can-suspend", &can_suspend,
+- NULL);
+-
+- if (can_suspend) {
+-
+- /* lock the screen before we suspend */
+- manager_perhaps_lock (manager);
+-
+- error = NULL;
+- ret = dkp_client_suspend (manager->priv->dkp_client, &error);
+- if (!ret) {
+- g_warning ("Unexpected suspend failure: %s",
+- error->message);
+- g_error_free (error);
+- }
+- }
++ power_manager = gsm_get_power_manager ();
++
++ if (gsm_power_manager_can_suspend (power_manager)) {
++ gsm_power_manager_attempt_suspend (power_manager);
++ }
++
++ g_object_unref (power_manager);
+ }
+
+ static void
+@@ -2190,11 +2162,6 @@ gsm_manager_dispose (GObject *object)
+ manager->priv->gconf_client = NULL;
+ }
+
+- if (manager->priv->dkp_client != NULL) {
+- g_object_unref (manager->priv->dkp_client);
+- manager->priv->dkp_client = NULL;
+- }
+-
+ G_OBJECT_CLASS (gsm_manager_parent_class)->dispose (object);
+ }
+
+@@ -2423,8 +2390,6 @@ gsm_manager_init (GsmManager *manager)
+ G_CALLBACK (on_presence_status_changed),
+ manager);
+
+- manager->priv->dkp_client = dkp_client_new ();
+-
+ /* GConf setup */
+ gconf_client_add_dir (manager->priv->gconf_client,
+ KEY_DESKTOP_DIR,
+@@ -2944,24 +2909,20 @@ gsm_manager_can_shutdown (GsmManager *ma
+ GError **error)
+ {
+ GsmConsolekit *consolekit;
+- gboolean can_suspend;
+- gboolean can_hibernate;
+-
+- g_object_get (manager->priv->dkp_client,
+- "can-suspend", &can_suspend,
+- "can-hibernate", &can_hibernate,
+- NULL);
++ GsmPowerManager *power_manager;
+
+ g_debug ("GsmManager: CanShutdown called");
+
+ g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
+
+ consolekit = gsm_get_consolekit ();
++ power_manager = gsm_get_power_manager ();
+ *shutdown_available = gsm_consolekit_can_stop (consolekit)
+ || gsm_consolekit_can_restart (consolekit)
+- || can_suspend
+- || can_hibernate;
++ || gsm_power_manager_can_suspend (power_manager)
++ || gsm_power_manager_can_hibernate (power_manager);
+ g_object_unref (consolekit);
++ g_object_unref (power_manager);
+
+ return TRUE;
+ }
diff --git a/x11/gnome-session/files/patch-gnome-session_gsm-power-manager.c b/x11/gnome-session/files/patch-gnome-session_gsm-power-manager.c
new file mode 100644
index 000000000000..05342ff0fbf1
--- /dev/null
+++ b/x11/gnome-session/files/patch-gnome-session_gsm-power-manager.c
@@ -0,0 +1,483 @@
+--- gnome-session/gsm-power-manager.c.orig 2009-08-26 14:14:31.000000000 -0400
++++ gnome-session/gsm-power-manager.c 2009-08-26 14:15:07.000000000 -0400
+@@ -0,0 +1,480 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ *
++ * power-manager.h: functions for powering down, restarting, and
++ * suspending the computer
++ * Copyright (C) 2006 Ray Strode <rstrode@redhat.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++ * 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include "gsm-power-manager.h"
++
++#include <errno.h>
++#include <string.h>
++
++#include <glib.h>
++#include <glib-object.h>
++#include <glib/gi18n.h>
++
++#include <dbus/dbus-glib.h>
++
++struct _GsmPowerManagerPrivate
++{
++ DBusGConnection *dbus_connection;
++ DBusGProxy *bus_proxy;
++ DBusGProxy *gpm_proxy;
++ guint32 is_connected : 1;
++};
++
++static void gsm_power_manager_finalize (GObject *object);
++
++static void gsm_power_manager_class_install_signals (GsmPowerManagerClass *manager_class);
++
++static void gsm_power_manager_class_install_properties (GsmPowerManagerClass *manager_class);
++
++static void gsm_power_manager_get_property (GObject *object,
++ guint prop_id,
++ GValue *value,
++ GParamSpec *pspec);
++
++static gboolean ensure_gpm_connection (GsmPowerManager *manager,
++ GError **error);
++
++enum {
++ PROP_0 = 0,
++ PROP_IS_CONNECTED
++};
++
++enum {
++ REQUEST_FAILED = 0,
++ LAST_SIGNAL
++};
++
++static guint signals[LAST_SIGNAL];
++
++G_DEFINE_TYPE (GsmPowerManager, gsm_power_manager, G_TYPE_OBJECT);
++
++static void
++gsm_power_manager_class_init (GsmPowerManagerClass *manager_class)
++{
++ GObjectClass *object_class;
++
++ object_class = G_OBJECT_CLASS (manager_class);
++
++ object_class->finalize = gsm_power_manager_finalize;
++
++ gsm_power_manager_class_install_properties (manager_class);
++ gsm_power_manager_class_install_signals (manager_class);
++
++ g_type_class_add_private (manager_class,
++ sizeof (GsmPowerManagerPrivate));
++}
++
++static void
++gsm_power_manager_class_install_signals (GsmPowerManagerClass *manager_class)
++{
++ GObjectClass *object_class;
++
++ object_class = G_OBJECT_CLASS (manager_class);
++
++ signals[REQUEST_FAILED] =
++ g_signal_new ("request-failed",
++ G_OBJECT_CLASS_TYPE (object_class),
++ G_SIGNAL_RUN_LAST,
++ G_STRUCT_OFFSET (GsmPowerManagerClass, request_failed),
++ NULL,
++ NULL,
++ g_cclosure_marshal_VOID__POINTER,
++ G_TYPE_NONE,
++ 1, G_TYPE_POINTER);
++
++ manager_class->request_failed = NULL;
++}
++
++static void
++gsm_power_manager_class_install_properties (GsmPowerManagerClass *manager_class)
++{
++ GObjectClass *object_class;
++ GParamSpec *param_spec;
++
++ object_class = G_OBJECT_CLASS (manager_class);
++ object_class->get_property = gsm_power_manager_get_property;
++
++ param_spec = g_param_spec_boolean ("is-connected",
++ "Is connected",
++ "Whether the session is connected to "
++ "the power manager",
++ FALSE,
++ G_PARAM_READABLE);
++
++ g_object_class_install_property (object_class, PROP_IS_CONNECTED,
++ param_spec);
++}
++
++static void
++on_name_owner_changed (DBusGProxy *bus_proxy,
++ const char *name,
++ const char *prev_owner,
++ const char *new_owner,
++ GsmPowerManager *manager)
++{
++ if (strcmp (name, "org.freedesktop.PowerManagement") != 0) {
++ return;
++ }
++
++ if (manager->priv->gpm_proxy != NULL) {
++ g_object_unref (manager->priv->gpm_proxy);
++ manager->priv->gpm_proxy = NULL;
++ }
++
++ ensure_gpm_connection (manager, NULL);
++}
++
++static gboolean
++ensure_gpm_connection (GsmPowerManager *manager,
++ GError **error)
++{
++ GError *connection_error;
++ gboolean is_connected;
++
++ connection_error = NULL;
++ if (manager->priv->dbus_connection == NULL) {
++ manager->priv->dbus_connection = dbus_g_bus_get (DBUS_BUS_SESSION,
++ &connection_error);
++
++ if (manager->priv->dbus_connection == NULL) {
++ g_propagate_error (error, connection_error);
++ is_connected = FALSE;
++ goto out;
++ }
++ }
++
++ if (manager->priv->bus_proxy == NULL) {
++ manager->priv->bus_proxy =
++ dbus_g_proxy_new_for_name_owner (manager->priv->dbus_connection,
++ DBUS_SERVICE_DBUS,
++ DBUS_PATH_DBUS,
++ DBUS_INTERFACE_DBUS,
++ &connection_error);
++
++ if (manager->priv->bus_proxy == NULL) {
++ g_propagate_error (error, connection_error);
++ is_connected = FALSE;
++ goto out;
++ }
++
++ dbus_g_proxy_add_signal (manager->priv->bus_proxy,
++ "NameOwnerChanged",
++ G_TYPE_STRING,
++ G_TYPE_STRING,
++ G_TYPE_STRING,
++ G_TYPE_INVALID);
++
++ dbus_g_proxy_connect_signal (manager->priv->bus_proxy,
++ "NameOwnerChanged",
++ G_CALLBACK (on_name_owner_changed),
++ manager, NULL);
++ }
++
++ if (manager->priv->gpm_proxy == NULL) {
++ manager->priv->gpm_proxy =
++ dbus_g_proxy_new_for_name_owner (
++ manager->priv->dbus_connection,
++ "org.freedesktop.PowerManagement",
++ "/org/freedesktop/PowerManagement",
++ "org.freedesktop.PowerManagement",
++ &connection_error);
++
++ if (manager->priv->gpm_proxy == NULL) {
++ g_propagate_error (error, connection_error);
++ is_connected = FALSE;
++ goto out;
++ }
++ }
++
++ is_connected = TRUE;
++
++ out:
++ if (manager->priv->is_connected != is_connected) {
++ manager->priv->is_connected = is_connected;
++ g_object_notify (G_OBJECT (manager), "is-connected");
++ }
++
++ if (!is_connected) {
++ if (manager->priv->dbus_connection == NULL) {
++ if (manager->priv->bus_proxy != NULL) {
++ g_object_unref (manager->priv->bus_proxy);
++ manager->priv->bus_proxy = NULL;
++ }
++
++ if (manager->priv->gpm_proxy != NULL) {
++ g_object_unref (manager->priv->gpm_proxy);
++ manager->priv->gpm_proxy = NULL;
++ }
++ } else if (manager->priv->bus_proxy == NULL) {
++ if (manager->priv->gpm_proxy != NULL) {
++ g_object_unref (manager->priv->gpm_proxy);
++ manager->priv->gpm_proxy = NULL;
++ }
++ }
++ }
++
++ return is_connected;
++}
++
++static void
++gsm_power_manager_init (GsmPowerManager *manager)
++{
++ GError *error;
++
++ manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager,
++ GSM_TYPE_POWER_MANAGER,
++ GsmPowerManagerPrivate);
++
++ manager->priv->dbus_connection = NULL;
++ manager->priv->bus_proxy = NULL;
++ manager->priv->gpm_proxy = NULL;
++ manager->priv->is_connected = FALSE;
++
++ error = NULL;
++
++ if (!ensure_gpm_connection (manager, &error)) {
++ g_message ("Could not connect to power manager: %s",
++ error->message);
++ g_error_free (error);
++ }
++}
++
++static void
++gsm_power_manager_finalize (GObject *object)
++{
++ GsmPowerManager *manager;
++ GObjectClass *parent_class;
++
++ manager = GSM_POWER_MANAGER (object);
++
++ parent_class = G_OBJECT_CLASS (gsm_power_manager_parent_class);
++
++ if (parent_class->finalize != NULL) {
++ parent_class->finalize (object);
++ }
++}
++
++static void
++gsm_power_manager_get_property (GObject *object,
++ guint prop_id,
++ GValue *value,
++ GParamSpec *pspec)
++{
++ GsmPowerManager *manager = GSM_POWER_MANAGER (object);
++
++ switch (prop_id) {
++ case PROP_IS_CONNECTED:
++ g_value_set_boolean (value,
++ manager->priv->is_connected);
++ break;
++
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object,
++ prop_id,
++ pspec);
++ }
++}
++
++GQuark
++gsm_power_manager_error_quark (void)
++{
++ static GQuark error_quark = 0;
++
++ if (error_quark == 0)
++ error_quark = g_quark_from_static_string ("gsm-power-manager-error");
++
++ return error_quark;
++}
++
++GsmPowerManager *
++gsm_power_manager_new (void)
++{
++ GsmPowerManager *manager;
++
++ manager = g_object_new (GSM_TYPE_POWER_MANAGER, NULL);
++
++ return manager;
++}
++
++gboolean
++gsm_power_manager_can_suspend (GsmPowerManager *manager)
++{
++ GError *error;
++ gboolean can_suspend;
++
++ error = NULL;
++
++ if (!ensure_gpm_connection (manager, &error)) {
++ g_message ("Could not connect to power manager: %s",
++ error->message);
++
++ g_error_free (error);
++
++ return FALSE;
++ }
++
++ can_suspend = FALSE;
++
++ if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "CanSuspend",
++ &error,
++ G_TYPE_INVALID,
++ G_TYPE_BOOLEAN, &can_suspend, G_TYPE_INVALID)) {
++ if (error != NULL) {
++ g_message ("Could not ask power manager if user can suspend: %s",
++ error->message);
++
++ g_error_free (error);
++ }
++
++ can_suspend = FALSE;
++ }
++
++ return can_suspend;
++}
++
++gboolean
++gsm_power_manager_can_hibernate (GsmPowerManager *manager)
++{
++ GError *error;
++ gboolean can_hibernate;
++
++ error = NULL;
++
++ if (!ensure_gpm_connection (manager, &error)) {
++ g_message ("Could not connect to power manager: %s",
++ error->message);
++
++ g_error_free (error);
++
++ return FALSE;
++ }
++
++ can_hibernate = FALSE;
++
++ if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "CanHibernate",
++ &error,
++ G_TYPE_INVALID,
++ G_TYPE_BOOLEAN, &can_hibernate, G_TYPE_INVALID)) {
++ if (error != NULL) {
++ g_message ("Could not ask power manager if user can suspend: %s",
++ error->message);
++
++ g_error_free (error);
++ }
++
++ can_hibernate = FALSE;
++ }
++
++ return can_hibernate;
++}
++
++void
++gsm_power_manager_attempt_suspend (GsmPowerManager *manager)
++{
++ GError *error;
++
++ error = NULL;
++
++ if (!ensure_gpm_connection (manager, &error)) {
++ g_warning ("Could not connect to power manager: %s",
++ error->message);
++ g_error_free (error);
++ return;
++ }
++
++ if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "Suspend",
++ &error,
++ G_TYPE_INVALID, G_TYPE_INVALID) &&
++ error != NULL) {
++ GError *call_error;
++
++ g_warning ("Could not ask power manager to suspend: %s",
++ error->message);
++
++ call_error = g_error_new_literal (GSM_POWER_MANAGER_ERROR,
++ GSM_POWER_MANAGER_ERROR_SUSPENDING,
++ error->message);
++
++ g_error_free (error);
++
++ g_signal_emit (G_OBJECT (manager),
++ signals[REQUEST_FAILED],
++ 0, call_error);
++
++ g_error_free (call_error);
++ }
++}
++
++void
++gsm_power_manager_attempt_hibernate (GsmPowerManager *manager)
++{
++ GError *error;
++
++ error = NULL;
++ if (!ensure_gpm_connection (manager, &error)) {
++ g_warning ("Could not connect to power manager: %s",
++ error->message);
++
++ g_error_free (error);
++
++ return;
++ }
++
++ if (!dbus_g_proxy_call (manager->priv->gpm_proxy, "Hibernate",
++ &error,
++ G_TYPE_INVALID, G_TYPE_INVALID) &&
++ error != NULL) {
++ GError *call_error;
++
++ g_warning ("Could not ask power manager to hibernate: %s",
++ error->message);
++
++ call_error = g_error_new_literal (GSM_POWER_MANAGER_ERROR,
++ GSM_POWER_MANAGER_ERROR_HIBERNATING,
++ error->message);
++
++ g_error_free (error);
++
++ g_signal_emit (G_OBJECT (manager),
++ signals[REQUEST_FAILED],
++ 0, call_error);
++
++ g_error_free (call_error);
++ }
++}
++
++
++GsmPowerManager *
++gsm_get_power_manager (void)
++{
++ static GsmPowerManager *manager = NULL;
++
++ if (manager == NULL) {
++ manager = gsm_power_manager_new ();
++ }
++
++ return g_object_ref (manager);
++}
diff --git a/x11/gnome-session/files/patch-gnome-session_gsm-power-manager.h b/x11/gnome-session/files/patch-gnome-session_gsm-power-manager.h
new file mode 100644
index 000000000000..2a27338b7dba
--- /dev/null
+++ b/x11/gnome-session/files/patch-gnome-session_gsm-power-manager.h
@@ -0,0 +1,90 @@
+--- gnome-session/gsm-power-manager.h.orig 2009-08-26 14:14:35.000000000 -0400
++++ gnome-session/gsm-power-manager.h 2009-08-26 14:15:07.000000000 -0400
+@@ -0,0 +1,87 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ *
++ * power-manager.h: functions for powering down, restarting, and
++ * suspending the computer
++ * Copyright (C) 2006 Ray Strode <rstrode@redhat.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++ * 02111-1307, USA.
++ */
++
++#ifndef __GSM_POWER_MANAGER_H__
++#define __GSM_POWER_MANAGER_H__
++
++#include <glib.h>
++#include <glib-object.h>
++
++G_BEGIN_DECLS
++
++#define GSM_TYPE_POWER_MANAGER (gsm_power_manager_get_type ())
++#define GSM_POWER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSM_TYPE_POWER_MANAGER, GsmPowerManager))
++#define GSM_POWER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSM_TYPE_POWER_MANAGER, GsmPowerManagerClass))
++#define GSM_IS_POWER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSM_TYPE_POWER_MANAGER))
++#define GSM_IS_POWER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSM_TYPE_POWER_MANAGER))
++#define GSM_POWER_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GSM_TYPE_POWER_MANAGER, GsmPowerManagerClass))
++#define GSM_POWER_MANAGER_ERROR (gsm_power_manager_error_quark ())
++
++typedef struct _GsmPowerManager GsmPowerManager;
++typedef struct _GsmPowerManagerClass GsmPowerManagerClass;
++typedef struct _GsmPowerManagerPrivate GsmPowerManagerPrivate;
++typedef enum _GsmPowerManagerError GsmPowerManagerError;
++
++struct _GsmPowerManager
++{
++ GObject parent;
++
++ GsmPowerManagerPrivate *priv;
++};
++
++struct _GsmPowerManagerClass
++{
++ GObjectClass parent_class;
++
++ void (* request_failed) (GsmPowerManager *manager,
++ GError *error);
++};
++
++enum _GsmPowerManagerError
++{
++ GSM_POWER_MANAGER_ERROR_SUSPENDING = 0,
++ GSM_POWER_MANAGER_ERROR_HIBERNATING
++};
++
++GType gsm_power_manager_get_type (void) G_GNUC_CONST;
++
++GQuark gsm_power_manager_error_quark (void);
++
++GsmPowerManager *gsm_power_manager_new (void) G_GNUC_MALLOC;
++
++GsmPowerManager *gsm_get_power_manager (void);
++
++gboolean gsm_power_manager_can_suspend (GsmPowerManager *manager);
++
++gboolean gsm_power_manager_can_hibernate (GsmPowerManager *manager);
++
++gboolean gsm_power_manager_can_power_down (GsmPowerManager *manager);
++
++gboolean gsm_power_manager_can_restart (GsmPowerManager *manager);
++
++void gsm_power_manager_attempt_suspend (GsmPowerManager *manager);
++
++void gsm_power_manager_attempt_hibernate (GsmPowerManager *manager);
++
++G_END_DECLS
++
++#endif /* __GSM_POWER_MANAGER_H__ */
diff --git a/x11/gnome-session/pkg-plist b/x11/gnome-session/pkg-plist
index 9bc1d79b0b8b..306533fcb5ca 100644
--- a/x11/gnome-session/pkg-plist
+++ b/x11/gnome-session/pkg-plist
@@ -2,15 +2,13 @@ bin/gnome-session
bin/gnome-session-properties
bin/gnome-session-save
bin/gnome-wm
-etc/xdg/autostart/at-spi-registryd-wrapper.desktop
+etc/xdg/autostart/gnome-session-splash.desktop
etc/xdg/autostart/gnome-settings-daemon-helper.desktop
-lib/gnome-session/helpers/at-spi-registryd-wrapper
lib/gnome-session/helpers/gnome-session-splash
lib/gnome-session/helpers/gnome-settings-daemon-helper
share/applications/session-properties.desktop
-%%DATADIR%%/gsm-inhibit-dialog.glade
-%%DATADIR%%/session-properties.glade
-share/gnome/autostart/gnome-session-splash.desktop
+%%DATADIR%%/gsm-inhibit-dialog.ui
+%%DATADIR%%/session-properties.ui
share/icons/hicolor/16x16/apps/session-properties.png
share/icons/hicolor/22x22/apps/session-properties.png
share/icons/hicolor/24x24/apps/session-properties.png
@@ -28,6 +26,7 @@ share/locale/be@latin/LC_MESSAGES/gnome-session-2.0.mo
share/locale/bg/LC_MESSAGES/gnome-session-2.0.mo
share/locale/bn/LC_MESSAGES/gnome-session-2.0.mo
share/locale/bn_IN/LC_MESSAGES/gnome-session-2.0.mo
+share/locale/br/LC_MESSAGES/gnome-session-2.0.mo
share/locale/bs/LC_MESSAGES/gnome-session-2.0.mo
share/locale/ca/LC_MESSAGES/gnome-session-2.0.mo
share/locale/ca@valencia/LC_MESSAGES/gnome-session-2.0.mo
@@ -68,6 +67,7 @@ share/locale/ko/LC_MESSAGES/gnome-session-2.0.mo
share/locale/ku/LC_MESSAGES/gnome-session-2.0.mo
share/locale/lt/LC_MESSAGES/gnome-session-2.0.mo
share/locale/lv/LC_MESSAGES/gnome-session-2.0.mo
+share/locale/mai/LC_MESSAGES/gnome-session-2.0.mo
share/locale/mg/LC_MESSAGES/gnome-session-2.0.mo
share/locale/mi/LC_MESSAGES/gnome-session-2.0.mo
share/locale/mk/LC_MESSAGES/gnome-session-2.0.mo
@@ -170,6 +170,8 @@ share/xsessions/gnome.desktop
@dirrmtry share/locale/mi
@dirrmtry share/locale/mg/LC_MESSAGES
@dirrmtry share/locale/mg
+@dirrmtry share/locale/mai/LC_MESSAGES
+@dirrmtry share/locale/mai
@dirrmtry share/locale/ku/LC_MESSAGES
@dirrmtry share/locale/ku
@dirrmtry share/locale/ig/LC_MESSAGES