/*
* 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;
-
#define TR(str) (prefs_common.trans_hdr ? gettext(str) : str)
#if 0
void headerview_init(HeaderView *headerview)
{
- if (!boldfont)
- boldfont = gtkut_font_load(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); \
-}
+ static PangoFontDescription *boldfont = NULL;
- SET_FONT_STYLE(from_header_label);
- SET_FONT_STYLE(to_header_label);
- SET_FONT_STYLE(ng_header_label);
- SET_FONT_STYLE(subject_header_label);
+ if (!boldfont) {
+ boldfont = pango_font_description_from_string(BOLD_FONT);
+ pango_font_description_set_weight(boldfont, PANGO_WEIGHT_BOLD);
+ }
+
+ if (boldfont) {
+ gtk_widget_modify_font(headerview->from_header_label, boldfont);
+ gtk_widget_modify_font(headerview->to_header_label, boldfont);
+ gtk_widget_modify_font(headerview->ng_header_label, boldfont);
+ gtk_widget_modify_font(headerview->subject_header_label, boldfont);
+ }
headerview_clear(headerview);
headerview_set_visibility(headerview, prefs_common.display_header_pane);
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);
}
- gdk_pixmap_unref(pixmap);
+ g_object_unref(pixmap);
}
#endif