0.9.6claws11
authorChristoph Hohmann <reboot@gmx.ch>
Fri, 10 Oct 2003 11:38:16 +0000 (11:38 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Fri, 10 Oct 2003 11:38:16 +0000 (11:38 +0000)
* src/mainwindow.c
* src/messageview.[ch]
* src/mimeview.[ch]
* src/procmime.[ch]
* src/procmsg.[ch]
* src/rfc2015.c
* src/summaryview.c
* src/textview.[ch]
        o remove switching between TextView and MimeView in MessageView
          (if required we can hide the icon box and the MimeView will
           look exaxtly like the TextView)
        o temporary remove signature and decrypting GPGME code

15 files changed:
ChangeLog.claws
configure.ac
src/mainwindow.c
src/messageview.c
src/messageview.h
src/mimeview.c
src/mimeview.h
src/procmime.c
src/procmime.h
src/procmsg.c
src/procmsg.h
src/rfc2015.c
src/summaryview.c
src/textview.c
src/textview.h

index 7265f3f..6b6a1d2 100644 (file)
@@ -1,3 +1,18 @@
+2003-10-10 [christoph] 0.9.6claws11
+
+       * src/mainwindow.c
+       * src/messageview.[ch]
+       * src/mimeview.[ch]
+       * src/procmime.[ch]
+       * src/procmsg.[ch]
+       * src/rfc2015.c
+       * src/summaryview.c
+       * src/textview.[ch]
+               o remove switching between TextView and MimeView in MessageView
+                 (if required we can hide the icon box and the MimeView will
+                  look exaxtly like the TextView)
+               o temporary remove signature and decrypting GPGME code
+
 2003-10-09 [christoph] 0.9.6claws10
 
        * src/action.c
index b2f3842..d1873c8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=10
+EXTRA_VERSION=11
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index e640362..72a38c6 100644 (file)
@@ -1721,7 +1721,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
        }
 
        SET_CHECK_MENU_ACTIVE("/View/Show all headers",
-                             mainwin->messageview->textview->show_all_headers);
+                             mainwin->messageview->mimeview->textview->show_all_headers);
        SET_CHECK_MENU_ACTIVE("/View/Thread view", (state & M_THREADED) != 0);
 
 #undef SET_CHECK_MENU_ACTIVE
@@ -2681,8 +2681,7 @@ static void allsel_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
        if (GTK_WIDGET_HAS_FOCUS(mainwin->summaryview->ctree))
                summary_select_all(mainwin->summaryview);
        else if (messageview_is_visible(msgview) &&
-                (GTK_WIDGET_HAS_FOCUS(msgview->textview->text) ||
-                 GTK_WIDGET_HAS_FOCUS(msgview->mimeview->textview->text)))
+                (GTK_WIDGET_HAS_FOCUS(msgview->mimeview->textview->text)))
                messageview_select_all(mainwin->messageview);
 }
 
index a4dcb58..4f4ab2f 100644 (file)
@@ -64,8 +64,6 @@
 
 static GList *messageview_list = NULL;
 
-static void messageview_change_view_type(MessageView   *messageview,
-                                        MessageType     type);
 static void messageview_destroy_cb     (GtkWidget      *widget,
                                         MessageView    *messageview);
 static void messageview_size_allocate_cb(GtkWidget     *widget,
@@ -283,22 +281,16 @@ MessageView *messageview_create(MainWindow *mainwin)
        MessageView *messageview;
        GtkWidget *vbox;
        HeaderView *headerview;
-       TextView *textview;
        MimeView *mimeview;
        NoticeView *noticeview;
 
        debug_print("Creating message view...\n");
        messageview = g_new0(MessageView, 1);
 
-       messageview->type = MVIEW_TEXT;
-
        headerview = headerview_create();
 
        noticeview = noticeview_create(mainwin);
 
-       textview = textview_create();
-       textview->messageview = messageview;
-
        mimeview = mimeview_create(mainwin);
        mimeview->textview = textview_create();
        mimeview->textview->messageview = messageview;
@@ -309,20 +301,14 @@ MessageView *messageview_create(MainWindow *mainwin)
                           FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET_PTR(noticeview),
                           FALSE, FALSE, 0);
-       gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET_PTR(textview),
-                          TRUE, TRUE, 0);
+       gtk_box_pack_start(GTK_BOX(vbox),
+                           GTK_WIDGET_PTR(mimeview), TRUE, TRUE, 0);
        gtk_widget_show(vbox);
 
-       /* to remove without destroyed */
-       gtk_widget_ref(GTK_WIDGET_PTR(textview));
-       gtk_widget_ref(GTK_WIDGET_PTR(mimeview));
-       gtk_widget_ref(GTK_WIDGET_PTR(mimeview->textview));
-
        messageview->vbox       = vbox;
        messageview->new_window = FALSE;
        messageview->window     = NULL;
        messageview->headerview = headerview;
-       messageview->textview   = textview;
        messageview->mimeview   = mimeview;
        messageview->noticeview = noticeview;
        messageview->mainwin    = mainwin;
@@ -395,8 +381,8 @@ MessageView *messageview_create_with_new_window(MainWindow *mainwin)
 
        messageview_add_toolbar(msgview, window);
 
-       gtk_widget_grab_focus(msgview->textview->text);
-       gtk_widget_show_all(window);
+       gtk_widget_grab_focus(msgview->mimeview->textview->text);
+       gtk_widget_show(window);
 
        msgview->new_window = TRUE;
        msgview->window = window;
@@ -412,7 +398,6 @@ MessageView *messageview_create_with_new_window(MainWindow *mainwin)
 void messageview_init(MessageView *messageview)
 {
        headerview_init(messageview->headerview);
-       textview_init(messageview->textview);
        mimeview_init(messageview->mimeview);
        /*messageview_set_font(messageview);*/
 
@@ -648,17 +633,9 @@ void messageview_show(MessageView *messageview, MsgInfo *msginfo,
        headerview_show(messageview->headerview, messageview->msginfo);
 
        messageview->all_headers = all_headers;
-       textview_set_all_headers(messageview->textview, all_headers);
        textview_set_all_headers(messageview->mimeview->textview, all_headers);
 
-       if (mimeinfo->type != MIMETYPE_TEXT) {
-               messageview_change_view_type(messageview, MVIEW_MIME);
-               mimeview_show_message(messageview->mimeview, mimeinfo, file);
-       } else {
-               messageview_change_view_type(messageview, MVIEW_TEXT);
-               textview_show_message(messageview->textview, mimeinfo, file);
-               procmime_mimeinfo_free_all(mimeinfo);
-       }
+       mimeview_show_message(messageview->mimeview, mimeinfo, file);
 
        if ((messageview->msginfo->dispositionnotificationto || 
             messageview->msginfo->returnreceiptto) &&
@@ -670,41 +647,6 @@ void messageview_show(MessageView *messageview, MsgInfo *msginfo,
        g_free(file);
 }
 
-static void messageview_change_view_type(MessageView *messageview,
-                                        MessageType type)
-{
-       TextView *textview = messageview->textview;
-       MimeView *mimeview = messageview->mimeview;
-       gboolean hadfocus  = GTK_WIDGET_HAS_FOCUS(textview->text);
-
-       if (messageview->type == type) return;
-
-       if (type == MVIEW_MIME) {
-               gtkut_container_remove
-                       (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)),
-                        GTK_WIDGET_PTR(textview));
-               gtk_box_pack_start(GTK_BOX(messageview->vbox),
-                                  GTK_WIDGET_PTR(mimeview), TRUE, TRUE, 0);
-               gtk_container_add(GTK_CONTAINER(mimeview->vbox),
-                                 GTK_WIDGET_PTR(textview));
-       } else if (type == MVIEW_TEXT) {
-               gtkut_container_remove
-                       (GTK_CONTAINER(GTK_WIDGET_PTR(messageview)),
-                        GTK_WIDGET_PTR(mimeview));
-
-               if (mimeview->vbox == GTK_WIDGET_PTR(textview)->parent)
-                       gtkut_container_remove(GTK_CONTAINER(mimeview->vbox),
-                                              GTK_WIDGET_PTR(textview));
-
-               gtk_box_pack_start(GTK_BOX(messageview->vbox),
-                                  GTK_WIDGET_PTR(textview), TRUE, TRUE, 0);
-       } else
-               return;
-       if (hadfocus) gtk_widget_grab_focus(textview->text);
-
-       messageview->type = type;
-}
-
 void messageview_reflect_prefs_pixmap_theme(void)
 {
        GList *cur;
@@ -721,16 +663,14 @@ void messageview_clear(MessageView *messageview)
 {
        procmsg_msginfo_free(messageview->msginfo);
        messageview->msginfo = NULL;
-       messageview_change_view_type(messageview, MVIEW_TEXT);
        messageview->filtered = FALSE;
+       mimeview_clear(messageview->mimeview);
        headerview_clear(messageview->headerview);
-       textview_clear(messageview->textview);
        noticeview_hide(messageview->noticeview);
 }
 
 void messageview_destroy(MessageView *messageview)
 {
-       GtkWidget *textview  = GTK_WIDGET_PTR(messageview->textview);
        GtkWidget *mimeview  = GTK_WIDGET_PTR(messageview->mimeview);
 
        debug_print("destroy messageview\n");
@@ -740,7 +680,6 @@ void messageview_destroy(MessageView *messageview)
                              messageview->msginfo_update_callback_id);
 
        headerview_destroy(messageview->headerview);
-       textview_destroy(messageview->textview);
        mimeview_destroy(messageview->mimeview);
        noticeview_destroy(messageview->noticeview);
 
@@ -755,7 +694,6 @@ void messageview_destroy(MessageView *messageview)
 
        g_free(messageview);
 
-       gtk_widget_unref(textview);
        gtk_widget_unref(mimeview);
 }
 
@@ -805,32 +743,20 @@ void messageview_quote_color_set(void)
 
 void messageview_set_font(MessageView *messageview)
 {
-       textview_set_font(messageview->textview, NULL);
 }
 
 TextView *messageview_get_current_textview(MessageView *messageview)
 {
        TextView *text = NULL;
 
-       if (messageview->type == MVIEW_TEXT)
-               text = messageview->textview;
-       else if (messageview->type == MVIEW_MIME) {
-               if (gtk_notebook_get_current_page
-                       (GTK_NOTEBOOK(messageview->mimeview->notebook)) == 0)
-                       text = messageview->textview;
-               else if (messageview->mimeview->type == MIMEVIEW_TEXT)
-                       text = messageview->mimeview->textview;
-       }
+       text = messageview->mimeview->textview;
 
        return text;
 }
 
 MimeInfo *messageview_get_selected_mime_part(MessageView *messageview)
 {
-       if (messageview->type == MVIEW_MIME)
-               return mimeview_get_selected_part(messageview->mimeview);
-
-       return NULL;
+       return mimeview_get_selected_part(messageview->mimeview);
 }
 
 void messageview_copy_clipboard(MessageView *messageview)
@@ -853,13 +779,21 @@ void messageview_select_all(MessageView *messageview)
 
 void messageview_set_position(MessageView *messageview, gint pos)
 {
-       textview_set_position(messageview->textview, pos);
+       TextView *text;
+
+       text = messageview_get_current_textview(messageview);
+       if (text)
+               textview_set_position(text, pos);
 }
 
 gboolean messageview_search_string(MessageView *messageview, const gchar *str,
                                   gboolean case_sens)
 {
-       return textview_search_string(messageview->textview, str, case_sens);
+       TextView *text;
+
+       text = messageview_get_current_textview(messageview);
+       if (text)
+               return textview_search_string(text, str, case_sens);
        return FALSE;
 }
 
@@ -867,8 +801,11 @@ gboolean messageview_search_string_backward(MessageView *messageview,
                                            const gchar *str,
                                            gboolean case_sens)
 {
-       return textview_search_string_backward(messageview->textview,
-                                              str, case_sens);
+       TextView *text;
+
+       text = messageview_get_current_textview(messageview);
+               return textview_search_string_backward(text,
+                                                      str, case_sens);
        return FALSE;
 }
 
@@ -957,7 +894,6 @@ void messageview_toggle_view_real(MessageView *messageview)
                gtkut_container_remove(GTK_CONTAINER(container), vpaned);
                gtk_widget_reparent(GTK_WIDGET_PTR(messageview), container);
                menu_set_sensitive(ifactory, "/View/Expand Summary View", FALSE);
-               gtk_widget_grab_focus(GTK_WIDGET(messageview->textview->text));
        } else {
                gtk_widget_reparent(GTK_WIDGET_PTR(messageview), vpaned);
                gtk_container_add(GTK_CONTAINER(container), vpaned);
@@ -1052,15 +988,11 @@ gchar *messageview_get_selection(MessageView *msgview)
        g_return_val_if_fail(msgview != NULL, NULL);
 
        textview = messageview_get_current_textview(msgview);
-       if (textview) {
-               edit = GTK_EDITABLE(textview->text);
-               body_pos = textview->body_pos;
-       } else {
-               edit = GTK_EDITABLE(msgview->mimeview->textview->text);
-               body_pos = msgview->mimeview->textview->body_pos;
-       }
+       g_return_val_if_fail(textview != NULL, NULL);
 
+       edit = GTK_EDITABLE(textview->text);
        g_return_val_if_fail(edit != NULL, NULL);
+       body_pos = textview->body_pos;
 
        if (edit->has_selection)
                text = gtkut_editable_get_selection(edit);
@@ -1192,12 +1124,14 @@ static void reply_cb(gpointer data, guint action, GtkWidget *widget)
        MsgInfo *msginfo;
        gchar *text = NULL;
        ComposeMode mode = (ComposeMode)action;
+       TextView *textview;
 
        msginfo = messageview->msginfo;
        mlist = g_slist_append(NULL, msginfo);
 
+       textview = messageview_get_current_textview(messageview);
        text = gtkut_editable_get_selection
-               (GTK_EDITABLE(messageview->textview->text));
+               (GTK_EDITABLE(textview->text));
        if (text && *text == '\0') {
                g_free(text);
                text = NULL;
index 6066352..f32444e 100644 (file)
@@ -34,17 +34,10 @@ typedef struct _MessageView         MessageView;
 #include "procmime.h"
 #include "toolbar.h"
 
-typedef enum
-{
-       MVIEW_TEXT,
-       MVIEW_MIME
-} MessageType;
-
 struct _MessageView
 {
        GtkWidget *vbox;
 
-       MessageType type;
        gboolean new_window;
        GtkWidget *window;
 
@@ -54,7 +47,6 @@ struct _MessageView
        GtkWidget *menubar;
 
        HeaderView *headerview;
-       TextView *textview;
        MimeView *mimeview;
        NoticeView *noticeview;
 
index 8123c6e..31e97e2 100644 (file)
@@ -84,7 +84,6 @@ static void mimeview_show_message_part                (MimeView       *mimeview,
                                                 MimeInfo       *partinfo);
 static void mimeview_change_view_type          (MimeView       *mimeview,
                                                 MimeViewType    type);
-static void mimeview_clear                     (MimeView       *mimeview);
 
 static void mimeview_selected          (GtkCTree       *ctree,
                                         GtkCTreeNode   *node,
@@ -151,11 +150,7 @@ static GtkItemFactoryEntry mimeview_popup_entries[] =
        {N_("/Open _with..."),    NULL, mimeview_open_with,       0, NULL},
        {N_("/_Display as text"), NULL, mimeview_display_as_text, 0, NULL},
        {N_("/_Save as..."),      NULL, mimeview_save_as,         0, NULL},
-       {N_("/Save _all..."),     NULL, mimeview_save_all,        0, NULL}
-#if USE_GPGME
-        ,
-        {N_("/_Check signature"), NULL, mimeview_check_signature, 0, NULL}
-#endif
+       {N_("/Save _all..."),     NULL, mimeview_save_all,        0, NULL},
 };
 
 static GtkTargetEntry mimeview_mime_types[] =
@@ -170,14 +165,13 @@ MimeView *mimeview_create(MainWindow *mainwin)
 {
        MimeView *mimeview;
 
-       GtkWidget *notebook;
-       GtkWidget *vbox;
        GtkWidget *paned;
        GtkWidget *scrolledwin;
        GtkWidget *ctree;
        GtkWidget *mime_notebook;
        GtkWidget *popupmenu;
        GtkWidget *ctree_mainbox;
+       GtkWidget *vbox;
        GtkWidget *mime_toggle;
        GtkWidget *icon_mainbox;
        GtkWidget *icon_scroll;
@@ -187,6 +181,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
        GtkWidget *hbox;
        GtkTooltips *tooltips;
        GtkItemFactory *popupfactory;
+       NoticeView *siginfoview;
        gchar *titles[N_MIMEVIEW_COLS];
        gint n_entries;
        gint i;
@@ -198,20 +193,14 @@ MimeView *mimeview_create(MainWindow *mainwin)
        titles[COL_SIZE]     = _("Size");
        titles[COL_NAME]     = _("Name");
 
-       notebook = gtk_notebook_new();
-       gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE);
-       gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), FALSE);
-       gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook), FALSE);
-
-       vbox = gtk_vbox_new(FALSE, 0);
-       gtk_container_add(GTK_CONTAINER(notebook), vbox);
-       
        scrolledwin = gtk_scrolled_window_new(NULL, NULL);
+       gtk_widget_show(scrolledwin);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
                                       GTK_POLICY_AUTOMATIC,
                                       GTK_POLICY_ALWAYS);
 
        ctree = gtk_sctree_new_with_titles(N_MIMEVIEW_COLS, 0, titles);
+       gtk_widget_show(ctree);
        gtk_clist_set_selection_mode(GTK_CLIST(ctree), GTK_SELECTION_BROWSE);
        gtk_ctree_set_line_style(GTK_CTREE(ctree), GTK_CTREE_LINES_NONE);
        gtk_clist_set_column_justification(GTK_CLIST(ctree), COL_SIZE,
@@ -240,14 +229,16 @@ MimeView *mimeview_create(MainWindow *mainwin)
         gtk_notebook_set_show_tabs(GTK_NOTEBOOK(mime_notebook), FALSE);
         gtk_notebook_set_show_border(GTK_NOTEBOOK(mime_notebook), FALSE);
        
-       gtk_notebook_set_page(GTK_NOTEBOOK(notebook), 0);
-                               
        icon_vbox = gtk_vbox_new(FALSE, 2);
+       gtk_widget_show(icon_vbox);
        icon_scroll = gtk_layout_new(NULL, NULL);
+       gtk_widget_show(icon_scroll);
        gtk_layout_put(GTK_LAYOUT(icon_scroll), icon_vbox, 0, 0);
        scrollbutton = gtk_vscrollbutton_new(gtk_layout_get_vadjustment(GTK_LAYOUT(icon_scroll)));
+       gtk_widget_show(scrollbutton);
 
        mime_toggle = gtk_toggle_button_new();
+       gtk_widget_show(mime_toggle);
        arrow = gtk_arrow_new(GTK_ARROW_LEFT, GTK_SHADOW_NONE);
        gtk_widget_show(arrow);
        gtk_container_add(GTK_CONTAINER(mime_toggle), arrow);
@@ -255,6 +246,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
                           GTK_SIGNAL_FUNC(mime_toggle_button_cb), mimeview);
 
        icon_mainbox = gtk_vbox_new(FALSE, 0);
+       gtk_widget_show(icon_mainbox);
        gtk_box_pack_start(GTK_BOX(icon_mainbox), mime_toggle, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(icon_mainbox), icon_scroll, TRUE, TRUE, 3);
        gtk_box_pack_end(GTK_BOX(icon_mainbox), scrollbutton, FALSE, FALSE, 0);
@@ -271,21 +263,26 @@ MimeView *mimeview_create(MainWindow *mainwin)
        tooltips = gtk_tooltips_new();
        gtk_tooltips_set_delay(tooltips, 0); 
 
+       vbox = gtk_vbox_new(FALSE, 0);
+       gtk_widget_show(vbox);
+       siginfoview = noticeview_create(mainwin);
+       noticeview_hide(siginfoview);
+       gtk_box_pack_start(GTK_BOX(vbox), mime_notebook, TRUE, TRUE, 0);
+       gtk_box_pack_end(GTK_BOX(vbox), GTK_WIDGET_PTR(siginfoview), FALSE, FALSE, 0);
+
        paned = gtk_vpaned_new();
-       gtk_paned_set_gutter_size(GTK_PANED(paned), 6);
+       gtk_widget_show(paned);
+       gtk_paned_set_gutter_size(GTK_PANED(paned), 0);
        gtk_paned_pack1(GTK_PANED(paned), ctree_mainbox, FALSE, TRUE);
-       gtk_paned_pack2(GTK_PANED(paned), mime_notebook, TRUE, TRUE);
-       gtk_container_add(GTK_CONTAINER(notebook), paned);
+       gtk_paned_pack2(GTK_PANED(paned), vbox, TRUE, TRUE);
        
        hbox = gtk_hbox_new(FALSE, 0);
-       gtk_box_pack_start(GTK_BOX(hbox), notebook, TRUE, TRUE, 0);
+       gtk_box_pack_start(GTK_BOX(hbox), paned, TRUE, TRUE, 0);
        gtk_box_pack_start(GTK_BOX(hbox), icon_mainbox, FALSE, FALSE, 0);
 
-       gtk_widget_show_all(hbox);
+       gtk_widget_show(hbox);
        gtk_widget_hide(ctree_mainbox);
 
-       mimeview->notebook      = notebook;
-       mimeview->vbox          = vbox;
        mimeview->hbox          = hbox;
        mimeview->paned         = paned;
        mimeview->scrolledwin   = scrolledwin;
@@ -303,6 +300,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
        mimeview->tooltips      = tooltips;
        mimeview->oldsize       = 60;
        mimeview->mime_toggle   = mime_toggle;
+       mimeview->siginfoview   = siginfoview;
 
        mimeview->target_list   = gtk_target_list_new(mimeview_mime_types, 1); 
        
@@ -319,56 +317,6 @@ void mimeview_init(MimeView *mimeview)
                GTK_WIDGET_PTR(mimeview->textview));
 }
 
-/* 
- * Check whether the message is OpenPGP signed
- */
-#if USE_GPGME
-static gboolean mimeview_is_signed(MimeView *mimeview)
-{
-       MimeInfo *partinfo = NULL;
-
-        debug_print("mimeview_is signed of %p\n", mimeview);
-
-        if (!mimeview) return FALSE;
-       if (!mimeview->opened) return FALSE;
-
-        debug_print("mimeview_is_signed: open\n" );
-
-       if (!mimeview->file) return FALSE;
-
-        debug_print("mimeview_is_signed: file\n" );
-
-       partinfo = gtk_ctree_node_get_row_data
-               (GTK_CTREE(mimeview->ctree), mimeview->opened);
-       g_return_val_if_fail(partinfo != NULL, FALSE);
-
-       /* walk the tree and see whether there is a signature somewhere */
-       do {
-               if (rfc2015_has_signature(partinfo))
-                       return TRUE;
-        } while ((partinfo = partinfo->parent) != NULL);
-
-       debug_print("mimeview_is_signed: FALSE\n" );
-
-       return FALSE;
-}
-
-static void set_unchecked_signature(MimeInfo *mimeinfo)
-{
-       MimeInfo *sig_partinfo;
-
-       sig_partinfo = rfc2015_find_signature(mimeinfo);
-       if (sig_partinfo == NULL) return;
-
-       g_free(sig_partinfo->sigstatus);
-       sig_partinfo->sigstatus =
-               g_strdup(_("Right-click here to verify the signature"));
-
-       g_free(sig_partinfo->sigstatus_full);
-       sig_partinfo->sigstatus_full = NULL;
-}
-#endif /* USE_GPGME */
-
 void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
                           const gchar *file)
 {
@@ -377,7 +325,6 @@ void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
        FILE *fp;
 
        mimeview_clear(mimeview);
-       textview_clear(mimeview->messageview->textview);
 
        g_return_if_fail(file != NULL);
        g_return_if_fail(mimeinfo != NULL);
@@ -386,18 +333,6 @@ void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
 
        mimeview->file = g_strdup(file);
 
-#if USE_GPGME
-       if (prefs_common.auto_check_signatures && gpg_started) {
-               if ((fp = fopen(file, "rb")) == NULL) {
-                       FILE_OP_ERROR(file, "fopen");
-                       return;
-               }
-               rfc2015_check_signature(mimeinfo, fp);
-               fclose(fp);
-       } else
-               set_unchecked_signature(mimeinfo);
-#endif
-
        gtk_signal_handler_block_by_func(GTK_OBJECT(ctree), mimeview_selected,
                                         mimeview);
 
@@ -417,7 +352,6 @@ void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
                    (partinfo->type == MIMETYPE_TEXT))
                        break;
        }
-       textview_show_message(mimeview->messageview->textview, mimeinfo, file);
 
        if (!node)
                node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
@@ -455,10 +389,6 @@ void mimeview_destroy(MimeView *mimeview)
 
 MimeInfo *mimeview_get_selected_part(MimeView *mimeview)
 {
-       if (gtk_notebook_get_current_page
-               (GTK_NOTEBOOK(mimeview->notebook)) == 0)
-               return NULL;
-
        return gtk_ctree_node_get_row_data
                (GTK_CTREE(mimeview->ctree), mimeview->opened);
 }
@@ -677,27 +607,27 @@ static void mimeview_change_view_type(MimeView *mimeview, MimeViewType type)
        mimeview->type = type;
 }
 
-static void mimeview_clear(MimeView *mimeview)
+void mimeview_clear(MimeView *mimeview)
 {
        GtkCList *clist = GTK_CLIST(mimeview->ctree);
 
-       procmime_mimeinfo_free_all(mimeview->mimeinfo);
-       mimeview->mimeinfo = NULL;
+       noticeview_hide(mimeview->siginfoview);
 
        gtk_clist_clear(clist);
        textview_clear(mimeview->textview);
        if (mimeview->mimeviewer != NULL)
                mimeview->mimeviewer->clear_viewer(mimeview->mimeviewer);
 
+       if (mimeview->mimeinfo != NULL)
+               procmime_mimeinfo_free_all(mimeview->mimeinfo);
+       mimeview->mimeinfo = NULL;
+
        mimeview->opened = NULL;
 
        g_free(mimeview->file);
        mimeview->file = NULL;
 
        icon_list_clear(mimeview);
-
-       if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mimeview->mime_toggle)))
-               gtk_notebook_set_page(GTK_NOTEBOOK(mimeview->notebook), 0);
 }
 
 static void mimeview_selected(GtkCTree *ctree, GtkCTreeNode *node, gint column,
@@ -720,7 +650,7 @@ static void mimeview_selected(GtkCTree *ctree, GtkCTreeNode *node, gint column,
        }
        
        mimeview->textview->default_text = FALSE;
-       
+
        if (!mimeview_show_part(mimeview, partinfo)) {
                switch (partinfo->type) {
                case MIMETYPE_TEXT:
@@ -732,14 +662,7 @@ static void mimeview_selected(GtkCTree *ctree, GtkCTreeNode *node, gint column,
                default:
                        mimeview->textview->default_text = TRUE;        
                        mimeview_change_view_type(mimeview, MIMEVIEW_TEXT);
-#if USE_GPGME
-                       if ((partinfo->type == MIMETYPE_APPLICATION) && 
-                           !g_strcasecmp(partinfo->subtype, "pgp-signature"))
-                               textview_show_signature_part(mimeview->textview,
-                                                            partinfo);
-                       else
-#endif
-                               textview_show_mime_part(mimeview->textview, partinfo);
+                       textview_show_mime_part(mimeview->textview, partinfo);
                        break;
                }
        }
@@ -807,11 +730,6 @@ static void part_button_pressed(MimeView *mimeview, GdkEventButton *event,
                        menu_set_sensitive(mimeview->popupfactory,
                                           "/Open", TRUE);
 
-#if USE_GPGME
-               menu_set_sensitive(mimeview->popupfactory,
-                                  "/Check signature",
-                                  mimeview_is_signed(mimeview));
-#endif
                gtk_object_set_data(GTK_OBJECT(mimeview->popupmenu),
                                    "pop_partinfo", partinfo);
                                    
@@ -1196,78 +1114,6 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
        execute_command_line(buf, TRUE);
 }
 
-#if USE_GPGME
-static void update_node_name(GtkCTree *ctree, GtkCTreeNode *node,
-                            gpointer data)
-{
-       MimeInfo *partinfo;
-       gchar *part_name;
-
-       partinfo = gtk_ctree_node_get_row_data(ctree, node);
-       g_return_if_fail(partinfo != NULL);
-
-       part_name = get_part_name(partinfo);
-       gtk_ctree_node_set_text(ctree, node, COL_NAME, part_name);
-}
-
-static void mimeview_update_names(MimeView *mimeview)
-{
-       GtkCTree *ctree = GTK_CTREE(mimeview->ctree);
-
-       gtk_ctree_pre_recursive(ctree, NULL, update_node_name, NULL);
-}
-
-static void mimeview_update_signature_info(MimeView *mimeview)
-{
-       MimeInfo *partinfo;
-
-       if (!mimeview) return;
-       if (!mimeview->opened) return;
-
-       partinfo = mimeview_get_selected_part(mimeview);
-       if (!partinfo) return;
-
-       if ((partinfo->type == MIMETYPE_APPLICATION) && 
-           !g_strcasecmp(partinfo->subtype, "application/pgp-signature")) {
-               mimeview_change_view_type(mimeview, MIMEVIEW_TEXT);
-               textview_show_signature_part(mimeview->textview, partinfo);
-       }
-}
-
-void mimeview_check_signature(MimeView *mimeview)
-{
-       MimeInfo *mimeinfo;
-       FILE *fp;
-
-       g_return_if_fail (mimeview_is_signed(mimeview));
-       g_return_if_fail (gpg_started);
-
-       mimeinfo = gtk_ctree_node_get_row_data
-               (GTK_CTREE(mimeview->ctree), mimeview->opened);
-       g_return_if_fail(mimeinfo != NULL);
-       g_return_if_fail(mimeview->file != NULL);
-
-       while (mimeinfo->parent)
-               mimeinfo = mimeinfo->parent;
-
-       if ((fp = fopen(mimeview->file, "rb")) == NULL) {
-               FILE_OP_ERROR(mimeview->file, "fopen");
-               return;
-       }
-
-       rfc2015_check_signature(mimeinfo, fp);
-       fclose(fp);
-
-       mimeview_update_names(mimeview);
-       mimeview_update_signature_info(mimeview);
-
-       textview_show_message(mimeview->messageview->textview, mimeinfo,
-                             mimeview->file);
-                             
-       mimeview_update(mimeview);
-}
-#endif /* USE_GPGME */
-
 void mimeview_register_viewer_factory(MimeViewerFactory *factory)
 {
        mimeviewer_factories = g_slist_append(mimeviewer_factories, factory);
@@ -1325,18 +1171,10 @@ static gboolean icon_clicked_cb (GtkWidget *button, GdkEventButton *event, MimeV
 
 static void icon_selected (MimeView *mimeview, gint num, MimeInfo *partinfo)
 {
-       if (num == 1 && (partinfo->type == MIMETYPE_TEXT)) {
-               gtk_notebook_set_page(GTK_NOTEBOOK(mimeview->notebook), 0);
-               /* don't set the ctree, as it will unload the plugin, and
-                * we want to be able to switch quickly between the text
-                * part and the attachment */
-       } else {
-               GtkCTreeNode *node;
-               gtk_notebook_set_page(GTK_NOTEBOOK(mimeview->notebook), 1);
-               node = gtk_ctree_find_by_row_data(GTK_CTREE(mimeview->ctree), NULL, partinfo);
-               if (node)
-                       gtk_ctree_select(GTK_CTREE(mimeview->ctree), node);
-       }
+       GtkCTreeNode *node;
+       node = gtk_ctree_find_by_row_data(GTK_CTREE(mimeview->ctree), NULL, partinfo);
+       if (node)
+               gtk_ctree_select(GTK_CTREE(mimeview->ctree), node);
 }              
 
 #undef  KEY_PRESS_EVENT_STOP
@@ -1359,10 +1197,7 @@ static gint icon_key_pressed(GtkWidget *button, GdkEventKey *event,
        
        if (!event) return FALSE;
 
-       if (gtk_notebook_get_current_page(GTK_NOTEBOOK(mimeview->notebook)) == 0)
-               textview = mimeview->messageview->textview;
-       else
-               textview = mimeview->textview;
+       textview = mimeview->textview;
 
        switch (event->keyval) {
        case GDK_space:
@@ -1414,22 +1249,16 @@ static gint icon_key_pressed(GtkWidget *button, GdkEventKey *event,
 
        case GDK_y:
                BREAK_ON_MODIFIER_KEY();
-               if (gtk_notebook_get_current_page(GTK_NOTEBOOK(mimeview->notebook)) == 0)
-                       break;
                KEY_PRESS_EVENT_STOP();
                mimeview_save_as(mimeview);
                return TRUE;
        case GDK_t:
                BREAK_ON_MODIFIER_KEY();
-               if (gtk_notebook_get_current_page(GTK_NOTEBOOK(mimeview->notebook)) == 0)
-                       break;
                KEY_PRESS_EVENT_STOP();
                mimeview_display_as_text(mimeview);
                return TRUE;    
        case GDK_l:
                BREAK_ON_MODIFIER_KEY();
-               if (gtk_notebook_get_current_page(GTK_NOTEBOOK(mimeview->notebook)) == 0)
-                       break;
                KEY_PRESS_EVENT_STOP();
                mimeview_launch(mimeview);
                return TRUE;
@@ -1490,24 +1319,6 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
                stockp = STOCK_PIXMAP_MIME_TEXT_PLAIN;
                break;
        case MIMETYPE_APPLICATION:
-#ifdef USE_GPGME       
-               if (mimeinfo->subtype && !g_strcasecmp(mimeinfo->subtype, "pgp-signature")) {
-                       if (mimeinfo->sigstatus_full) {
-                               desc = mimeinfo->sigstatus;
-                               if (mimeinfo->sig_ok)
-                                       stockp = STOCK_PIXMAP_MIME_GPG_PASSED;
-                               else if (mimeinfo->sig_unknown) 
-                                       stockp = STOCK_PIXMAP_MIME_GPG_UNKNOWN;
-                               else if (mimeinfo->sig_expired 
-                                        || mimeinfo->key_expired) 
-                                       stockp = STOCK_PIXMAP_MIME_GPG_EXPIRED;
-                               else
-                                       stockp = STOCK_PIXMAP_MIME_GPG_FAILED;
-                       } else
-                               stockp = STOCK_PIXMAP_MIME_GPG_SIGNED;
-               } else
-
-#endif 
                if (mimeinfo->subtype && !g_strcasecmp(mimeinfo->subtype, "octet-stream"))
                        stockp = STOCK_PIXMAP_MIME_APPLICATION_OCTET_STREAM;
                else
@@ -1683,7 +1494,7 @@ static void mime_toggle_button_cb (GtkWidget *button, MimeView *mimeview)
                                        button);
                gtk_box_pack_end(GTK_BOX(mimeview->ctree_mainbox), 
                                   button, FALSE, FALSE, 0);
-               gtk_notebook_set_page(GTK_NOTEBOOK(mimeview->notebook), 1); 
+               gtk_paned_set_gutter_size(GTK_PANED(mimeview->paned), 6);
        } else {
                gtk_arrow_set(GTK_ARROW(GTK_BIN(button)->child), GTK_ARROW_LEFT, 
                              GTK_SHADOW_NONE);
@@ -1702,6 +1513,7 @@ static void mime_toggle_button_cb (GtkWidget *button, MimeView *mimeview)
                                (mimeview, gtk_ctree_node_get_row_data(GTK_CTREE(mimeview->ctree), 
                                                                       mimeview->opened));
 
+               gtk_paned_set_gutter_size(GTK_PANED(mimeview->paned), 0);
        }
        gtk_widget_grab_focus(button);
        gtk_widget_unref(button);
index 2762268..1d0d9a8 100644 (file)
@@ -37,6 +37,7 @@ typedef struct _MimeViewer            MimeViewer;
 #include "textview.h"
 #include "messageview.h"
 #include "procmime.h"
+#include "noticeview.h"
 
 typedef enum
 {
@@ -48,8 +49,6 @@ struct _MimeView
 {
        GtkWidget *hbox;
        GtkWidget *paned;
-       GtkWidget *notebook;
-       GtkWidget *vbox;
        GtkWidget *scrolledwin;
        GtkWidget *ctree;
        GtkWidget *mime_notebook;
@@ -83,6 +82,8 @@ struct _MimeView
        MainWindow *mainwin;
        GtkTooltips *tooltips;
        gint oldsize;
+
+       NoticeView *siginfoview;
 };
 
 struct _MimeViewerFactory
@@ -114,12 +115,11 @@ void mimeview_show_message        (MimeView       *mimeview,
                                 const gchar    *file);
 void mimeview_destroy          (MimeView       *mimeview);
 void mimeview_update           (MimeView       *mimeview);
+void mimeview_clear            (MimeView       *mimeview);
 
 MimeInfo *mimeview_get_selected_part   (MimeView       *mimeview);
 
-#if USE_GPGME
-void mimeview_check_signature  (MimeView       *mimeview);
-#endif
+void mimeview_check_signature          (MimeView       *mimeview);
 void mimeview_pass_key_press_event     (MimeView       *mimeview,
                                         GdkEventKey    *event);
 
index 965201f..aed3ff7 100644 (file)
 #include "utils.h"
 #include "prefs_common.h"
 
-#if USE_GPGME
-#  include "rfc2015.h"
-#endif
-
 #include "prefs_gtk.h"
 
 static GHashTable *procmime_get_mime_type_table        (void);
@@ -76,32 +72,29 @@ static gboolean procmime_mimeinfo_parameters_destroy(gpointer key, gpointer valu
 
 void procmime_mimeinfo_free_all(MimeInfo *mimeinfo)
 {
-       while (mimeinfo != NULL) {
-               MimeInfo *next;
-
-               g_free(mimeinfo->encoding);
-               g_free(mimeinfo->charset);
-               g_free(mimeinfo->name);
-               g_free(mimeinfo->content_disposition);
-               if(mimeinfo->tmpfile)
-                       unlink(mimeinfo->filename);
-               g_free(mimeinfo->filename);
-
-               procmime_mimeinfo_free_all(mimeinfo->children);
-               g_free(mimeinfo->subtype);
-               g_free(mimeinfo->description);
-               g_free(mimeinfo->id);
-
-               g_free(mimeinfo->sigstatus);
-               g_free(mimeinfo->sigstatus_full);
-
-               g_hash_table_foreach_remove(mimeinfo->parameters, procmime_mimeinfo_parameters_destroy, NULL);
-               g_hash_table_destroy(mimeinfo->parameters);
-
-               next = mimeinfo->next;
-               g_free(mimeinfo);
-               mimeinfo = next;
-       }
+       MimeInfo *next;
+
+       g_return_if_fail(mimeinfo);
+
+       g_free(mimeinfo->encoding);
+       g_free(mimeinfo->charset);
+       g_free(mimeinfo->name);
+       g_free(mimeinfo->content_disposition);
+       if(mimeinfo->tmpfile)
+               unlink(mimeinfo->filename);
+       g_free(mimeinfo->filename);
+
+       procmime_mimeinfo_free_all(mimeinfo->children);
+       g_free(mimeinfo->subtype);
+       g_free(mimeinfo->description);
+       g_free(mimeinfo->id);
+
+       g_hash_table_foreach_remove(mimeinfo->parameters, procmime_mimeinfo_parameters_destroy, NULL);
+       g_hash_table_destroy(mimeinfo->parameters);
+
+       next = mimeinfo->next;
+       g_free(mimeinfo);
+       mimeinfo = next;
 }
 
 MimeInfo *procmime_mimeinfo_insert(MimeInfo *parent, MimeInfo *mimeinfo)
index cd9ae65..5c0d4e2 100644 (file)
@@ -28,9 +28,6 @@ extern "C" {
 #  include "config.h"
 #endif
 
-#include <glib.h>
-#include <stdio.h>
-
 typedef struct _MimeType       MimeType;
 typedef struct _MimeInfo       MimeInfo;
 
@@ -45,16 +42,6 @@ typedef enum
        ENC_UNKNOWN
 } EncodingType;
 
-#include "procmsg.h"
-
-struct _MimeType
-{
-       gchar *type;
-       gchar *sub_type;
-
-       gchar *extension;
-};
-
 typedef enum
 {
        MIMETYPE_TEXT,
@@ -67,6 +54,19 @@ typedef enum
        MIMETYPE_UNKNOWN,
 } MimeMediaType;
 
+#include <glib.h>
+#include <stdio.h>
+
+#include "procmsg.h"
+
+struct _MimeType
+{
+       gchar *type;
+       gchar *sub_type;
+
+       gchar *extension;
+};
+
 /*
  * An example of MimeInfo structure:
  *
@@ -126,14 +126,6 @@ struct _MimeInfo
 
        guint            offset;
        guint            length;
-
-       /* Privacy */
-       gchar *sigstatus;
-       gchar *sigstatus_full;
-       gboolean sig_ok;
-       gboolean sig_unknown;
-       gboolean sig_expired;
-       gboolean key_expired;
 };
 
 #define IS_BOUNDARY(s, bnd, len) \
index f086af8..62c5bb8 100644 (file)
@@ -37,9 +37,6 @@
 #include "folder.h"
 #include "prefs_common.h"
 #include "account.h"
-#if USE_GPGME
-#  include "rfc2015.h"
-#endif
 #include "alertpanel.h"
 #include "news.h"
 #include "hooks.h"
@@ -918,19 +915,6 @@ MsgInfo *procmsg_msginfo_get_full_info(MsgInfo *msginfo)
        procmsg_msginfo_free(full_msginfo);
 
        return procmsg_msginfo_new_ref(msginfo);
-#if 0
-       full_msginfo->msgnum = msginfo->msgnum;
-       full_msginfo->size = msginfo->size;
-       full_msginfo->mtime = msginfo->mtime;
-       full_msginfo->folder = msginfo->folder;
-#if USE_GPGME
-       full_msginfo->plaintext_file = g_strdup(msginfo->plaintext_file);
-       full_msginfo->decryption_failed = msginfo->decryption_failed;
-#endif
-       procmsg_msginfo_set_to_folder(full_msginfo, msginfo->to_folder);
-
-       return full_msginfo;
-#endif
 }
 
 void procmsg_msginfo_free(MsgInfo *msginfo)
index 0bc4169..af56aaf 100644 (file)
@@ -246,10 +246,6 @@ gchar  *procmsg_get_message_file   (MsgInfo        *msginfo);
 GSList *procmsg_get_message_file_list  (MsgInfoList    *mlist);
 void   procmsg_message_file_list_free  (MsgInfoList    *file_list);
 FILE   *procmsg_open_message           (MsgInfo        *msginfo);
-#if USE_GPGME
-FILE   *procmsg_open_message_decrypted (MsgInfo        *msginfo,
-                                        MimeInfo      **mimeinfo);
-#endif
 gboolean procmsg_msg_exist             (MsgInfo        *msginfo);
 
 void   procmsg_get_filter_keyword      (MsgInfo          *msginfo,
index 8b9d243..0f3b082 100644 (file)
@@ -328,6 +328,7 @@ sig_status_full (GpgmeCtx ctx)
 
 static void check_signature (MimeInfo *mimeinfo, MimeInfo *partinfo, FILE *fp)
 {
+#if 0 /* FIXME */
     GpgmeCtx ctx = NULL;
     GpgmeError err;
     GpgmeData sig = NULL, text = NULL;
@@ -425,6 +426,7 @@ leave:
     gpgme_release (ctx);
     if (prefs_common.gpg_signature_popup)
        gpgmegtk_sig_status_destroy (statuswindow);
+#endif
 }
 
 /*
index f21a3cd..b76d14e 100644 (file)
@@ -1361,7 +1361,7 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
        menuitem = gtk_item_factory_get_widget(ifactory, "/View/All header");
        gtk_check_menu_item_set_active
                (GTK_CHECK_MENU_ITEM(menuitem),
-                summaryview->messageview->textview->show_all_headers);
+                summaryview->messageview->mimeview->textview->show_all_headers);
        summary_unlock(summaryview);
 }
 
@@ -2478,11 +2478,7 @@ static void summary_display_msg_full(SummaryView *summaryview,
                if (!messageview_is_visible(msgview))
                        main_window_toggle_message_view(summaryview->mainwin);
                messageview_show(msgview, msginfo, all_headers);
-               if (msgview->type == MVIEW_TEXT ||
-                   (msgview->type == MVIEW_MIME &&
-                    (GTK_CLIST(msgview->mimeview->ctree)->row_list == NULL ||
-                     gtk_notebook_get_current_page
-                       (GTK_NOTEBOOK(msgview->mimeview->notebook)) == 0)))
+               if (GTK_CLIST(msgview->mimeview->ctree)->row_list == NULL)
                        gtk_widget_grab_focus(summaryview->ctree);
                GTK_EVENTS_FLUSH();
                gtkut_ctree_node_move_if_on_the_edge(ctree, row);
@@ -4460,12 +4456,7 @@ static gint summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
        }
 
        messageview = summaryview->messageview;
-       if (messageview->type == MVIEW_MIME &&
-           gtk_notebook_get_current_page
-               (GTK_NOTEBOOK(messageview->mimeview->notebook)) == 1)
-               textview = messageview->mimeview->textview;
-       else
-               textview = messageview->textview;
+       textview = messageview->mimeview->textview;
 
        switch (event->keyval) {
        case GDK_space:         /* Page down or go to the next */
index 4a577f1..f3e64fd 100644 (file)
@@ -98,7 +98,6 @@ static GdkColor error_color = {
 };
 #endif
 
-#if USE_GPGME
 static GdkColor good_sig_color = {
        (gulong)0,
        (gushort)0,
@@ -119,7 +118,6 @@ static GdkColor bad_sig_color = {
        (gushort)0,
        (gushort)0
 };
-#endif
 
 static GdkFont *text_sb_font;
 static GdkFont *text_mb_font;
@@ -441,13 +439,6 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
 
        gtk_stext_freeze(text);
 
-#if USE_GPGME
-       if (mimeinfo->sigstatus)
-               g_snprintf(buf, sizeof(buf), "\n[%s/%s (%s)]\n",
-                          procmime_get_type_str(mimeinfo->type), 
-                          mimeinfo->subtype, mimeinfo->sigstatus);
-       else
-#endif
        if (g_hash_table_lookup(mimeinfo->parameters, "name") != NULL)
                g_snprintf(buf, sizeof(buf), "\n[%s  %s/%s (%d bytes)]\n",
                           (gchar *) g_hash_table_lookup(mimeinfo->parameters, "name"),
@@ -458,31 +449,6 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
                           procmime_get_type_str(mimeinfo->type),
                           mimeinfo->subtype, mimeinfo->length);
 
-#if USE_GPGME
-       if (mimeinfo->sigstatus && !mimeinfo->sigstatus_full) {
-               gchar *tmp;
-               /* use standard font */
-               gpointer oldfont = textview->msgfont;
-               textview->msgfont = NULL;
-
-               tmp = g_strconcat("pgp: ", _("Check signature"), NULL);
-               textview_write_link(textview, buf, tmp, NULL);
-               
-               /* put things back */
-               textview->msgfont = (GdkFont *)oldfont;
-               oldfont = NULL;
-               g_free(tmp);
-       } else if (mimeinfo->sigstatus) {
-               GdkColor *color;
-               if (!strcmp(mimeinfo->sigstatus, _("Good signature")))
-                       color = &good_sig_color;
-               else if (!strcmp(mimeinfo->sigstatus, _("BAD signature")))
-                       color = &bad_sig_color;
-               else
-                       color = &nocheck_sig_color; 
-               gtk_stext_insert(text, NULL, color, NULL, buf, -1);
-       } else
-#endif
        if (mimeinfo->type != MIMETYPE_TEXT) {
                gtk_stext_insert(text, NULL, NULL, NULL, buf, -1);
        } else {
@@ -557,31 +523,6 @@ void textview_show_mime_part(TextView *textview, MimeInfo *partinfo)
        gtk_stext_thaw(text);
 }
 
-#if USE_GPGME
-void textview_show_signature_part(TextView *textview, MimeInfo *partinfo)
-{
-       GtkSText *text;
-
-       if (!partinfo) return;
-
-       textview_set_font(textview, NULL);
-       text = GTK_STEXT(textview->text);
-       textview_clear(textview);
-
-       gtk_stext_freeze(text);
-
-       if (partinfo->sigstatus_full == NULL) {
-               TEXT_INSERT(_("This signature has not been checked yet.\n"));
-               TEXT_INSERT(_("To check it, pop up the context menu with\n"));
-               TEXT_INSERT(_("right click and select `Check signature'.\n"));
-       } else {
-               TEXT_INSERT(partinfo->sigstatus_full);
-       }
-
-       gtk_stext_thaw(text);
-}
-#endif /* USE_GPGME */
-
 #undef TEXT_INSERT
 
 static void textview_write_body(TextView *textview, MimeInfo *mimeinfo,
@@ -1746,13 +1687,9 @@ static gint textview_key_pressed(GtkWidget *widget, GdkEventKey *event,
        case GDK_y:
        case GDK_t:
        case GDK_l:
-               if (messageview->type == MVIEW_MIME &&
-                   textview == messageview->mimeview->textview) {
-                       KEY_PRESS_EVENT_STOP();
-                       mimeview_pass_key_press_event(messageview->mimeview,
-                                                     event);
-                       break;
-               }
+               KEY_PRESS_EVENT_STOP();
+               mimeview_pass_key_press_event(messageview->mimeview,
+                                             event);
                /* fall through */
        default:
                if (summaryview &&
@@ -1864,18 +1801,7 @@ static gint textview_button_released(GtkWidget *widget, GdkEventButton *event,
                                                }
                                                compose_new(account, uri->uri + 7, NULL);
                                        }
-                               } else 
-#if USE_GPGME
-                               if (!g_strncasecmp(uri->uri, "pgp:", 4)) {
-                                       GtkAdjustment *pos = gtk_scrolled_window_get_vadjustment(
-                                                               GTK_SCROLLED_WINDOW(textview->scrolledwin));
-                                       gfloat vpos = pos->value;
-                                       mimeview_check_signature(textview->messageview->mimeview);
-                                       /* scroll back where we were */
-                                       gtk_adjustment_set_value(pos, vpos);
-                               } else
-#endif
-                               {
+                               } else {
                                        open_uri(uri->uri,
                                                 prefs_common.uri_cmd);
                                }
index 5ed886e..f786d7e 100644 (file)
@@ -74,10 +74,6 @@ void textview_show_part              (TextView       *textview,
                                 FILE           *fp);
 void textview_show_mime_part   (TextView       *textview,
                                 MimeInfo       *partinfo);
-#if USE_GPGME
-void textview_show_signature_part(TextView     *textview,
-                                 MimeInfo      *partinfo);
-#endif
 void textview_clear            (TextView       *textview);
 void textview_destroy          (TextView       *textview);
 void textview_set_all_headers  (TextView       *textview,