mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 05:22:47 -05:00
Reinstate all the GTK1-specific code under ifdefs, and verify that
we can now build and run successfully using both GTK1 and GTK2 by giving appropriate options to make. (Specifically, to override the default of GTK2 in favour of GTK1, "make GTK_CONFIG=gtk-config".) [originally from svn r7966]
This commit is contained in:
@ -670,8 +670,10 @@ static char *x11font_scale_fontname(GtkWidget *widget, const char *name,
|
||||
return NULL; /* shan't */
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(2,0,0)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Pango font implementation.
|
||||
* Pango font implementation (for GTK 2 only).
|
||||
*/
|
||||
|
||||
static void pangofont_draw_text(GdkDrawable *target, GdkGC *gc, unifont *font,
|
||||
@ -1143,6 +1145,8 @@ static char *pangofont_scale_fontname(GtkWidget *widget, const char *name,
|
||||
return retname;
|
||||
}
|
||||
|
||||
#endif /* GTK_CHECK_VERSION(2,0,0) */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Outermost functions which do the vtable dispatch.
|
||||
*/
|
||||
@ -1155,7 +1159,9 @@ static char *pangofont_scale_fontname(GtkWidget *widget, const char *name,
|
||||
* of an explicit type-disambiguating prefix.)
|
||||
*/
|
||||
static const struct unifont_vtable *unifont_types[] = {
|
||||
#if GTK_CHECK_VERSION(2,0,0)
|
||||
&pangofont_vtable,
|
||||
#endif
|
||||
&x11font_vtable,
|
||||
};
|
||||
|
||||
@ -1234,8 +1240,11 @@ void unifont_draw_text(GdkDrawable *target, GdkGC *gc, unifont *font,
|
||||
wide, bold, cellwidth);
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(2,0,0)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Implementation of a unified font selector.
|
||||
* Implementation of a unified font selector. Used on GTK 2 only;
|
||||
* for GTK 1 we still use the standard font selector.
|
||||
*/
|
||||
|
||||
typedef struct fontinfo fontinfo;
|
||||
@ -2417,3 +2426,5 @@ char *unifontsel_get_name(unifontsel *fontsel)
|
||||
|
||||
return dupstr(fs->selected->realname);
|
||||
}
|
||||
|
||||
#endif /* GTK_CHECK_VERSION(2,0,0) */
|
||||
|
Reference in New Issue
Block a user