Don't nuke .Xdefaults when restarting g-s-d. Patch from Nick

2004-10-28  Kjartan Maraas  <kmaraas@gnome.org>

	* gnome-settings-xrdb.c: (append_xresource_file), (apply_settings):
	Don't nuke .Xdefaults when restarting g-s-d. Patch from Nick
This commit is contained in:
Kjartan Maraas 2004-10-28 17:37:50 +00:00 committed by Kjartan Maraas
parent 7d643f1f53
commit 8eac60b616
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2004-10-28 Kjartan Maraas <kmaraas@gnome.org>
* gnome-settings-xrdb.c: (append_xresource_file), (apply_settings):
Don't nuke .Xdefaults when restarting g-s-d. Patch from Nick
Welch <mack at incise org>. Closes bug #127050.
2004-10-21 Sebastien Bacher <seb128@debian.org>
* gnome-settings-default-editor.c: (vfs_change_cb):

View file

@ -35,6 +35,7 @@
#define GENERAL_AD SYSTEM_AD_DIR "/General.ad"
#define USER_AD_DIR ".gnome2/xrdb"
#define USER_X_RESOURCES ".Xresources"
#define USER_X_DEFAULTS ".Xdefaults"
#define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme"
@ -245,10 +246,10 @@ scan_for_files (GError **error)
}
/**
* Append the users .Xresources file if it exists
* Append an X resources file, such as .Xresources, or .Xdefaults
*/
static void
append_xresources (GString *string, GError **error)
append_xresource_file (const char * filename, GString *string, GError **error)
{
const char* home_path;
char *xresources;
@ -261,7 +262,7 @@ append_xresources (GString *string, GError **error)
return;
}
xresources = g_build_filename (home_path, USER_X_RESOURCES, NULL);
xresources = g_build_filename (home_path, filename, NULL);
if (g_file_test (xresources, G_FILE_TEST_EXISTS)) {
append_file (xresources, string, error);
if (*error) {
@ -305,7 +306,9 @@ apply_settings (GtkStyle *style)
g_slist_foreach (list, (GFunc)g_free, NULL);
g_slist_free (list);
append_xresources (string, &error);
append_xresource_file (USER_X_RESOURCES, string, &error);
append_xresource_file (USER_X_DEFAULTS, string, &error);
if (error) {
g_warning (error->message);
g_error_free (error);