/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2003 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <gtk/gtkhbox.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtklabel.h>
-#include <gtk/gtkpixmap.h>
+#include <gtk/gtkimage.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#endif
#include "intl.h"
-#include "main.h"
#include "headerview.h"
#include "prefs_common.h"
+#include "codeconv.h"
#include "gtkutils.h"
#include "utils.h"
-static GdkFont *boldfont;
+PangoFontDescription *boldfont;
#define TR(str) (prefs_common.trans_hdr ? gettext(str) : str)
void headerview_init(HeaderView *headerview)
{
- if (!boldfont)
- boldfont = gtkut_font_load(BOLD_FONT);
+ if (!boldfont && BOLD_FONT)
+ boldfont = pango_font_description_from_string
+ (BOLD_FONT);
#define SET_FONT_STYLE(wid) \
{ \
- GtkStyle *style; \
- \
- style = gtk_style_copy(gtk_widget_get_style(headerview->wid)); \
if (boldfont) \
- style->font = boldfont; \
- gtk_widget_set_style(headerview->wid, style); \
+ gtk_widget_modify_font(headerview->wid, boldfont); \
}
SET_FONT_STYLE(from_header_label);
if (!headerview->image) {
GtkWidget *image;
- image = gtk_pixmap_new(pixmap, mask);
+ image = gtk_image_new_from_pixmap(pixmap, mask);
gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
gtk_widget_show(image);
headerview->image = image;
} else {
- gtk_pixmap_set(GTK_PIXMAP(headerview->image), pixmap, mask);
+ gtk_image_set_from_pixmap(GTK_IMAGE(headerview->image), pixmap, mask);
gtk_widget_show(headerview->image);
}