Re: .gnome directory



On Sat, Dec 01, 2001 at 09:04:54PM -0500, jacob berkman wrote:
> On Sat, 2001-12-01 at 16:52, Havoc Pennington wrote:
> > Would it make sense to change .gnome to .gnome2 in libgnome so people
> > can try GNOME 2 with no risk of hosing their GNOME 1 config?  Also,
> > this lets us avoid the issue of converting settings from GNOME 1 to
> > GNOME 2.
> 
> i think this is a good idea, at least at this point.
> 
> jacob

So everybody seems in favour of this (I certainly am, since I nuked my
stable setup by accident this afternoon).

Attached is a patch that does most of the work required. I didn't alter
the default config paths in gnome-config.c (gnome/config and
gnome/config-override), but maybe we should do that to.

When this patch is combined with a small one I'm about to send to Mark
and Glynn for the panel and gnome-wm, I have everything running out of
~/.gnome2 now (until I started X-chat).

Commit approval, Anders?

Cheers,
Malcolm

-- 
Everything is _not_ based on faith... take my word for it.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/ChangeLog,v
retrieving revision 1.374
diff -u -r1.374 ChangeLog
--- ChangeLog	2001/12/01 00:21:16	1.374
+++ ChangeLog	2001/12/03 09:34:33
@@ -1,3 +1,11 @@
+2001-12-03  Malcolm Tredinnick <malcolm commsecure com au>
+	* gnome-init.[ch], gnome-util.h, parse-path.cP: replace
+	  references to .gnome and .gnome_private with DOT_GNOME and
+	  DOT_GNOME_PRIVATE respectivly. Define these macros in
+	  gnome-init.h (to be .gnome2 and .gnome2_private for now) and
+	  include this in gnome-util.h, which was the only place that
+	  didn't have it.
+
 Fri Nov 30 16:59:01 2001  George Lebl <jirka 5z com>
 
 	* gnome-init.c: g_object_set is a vararg function so null terminate
Index: gnome-init.c
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-init.c,v
retrieving revision 1.96
diff -u -r1.96 gnome-init.c
--- gnome-init.c	2001/12/01 00:21:16	1.96
+++ gnome-init.c	2001/12/03 09:34:39
@@ -262,9 +262,9 @@
 libgnome_userdir_setup (gboolean create_dirs)
 {
 	if(!gnome_user_dir) {
-		gnome_user_dir = g_build_filename (g_get_home_dir(), ".gnome", NULL);
+		gnome_user_dir = g_build_filename (g_get_home_dir(), DOT_GNOME, NULL);
 		gnome_user_private_dir = g_build_filename (g_get_home_dir(),
-							   ".gnome_private", NULL);
+							   DOT_GNOME_PRIVATE, NULL);
 		gnome_user_accels_dir = g_build_filename (gnome_user_dir,
 							  "accels", NULL);
 	}
Index: gnome-init.h
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-init.h,v
retrieving revision 1.15
diff -u -r1.15 gnome-init.h
--- gnome-init.h	2001/09/03 10:35:59	1.15
+++ gnome-init.h	2001/12/03 09:34:39
@@ -31,6 +31,10 @@
 
 G_BEGIN_DECLS
 
+/* This is where the user specific files are stored under $HOME */
+#define DOT_GNOME		".gnome2/"
+#define DOT_GNOME_PRIVATE	".gnome2_private/"
+
 #define LIBGNOME_MODULE libgnome_module_info_get()
 const GnomeModuleInfo *libgnome_module_info_get (void) G_GNUC_CONST;
 #define GNOME_BONOBO_MODULE gnome_bonobo_module_info_get()
Index: gnome-util.h
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-util.h,v
retrieving revision 1.40
diff -u -r1.40 gnome-util.h
--- gnome-util.h	2001/11/27 23:03:25	1.40
+++ gnome-util.h	2001/12/03 09:34:40
@@ -29,6 +29,7 @@
 
 #include <stdlib.h>
 #include <glib.h>
+#include <libgnome/gnome-init.h>
 #include <libgnome/gnome-program.h>
 
 G_BEGIN_DECLS
@@ -48,7 +49,7 @@
 /* very similar to above, but adds $HOME/.gnome/ to beginning
  * This is meant to be the most useful version.
  */
-#define gnome_util_home_file(afile) (g_strconcat(g_get_home_dir(), "/.gnome/", (afile), NULL))
+#define gnome_util_home_file(afile) (g_strconcat(g_get_home_dir(), "/", DOT_GNOME, (afile), NULL))
 
 /* Find the name of the user's shell.  */
 char *gnome_util_user_shell (void);
Index: parse-path.cP
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/parse-path.cP,v
retrieving revision 1.11
diff -u -r1.11 parse-path.cP
--- parse-path.cP	2001/09/02 19:11:20	1.11
+++ parse-path.cP	2001/12/03 09:34:40
@@ -85,9 +85,9 @@
 			p->file++;
 
 		if (priv){
-			p->file = g_strconcat (g_get_home_dir(), "/.gnome_private/", (p->file), NULL);
+			p->file = g_strconcat (g_get_home_dir(), "/", DOT_GNOME_PRIVATE, (p->file), NULL);
 		} else {
-			p->file = g_strconcat (g_get_home_dir(), "/.gnome/", (p->file), NULL);
+			p->file = g_strconcat (g_get_home_dir(), "/", DOT_GNOME, (p->file), NULL);
 		}
 	}
 	if (p->file    == GNOME_CONFIG_PARSE_ERROR ||


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