if the new font path could not be set, revert to the old path (fixes bug

2007-02-10  Jens Granseuer  <jensgr@gmx.net>

	* gnome-settings-font.c: (load_cursor): if the new font path could not
	be set, revert to the old path (fixes bug #397504)

svn path=/trunk/; revision=7277
This commit is contained in:
Jens Granseuer 2007-02-10 16:11:51 +00:00 committed by Jens Granseuer
parent 6bb442dcc4
commit da4b6a8507
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2007-02-10 Jens Granseuer <jensgr@gmx.net>
* gnome-settings-font.c: (load_cursor): if the new font path could not
be set, revert to the old path (fixes bug #397504)
2007-02-09 Jens Granseuer <jensgr@gmx.net>
Based on a patch by: Bastien Nocera <hadess@hadess.net>

View file

@ -184,8 +184,11 @@ load_cursor (GConfClient *client)
gdk_error_trap_push ();
XSetFontPath (gdk_display, new_font_path, new_n_fonts);
gdk_flush ();
gdk_error_trap_pop ();
/* if there was an error setting the new path, revert */
if (gdk_error_trap_pop ())
XSetFontPath (gdk_display, font_path, n_fonts);
XFreeFontPath (font_path);
g_free (new_font_path);