summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2010-06-13 18:13:43 +0000
committerPacho Ramos <pacho@gentoo.org>2010-06-13 18:13:43 +0000
commit82f44c1004be48b79e515f4fc087e7f3c2fefdeb (patch)
tree14786825fee16712a1d7576067f84dd6f808b65f /gnome-base/gnome-session
parentversion bump and new homepage, as reported by f <zhixun DOT lin AT gmail DOT ... (diff)
downloadhistorical-82f44c1004be48b79e515f4fc087e7f3c2fefdeb.tar.gz
historical-82f44c1004be48b79e515f4fc087e7f3c2fefdeb.tar.bz2
historical-82f44c1004be48b79e515f4fc087e7f3c2fefdeb.zip
Add new version for Gnome 2.30
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'gnome-base/gnome-session')
-rw-r--r--gnome-base/gnome-session/ChangeLog9
-rw-r--r--gnome-base/gnome-session/Manifest11
-rw-r--r--gnome-base/gnome-session/files/gnome-session-2.30.0-session-saving-button.patch535
-rw-r--r--gnome-base/gnome-session/gnome-session-2.30.0-r1.ebuild93
4 files changed, 643 insertions, 5 deletions
diff --git a/gnome-base/gnome-session/ChangeLog b/gnome-base/gnome-session/ChangeLog
index 24adc3a1c8ea..88009a139d9d 100644
--- a/gnome-base/gnome-session/ChangeLog
+++ b/gnome-base/gnome-session/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for gnome-base/gnome-session
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/ChangeLog,v 1.256 2010/06/04 21:07:35 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/ChangeLog,v 1.257 2010/06/13 18:13:42 pacho Exp $
+
+*gnome-session-2.30.0-r1 (13 Jun 2010)
+
+ 13 Jun 2010; Pacho Ramos <pacho@gentoo.org>
+ +gnome-session-2.30.0-r1.ebuild,
+ +files/gnome-session-2.30.0-session-saving-button.patch:
+ Add new version for Gnome 2.30.
04 Jun 2010; Markus Meier <maekke@gentoo.org> gnome-session-2.28.0.ebuild:
x86 stable, bug #314899
diff --git a/gnome-base/gnome-session/Manifest b/gnome-base/gnome-session/Manifest
index 3b5cde298b7e..131637483523 100644
--- a/gnome-base/gnome-session/Manifest
+++ b/gnome-base/gnome-session/Manifest
@@ -13,21 +13,24 @@ AUX gnome-session-2.26.2-xsmp-stop-throw-error.patch 1056 RMD160 9b382852841e3f1
AUX gnome-session-2.27.91-gentoo-branding.patch 702 RMD160 6727c2e3dbd8fd29461e1224a160b88e027e1cfc SHA1 3223e8cdda47d006b4b7a8e8428509d7d9e417f1 SHA256 c72c26b77dbe89ca4ec6c36eece99dbf3c5cdc099d563fd8a78d68c7d2a197b4
AUX gnome-session-2.28.0-do-not-keep-zombie-clients.patch 2360 RMD160 52401adb702ee7bb6fd0cd9c225f2a740ca36eb9 SHA1 0f5068347d71355afa4f1ce90c96817a64adba25 SHA256 4ffb255330dcd1b16c12686feb4efe22fd5f63ea85c89a1bad7b92c2c2ceace1
AUX gnome-session-2.28.0-xsmp-stop-throw-error.patch 1159 RMD160 c0f0ea65a3a9e108479ca514099751450a95dc6d SHA1 2409efcc304b5e12258343b439808e3248233f11 SHA256 a1aed89db07542f80fc12338de6bf76199e165465973e25fe2a400a3fea5327e
+AUX gnome-session-2.30.0-session-saving-button.patch 21746 RMD160 f32556cd91edd3904135e4819bfa00621a552f31 SHA1 01a9be032f5d81e7f42d399b5031e1a8b61b41e8 SHA256 e6e283721b556535eef485352c67c68962cd6464b900d601306ed3d5bc0a59ab
DIST gentoo-splash.png 78064 RMD160 e75052892920e1c919aae1f6e53853c27b2e063f SHA1 e93c5f77389a5351af9948f7677c5592355cf860 SHA256 24fa48bc26db0d446e0098b3e94fd3cdec4610faca0b3282da0bec79bedbc179
DIST gnome-session-2.22.3.tar.bz2 773853 RMD160 a35065aa665ada5081f3fe19abc70950f8588e34 SHA1 817e007009e6e43cd2f1980e6d90546e7117cc9d SHA256 07ec872ae8213c4e92072ff74451caa2b6afb747fd0b07d2cea40cfcd32b7176
DIST gnome-session-2.26.2-session-saving-button.patch.bz2 4915 RMD160 dc694071d9ef5e4c494cb8ec949fe5e546e49d4d SHA1 54d4f9e64a2017486f69b3700f47461bed2ab4a5 SHA256 f0f1f6de3173f53bb565852a3bebd67d251cdfa16d9e3ef812bbeb89abc602ed
DIST gnome-session-2.26.2.tar.bz2 804340 RMD160 ff2c75cf5b8c3405ec5d2044510cf07eedede1d1 SHA1 ba43d9c623e6e79635a09cfbd6ecfce40ccbab05 SHA256 e089c7349bb6bc73d19f65c0a4536757968b929825ec38c616c8049bfd2d6905
DIST gnome-session-2.28.0.tar.bz2 822009 RMD160 aab868acf78d925dbb4896ecc4fb1f31e46d795f SHA1 a813c493383653e8e35b63b56b03517173f2ae8e SHA256 83e89a04fb090f1a1f6b609bdc39f1e69390269b885b7da6b32e980f4e765c0c
+DIST gnome-session-2.30.0.tar.bz2 827745 RMD160 b8b70fa2cd87af819d0d4285f848e15f36091cbd SHA1 d3bbca58bc785cc12962ab97eb0e42279a24ec6f SHA256 efeb45319403546fa60e6cb035e4de5e87731ea672fd37635749af49d0fd4d84
EBUILD gnome-session-2.22.3-r1.ebuild 2115 RMD160 6c9fbb9072b38fb9e162048f6c30706d03fe5f27 SHA1 a21447d9e69e27761089f98f272910e7ce16a2ed SHA256 da10117a817ea92d8be4371fb263d7ed2839c794f5274a6f03d2d45f353e0abe
EBUILD gnome-session-2.26.2-r1.ebuild 2362 RMD160 54d211f06d5c79da9cb003f807bd672d8fbf5569 SHA1 f6a8e63640304b7913919f37270bbd8523c2e03d SHA256 a12dd8d76028f896dd4afebcd8f12b72a6e493bde7324fc0bceb2e0e4f26286d
EBUILD gnome-session-2.26.2.ebuild 2155 RMD160 960cf59e6193b92f6a72c2f8c9b447541d277a1d SHA1 cad34f21b56055376193f880e162e1223e624490 SHA256 ad0b0d51050e2fe2bdad98c44e0eb09bd02d0d954ecc92b07157f7e8a0941522
EBUILD gnome-session-2.28.0.ebuild 3028 RMD160 97bdea1ee271c32b222944633792fb49d0105cf9 SHA1 e201e19f4ecda9f6badddae1af304e1a39b489e0 SHA256 241fec831c867fcd03ab11f32a535c0328426af38d2bcb205982d65d1b0527d9
-MISC ChangeLog 35922 RMD160 eb4c214f902c441d3155b59c1caea40f67a947e5 SHA1 07e7276baa4715eb44239eedf305f9d3f56cf147 SHA256 af6d7fafc30a2772500892a8eb0d0e3c897a6191b7bf74232f3bf97d8a9fd9cb
+EBUILD gnome-session-2.30.0-r1.ebuild 2632 RMD160 6b5dcd8c202d1677205ae81f050d8e9e4ec2fd20 SHA1 7857d4bf979b0db76397c9a5700a6966cb4529a8 SHA256 231a6a59229c9499e3568f165559631299ed7f0949748ba3f0e6e0da699c0465
+MISC ChangeLog 36136 RMD160 aeb383a694669aa31094b28992b90904142ed1f7 SHA1 9100f8079a6c8ba9d3493af253e05cf080c91566 SHA256 255a802c09654f87c1c937fd0021bbfa0c70d9a2d782f1875d0350e45e47a0fc
MISC metadata.xml 325 RMD160 4198957d5eb0a229eb906d1890c9de33cd76c1c7 SHA1 715be3b8b9162d4c3b0fd47b24dfb86624c0313d SHA256 25b431cfa002775be1fcb3ba978708e26aec42d182e6a0bbff125390fca07aba
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
-iEYEARECAAYFAkwJarQACgkQkKaRLQcq0GLm2gCcDqkev6EZB1u4uta7DgM5uifa
-mHkAn1WXoxxSC4TsX41CW32+RzbesJX+
-=ScAA
+iEYEARECAAYFAkwVH9wACgkQCaWpQKGI+9QIsgCeKT9Y0BkivntHjVkU/EY0g3B2
+OJ4AnRg5IP5tHeZ3WKDaj+bPLSav08nt
+=Ub4e
-----END PGP SIGNATURE-----
diff --git a/gnome-base/gnome-session/files/gnome-session-2.30.0-session-saving-button.patch b/gnome-base/gnome-session/files/gnome-session-2.30.0-session-saving-button.patch
new file mode 100644
index 000000000000..b6a4f4eac5ac
--- /dev/null
+++ b/gnome-base/gnome-session/files/gnome-session-2.30.0-session-saving-button.patch
@@ -0,0 +1,535 @@
+Based on the patch in GNOME #575544
+Index: gnome-session-2.28.0/gnome-session/gsm-manager.c
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/gsm-manager.c 2009-09-18 18:36:04.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/gsm-manager.c 2009-10-24 12:43:56.861770100 +0200
+@@ -68,6 +68,7 @@
+ #define GSM_MANAGER_DBUS_NAME "org.gnome.SessionManager"
+
+ #define GSM_MANAGER_PHASE_TIMEOUT 10 /* seconds */
++#define GSM_MANAGER_SAVE_SESSION_TIMEOUT 2
+
+ #define GDM_FLEXISERVER_COMMAND "gdmflexiserver"
+ #define GDM_FLEXISERVER_ARGS "--startnew Standard"
+@@ -1147,6 +1148,69 @@ query_end_session_complete (GsmManager *
+
+ }
+
++static gboolean
++_client_request_save (GsmClient *client,
++ ClientEndSessionData *data)
++{
++ gboolean ret;
++ GError *error;
++
++ error = NULL;
++ ret = gsm_client_request_save (client, data->flags, &error);
++ if (ret) {
++ g_debug ("GsmManager: adding client to query clients: %s", gsm_client_peek_id (client));
++ data->manager->priv->query_clients = g_slist_prepend (data->manager->priv->query_clients,
++ client);
++ } else if (error) {
++ g_debug ("GsmManager: unable to query client: %s", error->message);
++ g_error_free (error);
++ }
++
++ return FALSE;
++}
++
++static gboolean
++_client_request_save_helper (const char *id,
++ GsmClient *client,
++ ClientEndSessionData *data)
++{
++ return _client_request_save (client, data);
++}
++
++static void
++query_save_session_complete (GsmManager *manager)
++{
++ GError *error = NULL;
++
++ if (g_slist_length (manager->priv->next_query_clients) > 0) {
++ ClientEndSessionData data;
++
++ data.manager = manager;
++ data.flags = GSM_CLIENT_END_SESSION_FLAG_LAST;
++
++ g_slist_foreach (manager->priv->next_query_clients,
++ (GFunc)_client_request_save,
++ &data);
++
++ g_slist_free (manager->priv->next_query_clients);
++ manager->priv->next_query_clients = NULL;
++
++ return;
++ }
++
++ if (manager->priv->query_timeout_id > 0) {
++ g_source_remove (manager->priv->query_timeout_id);
++ manager->priv->query_timeout_id = 0;
++ }
++
++ gsm_session_save (manager->priv->clients, &error);
++
++ if (error) {
++ g_warning ("Error saving session: %s", error->message);
++ g_error_free (error);
++ }
++}
++
+ static guint32
+ generate_cookie (void)
+ {
+@@ -1221,6 +1285,21 @@ _on_query_end_session_timeout (GsmManage
+ return FALSE;
+ }
+
++static gboolean
++_on_query_save_session_timeout (GsmManager *manager)
++{
++ manager->priv->query_timeout_id = 0;
++
++ g_debug ("GsmManager: query to save session timed out");
++
++ g_slist_free (manager->priv->query_clients);
++ manager->priv->query_clients = NULL;
++
++ query_save_session_complete (manager);
++
++ return FALSE;
++}
++
+ static void
+ do_phase_query_end_session (GsmManager *manager)
+ {
+@@ -1857,13 +1936,32 @@ on_client_end_session_response (GsmClien
+ const char *reason,
+ GsmManager *manager)
+ {
+- /* just ignore if received outside of shutdown */
+- if (manager->priv->phase < GSM_MANAGER_PHASE_QUERY_END_SESSION) {
++ /* just ignore if we are not yet running */
++ if (manager->priv->phase < GSM_MANAGER_PHASE_RUNNING) {
+ return;
+ }
+
+ g_debug ("GsmManager: Response from end session request: is-ok=%d do-last=%d cancel=%d reason=%s", is_ok, do_last, cancel, reason ? reason :"");
+
++ if (manager->priv->phase == GSM_MANAGER_PHASE_RUNNING) {
++ /* Ignore responses when no requests were sent */
++ if (manager->priv->query_clients == NULL) {
++ return;
++ }
++
++ manager->priv->query_clients = g_slist_remove (manager->priv->query_clients, client);
++
++ if (do_last) {
++ manager->priv->next_query_clients = g_slist_prepend (manager->priv->next_query_clients,
++ client);
++ }
++
++ if (manager->priv->query_clients == NULL) {
++ query_save_session_complete (manager);
++ }
++ return;
++ }
++
+ if (cancel) {
+ cancel_end_session (manager);
+ return;
+@@ -1962,6 +2060,15 @@ on_xsmp_client_logout_request (GsmXSMPCl
+ }
+
+ static void
++on_xsmp_client_save_request (GsmXSMPClient *client,
++ gboolean show_dialog,
++ GsmManager *manager)
++{
++ g_debug ("GsmManager: save_request");
++ gsm_manager_save_session (manager, NULL);
++}
++
++static void
+ on_store_client_added (GsmStore *store,
+ const char *id,
+ GsmManager *manager)
+@@ -1982,6 +2089,10 @@ on_store_client_added (GsmStore *store
+ "logout-request",
+ G_CALLBACK (on_xsmp_client_logout_request),
+ manager);
++ g_signal_connect (client,
++ "save-request",
++ G_CALLBACK (on_xsmp_client_save_request),
++ manager);
+ }
+
+ g_signal_connect (client,
+@@ -2939,6 +3050,41 @@ gsm_manager_shutdown (GsmManager *manage
+ }
+
+ gboolean
++gsm_manager_save_session (GsmManager *manager,
++ GError **error)
++{
++ ClientEndSessionData data;
++
++ g_debug ("GsmManager: SaveSession called");
++
++ g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
++
++ if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING) {
++ g_set_error (error,
++ GSM_MANAGER_ERROR,
++ GSM_MANAGER_ERROR_NOT_IN_RUNNING,
++ "SaveSession interface is only available during the Running phase");
++ return FALSE;
++ }
++
++ data.manager = manager;
++ data.flags = 0;
++ gsm_store_foreach (manager->priv->clients,
++ (GsmStoreFunc)_client_request_save_helper,
++ &data);
++
++ if (manager->priv->query_clients) {
++ manager->priv->query_timeout_id = g_timeout_add_seconds (GSM_MANAGER_SAVE_SESSION_TIMEOUT,
++ (GSourceFunc)_on_query_save_session_timeout,
++ manager);
++ return TRUE;
++ } else {
++ g_debug ("GsmManager: Nothing to save");
++ return FALSE;
++ }
++}
++
++gboolean
+ gsm_manager_can_shutdown (GsmManager *manager,
+ gboolean *shutdown_available,
+ GError **error)
+Index: gnome-session-2.28.0/gnome-session/gsm-manager.h
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/gsm-manager.h 2009-04-19 20:26:52.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/gsm-manager.h 2009-10-24 12:43:56.861770100 +0200
+@@ -152,6 +152,9 @@ gboolean gsm_manager_is_inhib
+ gboolean gsm_manager_shutdown (GsmManager *manager,
+ GError **error);
+
++gboolean gsm_manager_save_session (GsmManager *manager,
++ GError **error);
++
+ gboolean gsm_manager_can_shutdown (GsmManager *manager,
+ gboolean *shutdown_available,
+ GError **error);
+Index: gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/gsm-xsmp-client.c 2009-07-29 02:36:08.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c 2009-10-24 12:43:56.861770100 +0200
+@@ -70,6 +70,7 @@ enum {
+ enum {
+ REGISTER_REQUEST,
+ LOGOUT_REQUEST,
++ SAVE_REQUEST,
+ LAST_SIGNAL
+ };
+
+@@ -523,6 +524,30 @@ xsmp_cancel_end_session (GsmClient *clie
+ return TRUE;
+ }
+
++static gboolean
++xsmp_request_save (GsmClient *client,
++ guint flags,
++ GError **error)
++{
++ GsmXSMPClient *xsmp = (GsmXSMPClient *) client;
++
++ g_debug ("GsmXSMPClient: xsmp_request_save ('%s')", xsmp->priv->description);
++
++ if (xsmp->priv->conn == NULL) {
++ g_set_error (error,
++ GSM_CLIENT_ERROR,
++ GSM_CLIENT_ERROR_NOT_REGISTERED,
++ "Client is not registered");
++ return FALSE;
++ }
++
++ if (flags & GSM_CLIENT_END_SESSION_FLAG_LAST)
++ xsmp_save_yourself_phase2 (client);
++ else
++ do_save_yourself (xsmp, SmSaveLocal, FALSE);
++
++ return TRUE;
++}
+ static char *
+ get_desktop_file_path (GsmXSMPClient *client)
+ {
+@@ -993,6 +1018,7 @@ gsm_xsmp_client_class_init (GsmXSMPClien
+ object_class->get_property = gsm_xsmp_client_get_property;
+ object_class->set_property = gsm_xsmp_client_set_property;
+
++ client_class->impl_request_save = xsmp_request_save;
+ client_class->impl_save = xsmp_save;
+ client_class->impl_stop = xsmp_stop;
+ client_class->impl_query_end_session = xsmp_query_end_session;
+@@ -1023,6 +1049,17 @@ gsm_xsmp_client_class_init (GsmXSMPClien
+ G_TYPE_NONE,
+ 1, G_TYPE_BOOLEAN);
+
++ signals[SAVE_REQUEST] =
++ g_signal_new ("save-request",
++ G_OBJECT_CLASS_TYPE (object_class),
++ G_SIGNAL_RUN_LAST,
++ G_STRUCT_OFFSET (GsmXSMPClientClass, save_request),
++ NULL,
++ NULL,
++ g_cclosure_marshal_VOID__BOOLEAN,
++ G_TYPE_NONE,
++ 1, G_TYPE_BOOLEAN);
++
+ g_object_class_install_property (object_class,
+ PROP_ICE_CONNECTION,
+ g_param_spec_pointer ("ice-connection",
+Index: gnome-session-2.28.0/gnome-session/gsm-xsmp-client.h
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/gsm-xsmp-client.h 2009-04-19 20:26:52.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/gsm-xsmp-client.h 2009-10-24 12:43:56.861770100 +0200
+@@ -54,7 +54,8 @@ struct _GsmXSMPClientClass
+ char **client_id);
+ gboolean (*logout_request) (GsmXSMPClient *client,
+ gboolean prompt);
+-
++ gboolean (*save_request) (GsmXSMPClient *client,
++ gboolean prompt);
+
+ void (*saved_state) (GsmXSMPClient *client);
+
+Index: gnome-session-2.28.0/gnome-session/org.gnome.SessionManager.xml
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/org.gnome.SessionManager.xml 2009-04-19 20:26:52.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/org.gnome.SessionManager.xml 2009-10-24 12:43:56.865763345 +0200
+@@ -256,6 +256,14 @@
+ </doc:doc>
+ </method>
+
++ <method name="SaveSession">
++ <doc:doc>
++ <doc:description>
++ <doc:para>Request to save session</doc:para>
++ </doc:description>
++ </doc:doc>
++ </method>
++
+ <method name="CanShutdown">
+ <arg name="is_available" direction="out" type="b">
+ <doc:doc>
+Index: gnome-session-2.28.0/capplet/gsm-properties-dialog.c
+===================================================================
+--- gnome-session-2.28.0.orig/capplet/gsm-properties-dialog.c 2009-08-25 10:03:42.000000000 +0200
++++ gnome-session-2.28.0/capplet/gsm-properties-dialog.c 2009-10-24 13:21:57.910268989 +0200
+@@ -35,6 +35,12 @@
+ #include "gsm-util.h"
+ #include "gsp-app.h"
+ #include "gsp-app-manager.h"
++#include <dbus/dbus-glib.h>
++#include <dbus/dbus-glib-lowlevel.h>
++
++#define GSM_SERVICE_DBUS "org.gnome.SessionManager"
++#define GSM_PATH_DBUS "/org/gnome/SessionManager"
++#define GSM_INTERFACE_DBUS "org.gnome.SessionManager"
+
+ #define GSM_PROPERTIES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_PROPERTIES_DIALOG, GsmPropertiesDialogPrivate))
+
+@@ -50,6 +56,7 @@
+ #define CAPPLET_DELETE_WIDGET_NAME "session_properties_delete_button"
+ #define CAPPLET_EDIT_WIDGET_NAME "session_properties_edit_button"
+ #define CAPPLET_SAVE_WIDGET_NAME "session_properties_save_button"
++#define CAPPLET_SESSION_SAVED_WIDGET_NAME "session_properties_session_saved_label"
+ #define CAPPLET_REMEMBER_WIDGET_NAME "session_properties_remember_toggle"
+
+ #define STARTUP_APP_ICON "system-run"
+@@ -493,10 +500,64 @@ on_autosave_value_toggled (GtkToggleButt
+ }
+
+ static void
++session_saved_message (GsmPropertiesDialog *dialog,
++ const char *msg,
++ gboolean is_error)
++{
++ GtkLabel *label;
++ gchar *markup;
++ label = GTK_LABEL (gtk_builder_get_object (dialog->priv->xml, CAPPLET_SESSION_SAVED_WIDGET_NAME));
++ if (is_error)
++ markup = g_markup_printf_escaped ("<span foreground=\"red\">%s</span>", msg);
++ else
++ markup = g_markup_escape_text (msg, -1);
++ gtk_label_set_markup (label, markup);
++ g_free (markup);
++}
++
++static void
++session_saved_cb (DBusGProxy *proxy,
++ DBusGProxyCall *call_id,
++ void *user_data)
++{
++ gboolean res;
++ GsmPropertiesDialog *dialog = user_data;
++
++ res = dbus_g_proxy_end_call (proxy, call_id, NULL, G_TYPE_INVALID);
++ if (res)
++ session_saved_message (dialog, _("Your session has been saved."), FALSE);
++ else
++ session_saved_message (dialog, _("Failed to save session"), TRUE);
++
++ g_object_unref (proxy);
++}
++
++static void
+ on_save_session_clicked (GtkWidget *widget,
+ GsmPropertiesDialog *dialog)
+ {
+- g_debug ("Session saving is not implemented yet!");
++ DBusGConnection *conn;
++ DBusGProxy *proxy;
++ DBusGProxyCall *call;
++
++ conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
++ if (conn == NULL) {
++ session_saved_message (dialog, _("Could not connect to the session bus"), TRUE);
++ return;
++ }
++
++ proxy = dbus_g_proxy_new_for_name (conn, GSM_SERVICE_DBUS, GSM_PATH_DBUS, GSM_INTERFACE_DBUS);
++ if (proxy == NULL) {
++ session_saved_message (dialog, _("Could not connect to the session manager"), TRUE);
++ return;
++ }
++
++ call = dbus_g_proxy_begin_call (proxy, "SaveSession", session_saved_cb, dialog, NULL, G_TYPE_INVALID);
++ if (call == NULL) {
++ session_saved_message (dialog, _("Failed to save session"), TRUE);
++ g_object_unref (proxy);
++ return;
++ }
+ }
+
+ static void
+Index: gnome-session-2.28.0/configure.in
+===================================================================
+--- gnome-session-2.28.0.orig/configure.in 2009-09-09 02:21:06.000000000 +0200
++++ gnome-session-2.28.0/configure.in 2009-10-24 12:46:15.021757805 +0200
+@@ -59,6 +59,7 @@ PKG_CHECK_MODULES(GNOME_SESSION,
+ PKG_CHECK_MODULES(SESSION_PROPERTIES,
+ glib-2.0 >= $GLIB_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
++ dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+ )
+
+ PKG_CHECK_MODULES(SPLASH,
+Index: gnome-session-2.28.0/gnome-session/gsm-client.h
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/gsm-client.h 2009-04-19 20:26:52.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/gsm-client.h 2009-10-24 12:43:56.873765479 +0200
+@@ -92,6 +92,9 @@ struct _GsmClientClass
+ GError **error);
+ gboolean (*impl_stop) (GsmClient *client,
+ GError **error);
++ gboolean (*impl_request_save) (GsmClient *client,
++ guint flags,
++ GError **error);
+ GKeyFile * (*impl_save) (GsmClient *client,
+ GError **error);
+ };
+@@ -137,6 +140,9 @@ gboolean gsm_client_cancel_
+
+ void gsm_client_disconnected (GsmClient *client);
+
++gboolean gsm_client_request_save (GsmClient *client,
++ guint flags,
++ GError **error);
+ GKeyFile *gsm_client_save (GsmClient *client,
+ GError **error);
+ /* exported to bus */
+Index: gnome-session-2.28.0/gnome-session/gsm-dbus-client.c
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/gsm-dbus-client.c 2009-04-19 20:26:52.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/gsm-dbus-client.c 2009-10-24 12:43:56.873765479 +0200
+@@ -413,6 +413,19 @@ gsm_dbus_client_finalize (GObject *objec
+ G_OBJECT_CLASS (gsm_dbus_client_parent_class)->finalize (object);
+ }
+
++static gboolean
++dbus_client_request_save (GsmClient *client,
++ guint flags,
++ GError **error)
++{
++ g_debug ("GsmDBusClient: sending save request to client with id %s",
++ gsm_client_peek_id (client));
++
++ /* FIXME: The protocol does not support this */
++
++ return FALSE;
++}
++
+ static GKeyFile *
+ dbus_client_save (GsmClient *client,
+ GError **error)
+@@ -665,6 +678,7 @@ gsm_dbus_client_class_init (GsmDBusClien
+ object_class->set_property = gsm_dbus_client_set_property;
+ object_class->dispose = gsm_dbus_client_dispose;
+
++ client_class->impl_request_save = dbus_client_request_save;
+ client_class->impl_save = dbus_client_save;
+ client_class->impl_stop = dbus_client_stop;
+ client_class->impl_query_end_session = dbus_client_query_end_session;
+Index: gnome-session-2.28.0/gnome-session/gsm-client.c
+===================================================================
+--- gnome-session-2.28.0.orig/gnome-session/gsm-client.c 2009-04-19 20:26:52.000000000 +0200
++++ gnome-session-2.28.0/gnome-session/gsm-client.c 2009-10-24 12:43:56.877763612 +0200
+@@ -510,6 +510,16 @@ gsm_client_disconnected (GsmClient *clie
+ g_signal_emit (client, signals[DISCONNECTED], 0);
+ }
+
++gboolean
++gsm_client_request_save (GsmClient *client,
++ guint flags,
++ GError **error)
++{
++ g_return_val_if_fail (GSM_IS_CLIENT (client), FALSE);
++
++ return GSM_CLIENT_GET_CLASS (client)->impl_request_save (client, flags, error);
++}
++
+ GKeyFile *
+ gsm_client_save (GsmClient *client,
+ GError **error)
+Index: gnome-session-2.28.0/data/session-properties.ui
+===================================================================
+--- gnome-session-2.28.0.orig/data/session-properties.ui 2009-10-24 12:55:01.946268673 +0200
++++ gnome-session-2.28.0/data/session-properties.ui 2009-10-24 12:54:11.638268279 +0200
+@@ -148,6 +148,7 @@
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="session_properties_save_button">
++ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <child>
+@@ -191,6 +192,17 @@
+ <property name="position">1</property>
+ </packing>
+ </child>
++ <child>
++ <object class="GtkLabel" id="session_properties_session_saved_label">
++ <property name="visible">True</property>
++ <property name="wrap">True</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">False</property>
++ <property name="position">2</property>
++ </packing>
++ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
diff --git a/gnome-base/gnome-session/gnome-session-2.30.0-r1.ebuild b/gnome-base/gnome-session/gnome-session-2.30.0-r1.ebuild
new file mode 100644
index 000000000000..e632ddf05024
--- /dev/null
+++ b/gnome-base/gnome-session/gnome-session-2.30.0-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/gnome-session-2.30.0-r1.ebuild,v 1.1 2010/06/13 18:13:42 pacho Exp $
+
+EAPI="3"
+
+inherit eutils gnome2
+
+DESCRIPTION="Gnome session manager"
+HOMEPAGE="http://www.gnome.org/"
+SRC_URI="${SRC_URI}
+ mirror://gentoo/${PN}-2.26.2-session-saving-button.patch.bz2
+ branding? ( mirror://gentoo/gentoo-splash.png )"
+
+LICENSE="GPL-2 LGPL-2 FDL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+
+IUSE="branding doc ipv6 +splash elibc_FreeBSD"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=x11-libs/gtk+-2.14.0
+ >=dev-libs/dbus-glib-0.76
+ >=gnome-base/gconf-2
+ >=x11-libs/startup-notification-0.10
+ || ( sys-power/upower >=sys-apps/devicekit-power-008 )
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXtst
+ x11-apps/xdpyinfo"
+DEPEND="${RDEPEND}
+ >=dev-lang/perl-5
+ >=sys-devel/gettext-0.10.40
+ >=dev-util/pkgconfig-0.17
+ >=dev-util/intltool-0.40
+ !<gnome-base/gdm-2.20.4
+ doc? (
+ app-text/xmlto
+ dev-libs/libxslt )"
+# gnome-base/gdm does not provide gnome.desktop anymore
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+pkg_setup() {
+ # TODO: convert libnotify to a configure option
+ G2CONF="${G2CONF}
+ --docdir=${EPREFIX}/usr/share/doc/${PF}
+ --with-default-wm=gnome-wm
+ $(use_enable splash)
+ $(use_enable doc docbook-docs)
+ $(use_enable ipv6)"
+
+ if use branding && ! use splash; then
+ ewarn "You have disabled splash but enabled branding support"
+ ewarn "splash support has been auto-enabled for branding"
+ G2CONF="${G2CONF} --enable-splash"
+ fi
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Patch for Gentoo Branding (bug #42687)
+ use branding && epatch "${FILESDIR}/${PN}-2.27.91-gentoo-branding.patch"
+
+ # Fix shutdown/restart capability, upstream bug #549150
+ # FIXME: Needs updating for 2.27.91 (package is currently masked)
+ #epatch "${FILESDIR}/${PN}-2.26.2-shutdown.patch"
+
+ # Add "session saving" button back, upstream bug #575544
+ epatch "${FILESDIR}/${PN}-2.30.0-session-saving-button.patch"
+
+ # Fix intltoolize broken file, see upstream #577133
+ sed "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" -i po/Makefile.in.in || die "sed failed"
+}
+
+src_install() {
+ gnome2_src_install
+
+ dodir /etc/X11/Sessions
+ exeinto /etc/X11/Sessions
+ doexe "${FILESDIR}/Gnome" || die "doexe failed"
+
+ # Our own splash for world domination
+ if use branding; then
+ insinto /usr/share/pixmaps/splash/
+ doins "${DISTDIR}/gentoo-splash.png" || die "doins failed"
+ fi
+}