add description of Actions and Pixmap Themes
[claws.git] / src / headerwindow.c
index dc42f562cca33a8fad50ec8a1519429b3747e2d6..fa8d4b09381148dfed783acc8ecc12d00a787f5e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * 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;
@@ -58,6 +58,7 @@ HeaderWindow *header_window_create(void)
 
        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",
@@ -88,8 +89,8 @@ HeaderWindow *header_window_create(void)
 
 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);
 }
@@ -159,11 +160,11 @@ void header_window_show_cb(gpointer data, guint action, GtkWidget *widget)
        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);