mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
Fixed a compilation break in the gnome frontend.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1868 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
27257a0d72
commit
981b7d0242
@ -26,11 +26,12 @@ string get_font_name(Gdk_Font const & font)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern "C"
|
||||||
gchar *
|
gchar *
|
||||||
get_font_name (const GdkFont * font)
|
get_font_name (const GdkFont * font)
|
||||||
{
|
{
|
||||||
Atom font_atom, atom;
|
Atom font_atom, atom;
|
||||||
Bool status;
|
bool status = false;
|
||||||
|
|
||||||
#ifdef E_FONT_VERBOSE
|
#ifdef E_FONT_VERBOSE
|
||||||
gint i;
|
gint i;
|
||||||
@ -44,14 +45,14 @@ get_font_name (const GdkFont * font)
|
|||||||
gint num_fonts;
|
gint num_fonts;
|
||||||
gchar **font_names;
|
gchar **font_names;
|
||||||
|
|
||||||
num_fonts = XFontsOfFontSet (GDK_FONT_XFONT (font), &font_structs, &font_names);
|
num_fonts = XFontsOfFontSet (XFontSet(GDK_FONT_XFONT (font)), &font_structs, &font_names);
|
||||||
#ifdef E_FONT_VERBOSE
|
#ifdef E_FONT_VERBOSE
|
||||||
g_print ("Fonts of fontset:\n");
|
g_print ("Fonts of fontset:\n");
|
||||||
for (i = 0; i < num_fonts; i++) g_print (" %s\n", font_names[i]);
|
for (i = 0; i < num_fonts; i++) g_print (" %s\n", font_names[i]);
|
||||||
#endif
|
#endif
|
||||||
status = XGetFontProperty (font_structs[0], font_atom, &atom);
|
status = XGetFontProperty (font_structs[0], font_atom, &atom);
|
||||||
} else {
|
} else {
|
||||||
status = XGetFontProperty (GDK_FONT_XFONT (font), font_atom, &atom);
|
status = XGetFontProperty ( (XFontStruct*)GDK_FONT_XFONT (font), font_atom, &atom);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
|
@ -49,6 +49,7 @@ string get_font_name(Gdk_Font const & font);
|
|||||||
*
|
*
|
||||||
* This function was lifted from e-font.c from the gabber package.
|
* This function was lifted from e-font.c from the gabber package.
|
||||||
*/
|
*/
|
||||||
|
extern "C"
|
||||||
gchar * get_font_name(GdkFont const * font);
|
gchar * get_font_name(GdkFont const * font);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user