Replace FONT_TYPE macro with PangoFontDescription.

svn path=/trunk/; revision=24889
This commit is contained in:
Stephen Fisher 2008-04-11 04:52:36 +00:00
parent 464efd95fa
commit b010ad9411
7 changed files with 13 additions and 15 deletions

View File

@ -191,6 +191,4 @@ gtk_toggle_button_new_with_mnemonic(label_text)
#define PRIMARY_TEXT_START "<span weight=\"bold\" size=\"larger\">"
#define PRIMARY_TEXT_END "</span>"
#define FONT_TYPE PangoFontDescription
#endif /* __COMPAT_MACROS_H__ */

View File

@ -55,14 +55,14 @@
FONT_TYPE *m_r_font, *m_b_font;
PangoFontDescription *m_r_font, *m_b_font;
/* Get the regular user font.
*
* @return the regular user font
*/
FONT_TYPE *user_font_get_regular(void)
PangoFontDescription *user_font_get_regular(void)
{
return m_r_font;
}
@ -71,13 +71,13 @@ FONT_TYPE *user_font_get_regular(void)
*
* @return the bold user font
*/
FONT_TYPE *user_font_get_bold(void)
PangoFontDescription *user_font_get_bold(void)
{
return m_b_font;
}
static void
set_fonts(FONT_TYPE *regular, FONT_TYPE *bold)
set_fonts(PangoFontDescription *regular, PangoFontDescription *bold)
{
/* Yes, assert. The code that loads the font should check
* for NULL and provide its own error message. */
@ -170,7 +170,7 @@ view_zoom_100_cb(GtkWidget *w _U_, gpointer d _U_)
gboolean
user_font_test(gchar *font_name)
{
FONT_TYPE *new_r_font, *new_b_font;
PangoFontDescription *new_r_font, *new_b_font;
new_r_font = pango_font_description_from_string(font_name);
if (new_r_font == NULL) {
@ -241,8 +241,8 @@ font_zoom(char *gui_font_name)
fa_ret_t
user_font_apply(void) {
char *gui_font_name;
FONT_TYPE *new_r_font, *new_b_font;
FONT_TYPE *old_r_font = NULL, *old_b_font = NULL;
PangoFontDescription *new_r_font, *new_b_font;
PangoFontDescription *old_r_font = NULL, *old_b_font = NULL;
/* convert font name to reflect the zoom level */
gui_font_name = font_zoom(prefs.gui_font_name);

View File

@ -65,12 +65,12 @@ extern gboolean user_font_test(gchar *font_name);
*
* @return the regular user font
*/
extern FONT_TYPE *user_font_get_regular(void);
extern PangoFontDescription *user_font_get_regular(void);
/** Get the bold user font.
*
* @return the bold user font
*/
extern FONT_TYPE *user_font_get_bold(void);
extern PangoFontDescription *user_font_get_bold(void);
#endif

View File

@ -433,7 +433,7 @@ packet_list_set_sel_browse(gboolean val, gboolean force_set)
/* Set the font of the packet list window. */
void
packet_list_set_font(FONT_TYPE *font)
packet_list_set_font(PangoFontDescription *font)
{
int i;
gint col_width;

View File

@ -93,7 +93,7 @@ extern gboolean packet_list_get_event_row_column(GtkWidget *widget,
*
* @param font the new font
*/
extern void packet_list_set_font(FONT_TYPE *font);
extern void packet_list_set_font(PangoFontDescription *font);
/** Set the selection mode of the packet list window.
*

View File

@ -1409,7 +1409,7 @@ set_ptree_font_cb(gpointer data, gpointer user_data)
}
void
set_ptree_font_all(FONT_TYPE *font)
set_ptree_font_all(PangoFontDescription *font)
{
g_list_foreach(ptree_widgets, set_ptree_font_cb, font);
}

View File

@ -283,7 +283,7 @@ struct graph {
GtkWidget *drawing_area;
GtkWidget *text; /* text widget for seg list - probably
* temporary */
FONT_TYPE *font; /* font used for annotations etc. */
PangoFontDescription *font; /* font used for annotations etc. */
GdkGC *fg_gc;
GdkGC *bg_gc;
GdkPixmap *title_pixmap;