/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 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 "main.h"
#include "headerwindow.h"
#include "mainwindow.h"
-#include "prefs_common.h"
#include "procheader.h"
#include "procmsg.h"
#include "codeconv.h"
+#include "prefs_common.h"
#include "utils.h"
static GdkFont *normalfont;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), _("All header"));
+ gtk_window_set_wmclass(GTK_WINDOW(window), "header_window", "Sylpheed");
gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
gtk_widget_set_usize(window, 600, 500);
gtk_signal_connect(GTK_OBJECT(window), "delete_event",
void header_window_init(HeaderWindow *headerwin)
{
- //if (!normalfont)
- // normalfont = gdk_fontset_load(NORMAL_FONT);
+ /* if (!normalfont)
+ normalfont = gdk_fontset_load(prefs_common.normalfont); */
if (!boldfont)
boldfont = gdk_fontset_load(BOLD_FONT);
}
void header_window_show_cb(gpointer data, guint action, GtkWidget *widget)
{
MainWindow *mainwin = data;
- GtkCTreeNode *node = mainwin->summaryview->displayed;
+ GtkCTreeNode *node = mainwin->summaryview->selected;
MsgInfo *msginfo;
- g_return_if_fail(node != NULL);
-
- msginfo = gtk_ctree_node_get_row_data
- (GTK_CTREE(mainwin->summaryview->ctree), node);
- header_window_show(mainwin->headerwin, msginfo);
+ if (node) {
+ msginfo = gtk_ctree_node_get_row_data
+ (GTK_CTREE(mainwin->summaryview->ctree), node);
+ header_window_show(mainwin->headerwin, msginfo);
+ }
gtk_widget_hide(mainwin->headerwin->window);
gtk_widget_show(mainwin->headerwin->window);