]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/gnome_helpers.C
ws cleanup
[lyx.git] / src / frontends / gnome / gnome_helpers.C
index f517132c8c8d7b6965ec462c9d16970130e3320a..0dd4e2a7d22bad98d7557de30ff99c24989241a8 100644 (file)
@@ -1,9 +1,8 @@
-// -*- C++ -*-
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
- *       
+ *
  *          Copyright 2000 The LyX Team.
  *
  * ====================================================== */
@@ -30,7 +29,7 @@ gchar *
 get_font_name (const GdkFont * font)
 {
        Atom font_atom, atom;
-       Bool status;
+       bool status = false;
 
 #ifdef E_FONT_VERBOSE
        gint i;
@@ -44,14 +43,18 @@ get_font_name (const GdkFont * font)
                gint num_fonts;
                gchar **font_names;
 
-               num_fonts = XFontsOfFontSet (GDK_FONT_XFONT (font), &font_structs, &font_names);
+               num_fonts = XFontsOfFontSet (
+                               static_cast<XFontSet>(GDK_FONT_XFONT (font))
+                               , &font_structs, &font_names);
 #ifdef E_FONT_VERBOSE
                g_print ("Fonts of fontset:\n");
                for (i = 0; i < num_fonts; i++) g_print ("  %s\n", font_names[i]);
 #endif
                status = XGetFontProperty (font_structs[0], font_atom, &atom);
        } else {
-               status = XGetFontProperty (GDK_FONT_XFONT (font), font_atom, &atom);
+               status = XGetFontProperty (
+                               static_cast<XFontStruct*>(GDK_FONT_XFONT (font))
+                               , font_atom, &atom);
        }
 
        if (status) {