X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/7be1c708c5abc7dea388d45454bd19bff07b7943..34dabdb7701594b83a5b35b034bba55855d256a5:/src/xsettings.c?ds=sidebyside diff --git a/src/xsettings.c b/src/xsettings.c index dadbe68b4c..a28d75d942 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -1,6 +1,6 @@ /* Functions for handling font and other changes dynamically. -Copyright (C) 2009-2011 Free Software Foundation, Inc. +Copyright (C) 2009-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -121,7 +121,7 @@ store_font_name_changed (const char *newfont) } #endif /* HAVE_XFT */ -/* Map TOOL_BAR_STYLE from a string to its correspinding Lisp value. +/* Map TOOL_BAR_STYLE from a string to its corresponding Lisp value. Return Qnil if TOOL_BAR_STYLE is not known. */ static Lisp_Object @@ -159,8 +159,9 @@ store_tool_bar_style_changed (const char *newstyle, XCAR (dpyinfo->name_list_element)); } - +#ifdef HAVE_XFT #define XSETTINGS_FONT_NAME "Gtk/FontName" +#endif #define XSETTINGS_TOOL_BAR_STYLE "Gtk/ToolbarStyle" enum { @@ -710,10 +711,12 @@ apply_xft_settings (struct x_display_info *dpyinfo, if (send_event_p) store_config_changed_event (Qfont_render, XCAR (dpyinfo->name_list_element)); - sprintf (buf, format, oldsettings.aa, oldsettings.hinting, - oldsettings.rgba, oldsettings.lcdfilter, - oldsettings.hintstyle, oldsettings.dpi); - Vxft_settings = build_string (buf); + Vxft_settings + = make_formatted_string (buf, format, + oldsettings.aa, oldsettings.hinting, + oldsettings.rgba, oldsettings.lcdfilter, + oldsettings.hintstyle, oldsettings.dpi); + } else FcPatternDestroy (pat); @@ -812,7 +815,7 @@ init_gsettings (void) g_type_init (); #endif - schemas = g_settings_list_schemas(); + schemas = g_settings_list_schemas (); if (schemas == NULL) return; while (! schema_found && *schemas != NULL) schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0; @@ -1024,7 +1027,7 @@ syms_of_xsettings (void) defsubr (&Sfont_get_system_normal_font); DEFVAR_BOOL ("font-use-system-font", use_system_font, - doc: /* *Non-nil means to apply the system defined font dynamically. + doc: /* Non-nil means to apply the system defined font dynamically. When this is non-nil and the system defined fixed width font changes, we update frames dynamically. If this variable is nil, Emacs ignores system font changes. */); @@ -1032,7 +1035,7 @@ If this variable is nil, Emacs ignores system font changes. */); DEFVAR_LISP ("xft-settings", Vxft_settings, doc: /* Font settings applied to Xft. */); - Vxft_settings = make_string ("", 0); + Vxft_settings = empty_unibyte_string; #ifdef HAVE_XFT Fprovide (intern_c_string ("font-render-setting"), Qnil);