Hello community,
here is the log from the commit of package gnome-session
checked in at Fri Apr 28 21:10:45 CEST 2006.
--------
--- GNOME/gnome-session/gnome-session.changes 2006-04-26 17:11:59.000000000 +0200
+++ STABLE/gnome-session/gnome-session.changes 2006-04-28 11:22:36.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Apr 28 11:21:56 CEST 2006 - rodrigo@suse.de
+
+- Save modified autostart files to user's home when they come from
+ system-wide directories (170038).
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-session.spec ++++++
--- /var/tmp/diff_new_pack.UJg0Fg/_old 2006-04-28 21:10:36.000000000 +0200
+++ /var/tmp/diff_new_pack.UJg0Fg/_new 2006-04-28 21:10:36.000000000 +0200
@@ -18,7 +18,7 @@
Group: System/GUI/GNOME
Autoreqprov: on
Version: 2.12.0
-Release: 97
+Release: 100
Summary: Session Tools for the GNOME 2.x Desktop
Source: gnome-session-%{version}.tar.bz2
Source1: gnome
@@ -150,6 +150,9 @@
%dir /usr/share/xsessions
%changelog -n gnome-session
+* Fri Apr 28 2006 - rodrigo@suse.de
+- Save modified autostart files to user's home when they come from
+ system-wide directories (170038).
* Wed Apr 26 2006 - rodrigo@suse.de
- Don't free session_name, since it's needed at the end for saving
the session correctly (169672).
++++++ gnome-session-autostart.patch ++++++
--- /var/tmp/diff_new_pack.UJg0Fg/_old 2006-04-28 21:10:36.000000000 +0200
+++ /var/tmp/diff_new_pack.UJg0Fg/_new 2006-04-28 21:10:36.000000000 +0200
@@ -1,6 +1,6 @@
-diff -upr gnome-session-2.12.0-orig/configure.in gnome-session-2.12.0-autostart/configure.in
+diff -upr gnome-session-2.12.0-orig/configure.in gnome-session-2.12.0/configure.in
--- gnome-session-2.12.0-orig/configure.in 2005-09-06 11:11:29.000000000 +0200
-+++ gnome-session-2.12.0-autostart/configure.in 2006-03-06 20:53:03.000000000 +0100
++++ gnome-session-2.12.0/configure.in 2006-04-27 13:27:04.000000000 +0200
@@ -57,7 +57,25 @@ PKG_CHECK_MODULES(SOUND_TEST, $ESOUND_MO
ESOUND_MODULE=""
])
@@ -28,9 +28,9 @@
dnl gconf checks
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
-diff -upr gnome-session-2.12.0-orig/gnome-session/save.c gnome-session-2.12.0-autostart/gnome-session/save.c
+diff -upr gnome-session-2.12.0-orig/gnome-session/save.c gnome-session-2.12.0/gnome-session/save.c
--- gnome-session-2.12.0-orig/gnome-session/save.c 2002-05-28 03:51:31.000000000 +0200
-+++ gnome-session-2.12.0-autostart/gnome-session/save.c 2006-03-06 23:22:43.000000000 +0100
++++ gnome-session-2.12.0/gnome-session/save.c 2006-04-27 13:27:04.000000000 +0200
@@ -19,12 +19,14 @@
#include
@@ -220,7 +220,7 @@
/* frees lock on session at shutdown */
void
-@@ -411,6 +552,74 @@ get_current_session(void)
+@@ -411,6 +553,74 @@ get_current_session(void)
}
}
@@ -295,7 +295,7 @@
/* Load a session from the config file by name. */
Session*
-@@ -444,8 +653,65 @@ read_session (const char *name)
+@@ -444,8 +654,65 @@ read_session (const char *name)
* created from the session-properties capplet
*/
list = read_clients (MANUAL_CONFIG_PREFIX, name, MATCH_PROP);
@@ -362,9 +362,9 @@
return session;
}
-diff -upr gnome-session-2.12.0-orig/gnome-session/session-properties-capplet.c gnome-session-2.12.0-autostart/gnome-session/session-properties-capplet.c
+diff -upr gnome-session-2.12.0-orig/gnome-session/session-properties-capplet.c gnome-session-2.12.0/gnome-session/session-properties-capplet.c
--- gnome-session-2.12.0-orig/gnome-session/session-properties-capplet.c 2005-07-26 09:44:38.000000000 +0200
-+++ gnome-session-2.12.0-autostart/gnome-session/session-properties-capplet.c 2006-03-06 23:49:03.000000000 +0100
++++ gnome-session-2.12.0/gnome-session/session-properties-capplet.c 2006-04-27 13:27:04.000000000 +0200
@@ -80,6 +80,7 @@ static void update_gui (void);
static void add_startup_cb (void);
static void edit_startup_cb (void);
@@ -465,9 +465,9 @@
static void
protocol_set_current_session (GtkWidget *widget, gchar* name)
{
-diff -upr gnome-session-2.12.0-orig/gnome-session/session-properties-capplet.h gnome-session-2.12.0-autostart/gnome-session/session-properties-capplet.h
+diff -upr gnome-session-2.12.0-orig/gnome-session/session-properties-capplet.h gnome-session-2.12.0/gnome-session/session-properties-capplet.h
--- gnome-session-2.12.0-orig/gnome-session/session-properties-capplet.h 2004-02-05 17:42:47.000000000 +0100
-+++ gnome-session-2.12.0-autostart/gnome-session/session-properties-capplet.h 2006-03-06 20:53:03.000000000 +0100
++++ gnome-session-2.12.0/gnome-session/session-properties-capplet.h 2006-04-27 13:27:04.000000000 +0200
@@ -34,6 +34,10 @@ void startup_list_edit_dialog (GSList **
void startup_list_delete (GSList **sl,
GtkTreeModel *model, GtkTreeSelection *sel);
@@ -479,9 +479,9 @@
void session_list_update_gui (GSList *sess_list,
GtkTreeModel *model,
GtkTreeSelection *sel,
-diff -upr gnome-session-2.12.0-orig/gnome-session/startup-programs.c gnome-session-2.12.0-autostart/gnome-session/startup-programs.c
+diff -upr gnome-session-2.12.0-orig/gnome-session/startup-programs.c gnome-session-2.12.0/gnome-session/startup-programs.c
--- gnome-session-2.12.0-orig/gnome-session/startup-programs.c 2004-10-07 19:00:02.000000000 +0200
-+++ gnome-session-2.12.0-autostart/gnome-session/startup-programs.c 2006-03-06 23:45:21.000000000 +0100
++++ gnome-session-2.12.0/gnome-session/startup-programs.c 2006-04-27 13:34:50.000000000 +0200
@@ -22,7 +22,9 @@
#include
#include
@@ -666,7 +666,7 @@
}
/* Write out a client list for under a given name */
-@@ -118,49 +149,48 @@ void
+@@ -118,49 +157,48 @@ void
startup_list_write (GSList *sl, const gchar *name)
{
GSList *tmp_list;
@@ -751,7 +751,7 @@
}
/* Duplicate a client list */
-@@ -177,7 +207,9 @@ startup_list_duplicate (GSList *sl)
+@@ -177,7 +215,9 @@ startup_list_duplicate (GSList *sl)
ManualClient *client = tmp_list->data;
ManualClient *new_client = g_new (ManualClient, 1);
@@ -762,7 +762,7 @@
new_client->argc = client->argc;
new_client->argv = g_new (gchar *, client->argc);
-@@ -220,23 +252,23 @@ startup_list_update_gui (GSList *sl, Gtk
+@@ -220,23 +260,23 @@ startup_list_update_gui (GSList *sl, Gtk
gtk_list_store_clear (GTK_LIST_STORE (model));
tmp_list = sl;
@@ -789,18 +789,18 @@
- g_free (name);
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, client, 1, "", 2, name, -1);
-+
-+ g_free (name);
-+ }
- tmp_list = tmp_list->next;
- }
++ g_free (name);
++ }
++
+ tmp_list = tmp_list->next;
+ }
}
/* Util function - check if a string is blank */
-@@ -258,15 +290,11 @@ static gboolean
+@@ -258,15 +298,11 @@ static gboolean
edit_client (gchar *title, ManualClient *client, GtkWidget **dialog, GtkWidget *parent_dlg)
{
GtkWidget *entry;
@@ -816,7 +816,7 @@
gchar *tmp;
-@@ -307,26 +335,6 @@ edit_client (gchar *title, ManualClient
+@@ -307,26 +343,6 @@ edit_client (gchar *title, ManualClient
(const char * const *)client->argv);
gtk_entry_set_text (GTK_ENTRY (entry), tmp);
g_free (tmp);
@@ -843,7 +843,7 @@
gtk_widget_show_all (vbox);
-@@ -357,8 +365,7 @@ edit_client (gchar *title, ManualClient
+@@ -357,8 +373,7 @@ edit_client (gchar *title, ManualClient
g_free (client->argv);
mark_dirty ();
@@ -853,7 +853,7 @@
gtk_widget_destroy (*dialog);
*dialog = NULL;
-@@ -376,15 +383,33 @@ edit_client (gchar *title, ManualClient
+@@ -376,15 +391,33 @@ edit_client (gchar *title, ManualClient
void
startup_list_add_dialog (GSList **sl, GtkWidget **dialog, GtkWidget *parent_dlg)
{
@@ -890,19 +890,34 @@
spc_write_state ();
}
else
-@@ -402,10 +427,8 @@ startup_list_edit_dialog (GSList **sl, G
+@@ -402,10 +435,22 @@ startup_list_edit_dialog (GSList **sl, G
gtk_tree_model_get (model, &iter, 0, &client, -1);
- if (edit_client (_("Edit Startup Program"), client, dialog, parent_dlg)) {
- *sl = g_slist_sort (*sl, client_compare);
-+ if (edit_client (_("Edit Startup Program"), client, dialog, parent_dlg))
- spc_write_state ();
+- spc_write_state ();
- }
++ if (edit_client (_("Edit Startup Program"), client, dialog, parent_dlg))
++ {
++ if (!g_str_has_prefix (client->desktop_file, g_get_user_config_dir ()))
++ {
++ char *basename, *path;;
++
++ /* It's a system-wide file, save it to the user's home */
++ basename = g_path_get_basename (client->desktop_file);
++ path = g_build_filename (g_get_user_config_dir (), "autostart", basename, NULL);
++ g_free (client->desktop_file);
++ client->desktop_file = path;
++
++ g_free (basename);
++ }
++ spc_write_state ();
++ }
}
/* Delete the currently selected client */
-@@ -418,8 +441,141 @@ startup_list_delete (GSList **sl, GtkTre
+@@ -418,8 +463,141 @@ startup_list_delete (GSList **sl, GtkTre
if (!gtk_tree_selection_get_selected (sel, NULL, &iter)) return;
gtk_tree_model_get (model, &iter, 0, &client, -1);
@@ -1046,3 +1061,4 @@
+ g_free (basename);
+ }
}
+Only in gnome-session-2.12.0/gnome-session: startup-programs.c~
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...