diff options
author | Tor Lillqvist <tml@iki.fi> | 2000-10-28 17:33:07 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2000-10-28 17:33:07 +0000 |
commit | d8dd345efaa21ce5300a0b7f23863dec0d3ec016 (patch) | |
tree | a695d7ebe7c1b7c0d4019cb5cc801c018a113416 | |
parent | f2d6705f185031859e7737459195f187d401e12c (diff) | |
download | gtk+-d8dd345efaa21ce5300a0b7f23863dec0d3ec016.tar.gz |
Make sure not to get a double directory separator in case the home
2000-10-28 Tor Lillqvist <tml@iki.fi>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not
to get a double directory separator in case the home directory
ends with one. This would cause trouble especially on Windows,
where the path will be confused with the syntax for an an UNC
(network share) path \\server\share\path.
(gtk_rc_add_initial_default_files): Ditto.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gtk/gtkrc.c | 25 |
8 files changed, 82 insertions, 6 deletions
@@ -1,3 +1,12 @@ +2000-10-28 Tor Lillqvist <tml@iki.fi> + + * gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not + to get a double directory separator in case the home directory + ends with one. This would cause trouble especially on Windows, + where the path will be confused with the syntax for an an UNC + (network share) path \\server\share\path. + (gtk_rc_add_initial_default_files): Ditto. + Sat Oct 28 02:33:09 2000 Robert Brady <robert@suse.co.uk> * gtk/gtkmarshal.list: add new marshallers for GtkTextView. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 8c5786bff0..a563925ec1 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +2000-10-28 Tor Lillqvist <tml@iki.fi> + + * gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not + to get a double directory separator in case the home directory + ends with one. This would cause trouble especially on Windows, + where the path will be confused with the syntax for an an UNC + (network share) path \\server\share\path. + (gtk_rc_add_initial_default_files): Ditto. + Sat Oct 28 02:33:09 2000 Robert Brady <robert@suse.co.uk> * gtk/gtkmarshal.list: add new marshallers for GtkTextView. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8c5786bff0..a563925ec1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2000-10-28 Tor Lillqvist <tml@iki.fi> + + * gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not + to get a double directory separator in case the home directory + ends with one. This would cause trouble especially on Windows, + where the path will be confused with the syntax for an an UNC + (network share) path \\server\share\path. + (gtk_rc_add_initial_default_files): Ditto. + Sat Oct 28 02:33:09 2000 Robert Brady <robert@suse.co.uk> * gtk/gtkmarshal.list: add new marshallers for GtkTextView. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 8c5786bff0..a563925ec1 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +2000-10-28 Tor Lillqvist <tml@iki.fi> + + * gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not + to get a double directory separator in case the home directory + ends with one. This would cause trouble especially on Windows, + where the path will be confused with the syntax for an an UNC + (network share) path \\server\share\path. + (gtk_rc_add_initial_default_files): Ditto. + Sat Oct 28 02:33:09 2000 Robert Brady <robert@suse.co.uk> * gtk/gtkmarshal.list: add new marshallers for GtkTextView. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 8c5786bff0..a563925ec1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2000-10-28 Tor Lillqvist <tml@iki.fi> + + * gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not + to get a double directory separator in case the home directory + ends with one. This would cause trouble especially on Windows, + where the path will be confused with the syntax for an an UNC + (network share) path \\server\share\path. + (gtk_rc_add_initial_default_files): Ditto. + Sat Oct 28 02:33:09 2000 Robert Brady <robert@suse.co.uk> * gtk/gtkmarshal.list: add new marshallers for GtkTextView. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 8c5786bff0..a563925ec1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2000-10-28 Tor Lillqvist <tml@iki.fi> + + * gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not + to get a double directory separator in case the home directory + ends with one. This would cause trouble especially on Windows, + where the path will be confused with the syntax for an an UNC + (network share) path \\server\share\path. + (gtk_rc_add_initial_default_files): Ditto. + Sat Oct 28 02:33:09 2000 Robert Brady <robert@suse.co.uk> * gtk/gtkmarshal.list: add new marshallers for GtkTextView. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8c5786bff0..a563925ec1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2000-10-28 Tor Lillqvist <tml@iki.fi> + + * gtk/gtkrc.c (gtk_rc_append_default_module_path): Make sure not + to get a double directory separator in case the home directory + ends with one. This would cause trouble especially on Windows, + where the path will be confused with the syntax for an an UNC + (network share) path \\server\share\path. + (gtk_rc_add_initial_default_files): Ditto. + Sat Oct 28 02:33:09 2000 Robert Brady <robert@suse.co.uk> * gtk/gtkmarshal.list: add new marshallers for GtkTextView. diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 5626ad4ff6..70dfcdf084 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -364,11 +364,19 @@ gtk_rc_append_default_module_path(void) var = g_get_home_dir (); if (var) { -#ifndef G_OS_WIN32 - path = g_strdup_printf ("%s%s", var, "/.gtk-2.0/" GTK_VERSION "/engines"); -#else - path = g_strdup_printf ("%s%s", var, "\\_gtk\\themes\\engines"); -#endif + gchar *sep; + /* Don't duplicate the directory separator, causes trouble at + * least on Windows. + */ + if (var[strlen (var) -1] != G_DIR_SEPARATOR) + sep = G_DIR_SEPARATOR_S; + else + sep = ""; + /* This produces something like ~/.gtk-2.0/2.0/engines */ + path = g_strdup_printf ("%s%s%s", var, sep, + ".gtk-2.0" G_DIR_SEPARATOR_S + GTK_VERSION G_DIR_SEPARATOR_S + "engines"); module_path[n++] = path; } module_path[n] = NULL; @@ -414,7 +422,12 @@ gtk_rc_add_initial_default_files (void) var = g_get_home_dir (); if (var) { - str = g_strdup_printf ("%s" G_DIR_SEPARATOR_S ".gtkrc-2.0", var); + gchar *sep; + if (var[strlen (var) -1] != G_DIR_SEPARATOR) + sep = G_DIR_SEPARATOR_S; + else + sep = ""; + str = g_strdup_printf ("%s%s.gtkrc-2.0", var, sep); gtk_rc_add_default_file (str); g_free (str); } |