gnome-session r4571 - in branches/new-gnome-session: . gnome-session



Author: lucasr
Date: Tue Feb 19 17:18:48 2008
New Revision: 4571
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4571&view=rev

Log:
2008-02-19  Lucas Rocha  <lucasr gnome org>

	* gnome-session/Makefile.am: added app-resumed.[ch] to the build.
	* gnome-session/app-resumed.[ch]: fix attribute name. 
	* gnome-session/session.c (gsm_session_new, 
	append_saved_session_apps): uncomment legacy saved session loading 
	code.


Modified:
   branches/new-gnome-session/ChangeLog
   branches/new-gnome-session/gnome-session/Makefile.am
   branches/new-gnome-session/gnome-session/app-resumed.c
   branches/new-gnome-session/gnome-session/app-resumed.h
   branches/new-gnome-session/gnome-session/session.c

Modified: branches/new-gnome-session/gnome-session/Makefile.am
==============================================================================
--- branches/new-gnome-session/gnome-session/Makefile.am	(original)
+++ branches/new-gnome-session/gnome-session/Makefile.am	Tue Feb 19 17:18:48 2008
@@ -24,6 +24,8 @@
 gnome_session_SOURCES =				\
 	app-autostart.c				\
 	app-autostart.h				\
+	app-resumed.c				\
+	app-resumed.h				\
 	app.c					\
 	app.h					\
 	client-xsmp.c				\

Modified: branches/new-gnome-session/gnome-session/app-resumed.c
==============================================================================
--- branches/new-gnome-session/gnome-session/app-resumed.c	(original)
+++ branches/new-gnome-session/gnome-session/app-resumed.c	Tue Feb 19 17:18:48 2008
@@ -80,12 +80,14 @@
   key = g_strdup_printf ("%d," SmProgram, n);
   val = g_key_file_get_string (session_file, "Default", key, NULL);
   g_free (key);
+
   if (val)
     app->program = val;
 
   key = g_strdup_printf ("%d," SmRestartCommand, n);
   val = g_key_file_get_string (session_file, "Default", key, NULL);
   g_free (key);
+
   if (val)
     app->restart_command = val;
 
@@ -95,7 +97,7 @@
    */
   app->discard_on_resume = FALSE;
 
-  return (GsmApp *)app;
+  return (GsmApp *) app;
 }
 
 /**
@@ -110,6 +112,7 @@
  *
  * Return value: the new #GsmApp, or %NULL on error
  **/
+#if 0
 GsmApp *
 gsm_app_resumed_new_from_session (GKeyFile *session_file, const char *group,
 				  gboolean discard)
@@ -157,6 +160,7 @@
    */
   return (GsmApp *)app;
 }
+#endif
 
 static pid_t
 launch (GsmApp *app, GError **err)

Modified: branches/new-gnome-session/gnome-session/app-resumed.h
==============================================================================
--- branches/new-gnome-session/gnome-session/app-resumed.h	(original)
+++ branches/new-gnome-session/gnome-session/app-resumed.h	Tue Feb 19 17:18:48 2008
@@ -26,7 +26,7 @@
 	GsmApp parent;
 
 	char *program, *restart_command, *discard_command;
-	gboolean discard_after_resume;
+	gboolean discard_on_resume;
 };
 
 struct _GsmAppResumedClass
@@ -45,6 +45,7 @@
 GsmApp *gsm_app_resumed_new_from_session        (GKeyFile   *session_file,
 						 const char *group,
 						 gboolean    discard);
+
 GsmApp *gsm_app_resumed_new_from_legacy_session (GKeyFile   *session_file,
 						 int         n);
 

Modified: branches/new-gnome-session/gnome-session/session.c
==============================================================================
--- branches/new-gnome-session/gnome-session/session.c	(original)
+++ branches/new-gnome-session/gnome-session/session.c	Tue Feb 19 17:18:48 2008
@@ -23,9 +23,7 @@
 #include <string.h>
 
 #include "app-autostart.h"
-#if 0
 #include "app-resumed.h"
-#endif
 #include "logout-dialog.h"
 #include "power-manager.h"
 #include "gdm.h"
@@ -36,9 +34,8 @@
 
 static void append_autostart_apps     (GsmSession *session,
 				       const char *dir);
-#if 0
+
 static void append_saved_session_apps (GsmSession *session);
-#endif
 
 static void append_required_apps      (GsmSession *session);
 
@@ -149,9 +146,7 @@
   append_autostart_apps (session, dir);
   g_free (dir);
 
-#if 0
   append_saved_session_apps (session);
-#endif
 
   /* We don't do this in the failsafe case, because the default
    * session should include all requirements anyway.
@@ -245,6 +240,7 @@
 
   g_key_file_free (saved);
 }
+#endif
 
 /* FIXME: need to make sure this only happens once */
 static void
@@ -277,6 +273,7 @@
 {
   char *session_filename;
 
+#if 0
   /* Try resuming last session first */
   session_filename = g_build_filename (g_get_home_dir (), ".gnome2",
 				       "session-state", "last", NULL);
@@ -298,6 +295,7 @@
       return;
     }
   g_free (session_filename);
+#endif
 
   /* Finally, try resuming from the old gnome-session's files */
   session_filename = g_build_filename (g_get_home_dir (), ".gnome2",
@@ -310,7 +308,6 @@
     }
   g_free (session_filename);
 }
-#endif
 
 static void
 append_required_apps (GsmSession *session)



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