2006-09-02 [paul] 2.4.0cvs132
[claws.git] / src / mainwindow.c
index 8b9f4582403279e46e2208315fb944590d6df407..b700dcc7a324b4e716cc0f04281490c8f3664b39 100644 (file)
@@ -716,7 +716,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/Open in new _window"),      "<control><alt>N", open_msg_cb, 0, NULL},
        {N_("/_View/Mess_age source"),          "<control>U", view_source_cb, 0, NULL},
-       {N_("/_View/Show all headers"),         "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
+       {N_("/_View/All headers"),              "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
        {N_("/_View/Quotes"),                   NULL, NULL, 0, "<Branch>"},
        {N_("/_View/Quotes/_Fold all"),         "<control><shift>Q", hide_quotes_cb, 1, "<ToggleItem>"},
        {N_("/_View/Quotes/Fold from level _2"),NULL, hide_quotes_cb, 2, "<ToggleItem>"},
@@ -1026,7 +1026,7 @@ static gboolean warning_icon_pressed(GtkWidget *widget, GdkEventButton *evt,
                                    MainWindow *mainwindow)
 {
        if (evt && evt->button == 1) {
-               log_window_show(mainwindow->logwin);
+               log_window_show_error(mainwindow->logwin);
                gtk_widget_hide(mainwindow->warning_btn);
        }
        return FALSE;
@@ -1056,16 +1056,15 @@ static gboolean warning_enter_notify(GtkWidget *widget,
        return FALSE;
 }
 
-static gboolean mainwindow_log_error(gpointer source, gpointer data)
+void mainwindow_show_error(void)
 {
-       LogText *logtext = (LogText *) source;
-       MainWindow *mainwin = (MainWindow *) data;
-       if (logtext->type != LOG_ERROR)
-               return FALSE;
-       
+       MainWindow *mainwin = mainwindow_get_mainwindow();
        gtk_widget_show(mainwin->warning_btn);
-       
-       return FALSE;
+}
+
+void mainwindow_clear_error(MainWindow *mainwin)
+{
+       gtk_widget_hide(mainwin->warning_btn);
 }
 
 MainWindow *main_window_create(SeparateType type)
@@ -1211,8 +1210,6 @@ MainWindow *main_window_create(SeparateType type)
                             _("Some error(s) happened. Click here to view log."), NULL);
        gtk_box_pack_start(GTK_BOX(hbox_stat), warning_btn, FALSE, FALSE, 0);
 
-       hooks_register_hook(LOG_APPEND_TEXT_HOOKLIST, mainwindow_log_error, mainwin);
-
        statusbar = statusbar_create();
        gtk_box_pack_start(GTK_BOX(hbox_stat), statusbar, TRUE, TRUE, 0);