Exemplo n.º 1
0
void headerview_show(HeaderView *headerview, MsgInfo *msginfo)
{
    headerview_clear(headerview);

    gtk_label_set_text(GTK_LABEL(headerview->from_body_label),
                       msginfo->from ? msginfo->from : _("(No From)"));
    if (msginfo->to) {
        gtk_label_set_text(GTK_LABEL(headerview->to_body_label),
                           msginfo->to);
        gtk_widget_show(headerview->to_header_label);
        gtk_widget_show(headerview->to_body_label);
    }
    if (msginfo->cc) {
        gtk_label_set_text(GTK_LABEL(headerview->cc_body_label),
                           msginfo->cc);
        gtk_widget_show(headerview->cc_header_label);
        gtk_widget_show(headerview->cc_body_label);
    }
    if (msginfo->newsgroups) {
        gtk_label_set_text(GTK_LABEL(headerview->ng_body_label),
                           msginfo->newsgroups);
        gtk_widget_show(headerview->ng_header_label);
        gtk_widget_show(headerview->ng_body_label);
    }
    gtk_label_set_text(GTK_LABEL(headerview->subject_body_label),
                       msginfo->subject ? msginfo->subject
                       : _("(No Subject)"));

#if HAVE_LIBCOMPFACE
    headerview_show_xface(headerview, msginfo);
#endif
}
Exemplo n.º 2
0
void messageview_clear(MessageView *messageview)
{
	procmsg_msginfo_free(messageview->msginfo);
	messageview->msginfo = NULL;
	messageview_change_view_type(messageview, MVIEW_TEXT);
	headerview_clear(messageview->headerview);
	textview_clear(messageview->textview);
	mimeview_clear(messageview->mimeview);
}
Exemplo n.º 3
0
void headerview_init(HeaderView *headerview)
{
    static PangoFontDescription *boldfont = NULL;
#ifdef G_OS_WIN32
    GtkStyle *style;
#endif

    if (!boldfont) {
        boldfont = pango_font_description_new();
        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->cc_header_label, boldfont);
        gtk_widget_modify_font(headerview->ng_header_label, boldfont);
        gtk_widget_modify_font(headerview->subject_header_label, boldfont);
    }

#ifdef G_OS_WIN32
#define SET_LABEL_STYLE(label)						\
	style = gtk_widget_get_style(label);				\
	gtk_widget_modify_base(label, GTK_STATE_ACTIVE,			\
			       &style->base[GTK_STATE_SELECTED]);	\
	gtk_widget_modify_text(label, GTK_STATE_ACTIVE,			\
			       &style->text[GTK_STATE_SELECTED]);

    SET_LABEL_STYLE(headerview->from_body_label);
    SET_LABEL_STYLE(headerview->to_body_label);
    SET_LABEL_STYLE(headerview->cc_body_label);
    SET_LABEL_STYLE(headerview->ng_body_label);
    SET_LABEL_STYLE(headerview->subject_body_label);

#undef SET_LABEL_STYLE
#endif

    headerview_clear(headerview);
    headerview_set_visibility(headerview, prefs_common.display_header_pane);

#if HAVE_LIBCOMPFACE
    {
        gint i;

        for (i = 0; i < XPM_XFACE_HEIGHT; i++) {
            xpm_xface[i] = g_malloc(WIDTH + 1);
            *xpm_xface[i] = '\0';
        }
    }
#endif
}
Exemplo n.º 4
0
void headerview_show(HeaderView *headerview, MsgInfo *msginfo)
{
	gchar *tags = procmsg_msginfo_get_tags_str(msginfo);

	headerview_clear(headerview);

	gtk_label_set_text(GTK_LABEL(headerview->from_body_label),
			   msginfo->from ? msginfo->from : _("(No From)"));
	if (msginfo->to) {
		gtk_label_set_text(GTK_LABEL(headerview->to_body_label),
				   msginfo->to);
		gtk_widget_show(headerview->to_header_label);
		gtk_widget_show(headerview->to_body_label);
	}
	if (msginfo->newsgroups) {
		gtk_label_set_text(GTK_LABEL(headerview->ng_body_label),
				   msginfo->newsgroups);
		gtk_widget_show(headerview->ng_header_label);
		gtk_widget_show(headerview->ng_body_label);
	}
	gtk_label_set_text(GTK_LABEL(headerview->subject_body_label),
			   msginfo->subject ? msginfo->subject :
			   _("(No Subject)"));
	if (tags) {
		gtk_label_set_text(GTK_LABEL(headerview->tags_body_label),
				   tags);
		gtk_widget_show(headerview->tags_header_label);
		gtk_widget_show(headerview->tags_body_label);
		g_free(tags);
	}
	if (!headerview_show_avatar(headerview, msginfo))
		return;

	if (!headerview_show_contact_pic(headerview, msginfo))
		return;

}
Exemplo n.º 5
0
void headerview_init(HeaderView *headerview)
{
	headerview_set_font(headerview);
	headerview_clear(headerview);
	headerview_set_visibility(headerview, prefs_common.display_header_pane);
}