gnome-session r5361 - in trunk: . gnome-session



Author: vuntz
Date: Tue Mar 24 23:33:10 2009
New Revision: 5361
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5361&view=rev

Log:
2009-03-25  Vincent Untz  <vuntz gnome org>

	Allow clients to specify that they want to be ended last (this mainly
	matches the Phase2 of SaveYourself in XSMP). The server doesn't use
	this information yet.

	* gnome-session/gsm-client.[ch]: (gsm_client_class_init): add new
	do_last argument to END_SESSION_RESPONSE signal
	(gdm_client_end_session_response): add do_last and use it
	* gnome-session/gsm-marshal.list: updated for new signature
	* gnome-session/gsm-manager.c: (on_client_end_session_response): add
	do_last parameter, unused for now
	* gnome-session/gsm-dbus-client.c: (handle_end_session_response): pass
	FALSE as do_last
	* gnome-session/gsm-xsmp-client.c:
	(save_yourself_phase2_request_callback): pass TRUE as do_last since
	that's what the phase2 is
	(interact_request_callback): pass FALSE as do_last
	(interact_done_callback): pass FALSE as do_last
	(save_yourself_done_callback): pass FALSE as do_last


Modified:
   trunk/ChangeLog
   trunk/gnome-session/gsm-client.c
   trunk/gnome-session/gsm-client.h
   trunk/gnome-session/gsm-dbus-client.c
   trunk/gnome-session/gsm-manager.c
   trunk/gnome-session/gsm-marshal.list
   trunk/gnome-session/gsm-xsmp-client.c

Modified: trunk/gnome-session/gsm-client.c
==============================================================================
--- trunk/gnome-session/gsm-client.c	(original)
+++ trunk/gnome-session/gsm-client.c	Tue Mar 24 23:33:10 2009
@@ -324,9 +324,9 @@
                               G_SIGNAL_RUN_LAST,
                               G_STRUCT_OFFSET (GsmClientClass, end_session_response),
                               NULL, NULL,
-                              gsm_marshal_VOID__BOOLEAN_BOOLEAN_STRING,
+                              gsm_marshal_VOID__BOOLEAN_BOOLEAN_BOOLEAN_STRING,
                               G_TYPE_NONE,
-                              3, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_STRING);
+                              4, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_STRING);
 
         g_object_class_install_property (object_class,
                                          PROP_STARTUP_ID,
@@ -522,9 +522,10 @@
 void
 gdm_client_end_session_response (GsmClient  *client,
                                  gboolean    is_ok,
+                                 gboolean    do_last,
                                  gboolean    cancel,
                                  const char *reason)
 {
         g_signal_emit (client, signals[END_SESSION_RESPONSE], 0,
-                       is_ok, cancel, reason);
+                       is_ok, do_last, cancel, reason);
 }

Modified: trunk/gnome-session/gsm-client.h
==============================================================================
--- trunk/gnome-session/gsm-client.h	(original)
+++ trunk/gnome-session/gsm-client.h	Tue Mar 24 23:33:10 2009
@@ -73,6 +73,7 @@
         void         (*disconnected)               (GsmClient  *client);
         void         (*end_session_response)       (GsmClient  *client,
                                                     gboolean    ok,
+                                                    gboolean    do_last,
                                                     gboolean    cancel,
                                                     const char *reason);
 
@@ -160,6 +161,7 @@
 
 void                  gdm_client_end_session_response       (GsmClient  *client,
                                                              gboolean    is_ok,
+                                                             gboolean    do_last,
                                                              gboolean    cancel,
                                                              const char *reason);
 

Modified: trunk/gnome-session/gsm-dbus-client.c
==============================================================================
--- trunk/gnome-session/gsm-dbus-client.c	(original)
+++ trunk/gnome-session/gsm-dbus-client.c	Tue Mar 24 23:33:10 2009
@@ -190,7 +190,7 @@
         }
 
         gdm_client_end_session_response (GSM_CLIENT (client),
-                                         is_ok, FALSE, reason);
+                                         is_ok, FALSE, FALSE, reason);
 
 
         if (! dbus_connection_send (client->priv->connection, reply, NULL)) {

Modified: trunk/gnome-session/gsm-manager.c
==============================================================================
--- trunk/gnome-session/gsm-manager.c	(original)
+++ trunk/gnome-session/gsm-manager.c	Tue Mar 24 23:33:10 2009
@@ -1667,6 +1667,7 @@
 static void
 on_client_end_session_response (GsmClient  *client,
                                 gboolean    is_ok,
+                                gboolean    do_last,
                                 gboolean    cancel,
                                 const char *reason,
                                 GsmManager *manager)
@@ -1676,7 +1677,7 @@
                 return;
         }
 
-        g_debug ("GsmManager: Response from end session request: is-ok=%d cancel=%d reason=%s", is_ok, cancel, reason);
+        g_debug ("GsmManager: Response from end session request: is-ok=%d do-last=%d cancel=%d reason=%s", is_ok, do_last, cancel, reason);
 
         if (cancel) {
                 cancel_end_session (manager);

Modified: trunk/gnome-session/gsm-marshal.list
==============================================================================
--- trunk/gnome-session/gsm-marshal.list	(original)
+++ trunk/gnome-session/gsm-marshal.list	Tue Mar 24 23:33:10 2009
@@ -1,2 +1,2 @@
 BOOLEAN:POINTER
-VOID:BOOLEAN,BOOLEAN,STRING
+VOID:BOOLEAN,BOOLEAN,BOOLEAN,STRING

Modified: trunk/gnome-session/gsm-xsmp-client.c
==============================================================================
--- trunk/gnome-session/gsm-xsmp-client.c	(original)
+++ trunk/gnome-session/gsm-xsmp-client.c	Tue Mar 24 23:33:10 2009
@@ -1153,10 +1153,8 @@
         /* this is a valid response to SaveYourself and therefore
            may be a response to a QES or ES */
         gdm_client_end_session_response (GSM_CLIENT (client),
-                                         TRUE, FALSE,
+                                         TRUE, TRUE, FALSE,
                                          NULL);
-
-        /* FIXME: change priority so this client runs at the end? */
 }
 
 static void
@@ -1175,7 +1173,7 @@
                  dialog_type == SmDialogNormal ? "Dialog" : "Errors");
 
         gdm_client_end_session_response (GSM_CLIENT (client),
-                                         FALSE, FALSE,
+                                         FALSE, FALSE, FALSE,
                                          _("This program is blocking log out."));
 
 #if 0
@@ -1206,7 +1204,7 @@
                  cancel_shutdown ? "True" : "False");
 
         gdm_client_end_session_response (GSM_CLIENT (client),
-                                         TRUE, cancel_shutdown,
+                                         TRUE, FALSE, cancel_shutdown,
                                          NULL);
 }
 
@@ -1228,7 +1226,7 @@
          * the session manager can do about, though. FIXME: we could display a
          * dialog about this, I guess. */
         gdm_client_end_session_response (GSM_CLIENT (client),
-                                         TRUE, FALSE,
+                                         TRUE, FALSE, FALSE,
                                          NULL);
 
         if (client->priv->next_save_yourself) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]