2005-10-13 [colin] 1.9.15cvs37
authorColin Leroy <colin@colino.net>
Thu, 13 Oct 2005 17:48:47 +0000 (17:48 +0000)
committerColin Leroy <colin@colino.net>
Thu, 13 Oct 2005 17:48:47 +0000 (17:48 +0000)
* src/mimeview.c
* src/noticeview.c
* src/noticeview.h
* src/plugins/pgpcore/sgpgme.c
Make privacy icon clickable
Move Trust field in Full info
When trust is less than full, don't display
a warning icon

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/mimeview.c
src/noticeview.c
src/noticeview.h
src/plugins/pgpcore/sgpgme.c

index 8b7b58d9db6e6b0c59320bcd9faa512daf8ebd99..95e7690e36ddb99ccaded9431d78e75206a3ccd6 100644 (file)
@@ -1,3 +1,14 @@
+2005-10-13 [colin]     1.9.15cvs37
+
+       * src/mimeview.c
+       * src/noticeview.c
+       * src/noticeview.h
+       * src/plugins/pgpcore/sgpgme.c
+               Make privacy icon clickable
+               Move Trust field in Full info
+               When trust is less than full, don't display
+               a warning icon
+
 2005-10-13 [colin]     1.9.15cvs36
 
        * src/folder.c
index f4ac450bac74e33c782c20f1b0350a031771bf2c..c9b240c88d6c55ba67234010f6549753fca401ae 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.8.2.13 -r 1.8.2.14 src/export.c;  cvs diff -u -r 1.13.2.12 -r 1.13.2.13 src/import.c;  cvs diff -u -r 1.105.2.37 -r 1.105.2.38 src/prefs_account.c;  ) > 1.9.15cvs34.patchset
 ( cvs diff -u -r 1.2.2.9 -r 1.2.2.10 src/folder_item_prefs.c;  ) > 1.9.15cvs35.patchset
 ( cvs diff -u -r 1.213.2.63 -r 1.213.2.64 src/folder.c;  cvs diff -u -r 1.207.2.71 -r 1.207.2.72 src/folderview.c;  ) > 1.9.15cvs36.patchset
+( cvs diff -u -r 1.83.2.42 -r 1.83.2.43 src/mimeview.c;  cvs diff -u -r 1.5.2.8 -r 1.5.2.9 src/noticeview.c;  cvs diff -u -r 1.3.8.3 -r 1.3.8.4 src/noticeview.h;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/plugins/pgpcore/sgpgme.c;  ) > 1.9.15cvs37.patchset
index b3a02d5ed813b60790932e5e40e96df9724f607a..7aa87e0605991c3538bb7515ea65d8192000ff6a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=36
+EXTRA_VERSION=37
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9e627cbbe13be9ce23262492a8cccf594057e85d..981401b3fae47c11a7fc82a0fe9313e3f9bb2804 100644 (file)
@@ -271,6 +271,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
        gtk_widget_show(vbox);
        siginfoview = noticeview_create(mainwin);
        noticeview_hide(siginfoview);
+       noticeview_set_icon_clickable(siginfoview, TRUE);
        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);
 
index 953662ba053a1deee53de3c03d7acbe9f9dec7b7..502494fd2b80f85f2e5cd087ffa9e877950c0bed 100644 (file)
@@ -47,6 +47,8 @@
 
 static void noticeview_button_pressed  (GtkButton *button, NoticeView *noticeview);
 static void noticeview_2ndbutton_pressed(GtkButton *button, NoticeView *noticeview);
+static gboolean noticeview_icon_pressed        (GtkWidget *widget, GdkEventButton *evt,
+                                        NoticeView *noticeview);
 
 NoticeView *noticeview_create(MainWindow *mainwin)
 {
@@ -58,6 +60,7 @@ NoticeView *noticeview_create(MainWindow *mainwin)
        GtkWidget  *text;
        GtkWidget  *widget;
        GtkWidget  *widget2;
+       GtkWidget  *evtbox;
 
        debug_print("Creating notice view...\n");
        noticeview = g_new0(NoticeView, 1);
@@ -73,14 +76,19 @@ NoticeView *noticeview_create(MainWindow *mainwin)
        gtk_widget_show(hbox);
        gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 1);
 
+       evtbox = gtk_event_box_new();
+       gtk_event_box_set_visible_window(GTK_EVENT_BOX(evtbox), FALSE);
+       gtk_widget_show(evtbox);
+
        icon = stock_pixmap_widget(noticeview->window, STOCK_PIXMAP_NOTICE_WARN); 
-#if 0
-       /* also possible... */
-       icon = gtk_pixmap_new(NULL, NULL);
-#endif
+
        gtk_widget_show(icon);
+       g_signal_connect(G_OBJECT(evtbox), "button-press-event", 
+                        G_CALLBACK(noticeview_icon_pressed),
+                        (gpointer) noticeview);
        
-       gtk_box_pack_start(GTK_BOX(hbox), icon, FALSE, TRUE, 0);
+       gtk_container_add(GTK_CONTAINER(evtbox), icon);
+       gtk_box_pack_start(GTK_BOX(hbox), evtbox, FALSE, TRUE, 0);
        
        text = gtk_label_new("");
        gtk_widget_show(text);
@@ -178,6 +186,15 @@ static void noticeview_button_pressed(GtkButton *button, NoticeView *noticeview)
        }
 }
 
+static gboolean noticeview_icon_pressed(GtkWidget *widget, GdkEventButton *evt,
+                                   NoticeView *noticeview)
+{
+       if (evt && evt->button == 1 && noticeview->icon_clickable) {
+               noticeview_button_pressed(NULL, noticeview);
+       }
+       return FALSE;
+}
+
 void noticeview_set_2ndbutton_text(NoticeView *noticeview, const char *text)
 {
        g_return_if_fail(noticeview);
@@ -215,3 +232,8 @@ void noticeview_set_icon(NoticeView *noticeview, StockPixmap icon)
        
        gtk_image_set_from_pixmap(GTK_IMAGE(noticeview->icon), pixmap, bitmap);
 }
+
+void noticeview_set_icon_clickable(NoticeView *noticeview, gboolean setting)
+{
+       noticeview->icon_clickable = setting;
+}              
index 0b28e496a6a320bf914d9246748cca63d702199e..5c21e04b1a5b87ee3257d1c9310c528f2fe054a1 100644 (file)
@@ -39,6 +39,7 @@ struct _NoticeView
        gpointer         user_data2;
        void            (*press) (NoticeView *, gpointer user_data);
        void            (*press2) (NoticeView *, gpointer user_data);
+       gboolean         icon_clickable;
 };
 
 NoticeView     *noticeview_create      (MainWindow     *mainwin);
@@ -66,5 +67,7 @@ void           noticeview_set_2ndbutton_press_callback
                                        (NoticeView     *noticeview,
                                         GtkSignalFunc   callback,
                                         gpointer       *user_data);
-                                       
+void            noticeview_set_icon_clickable
+                                       (NoticeView     *noticeview,
+                                        gboolean        setting);                      
 #endif /* NOTICEVIEW_H__ */
index c0eacf1910fb240e7b82d77d6a28086f2de12333..6bb6039b13b6cc84bd88cf61e5278d33cee8970c 100644 (file)
@@ -87,10 +87,6 @@ SignatureStatus sgpgme_sigstat_gpgme_to_privacy(gpgme_ctx_t ctx, gpgme_verify_re
        debug_print("err code %d\n", gpg_err_code(sig->status));
        switch (gpg_err_code(sig->status)) {
        case GPG_ERR_NO_ERROR:
-               if ((validity != GPGME_VALIDITY_MARGINAL) &&
-                   (validity != GPGME_VALIDITY_FULL) &&
-                   (validity != GPGME_VALIDITY_ULTIMATE))
-                       return SIGNATURE_WARN;
                return SIGNATURE_OK;
        case GPG_ERR_SIG_EXPIRED:
        case GPG_ERR_KEY_EXPIRED:
@@ -169,8 +165,8 @@ gchar *sgpgme_sigstat_info_short(gpgme_ctx_t ctx, gpgme_verify_result_t status)
                uname = g_strdup("<?>");
        switch (gpg_err_code(sig->status)) {
        case GPG_ERR_NO_ERROR:
-               result = g_strdup_printf(_("Good signature from %s (Trust: %s)."),
-                       uname, get_validity_str(sig->validity));
+               result = g_strdup_printf(_("Good signature from %s."),
+                       uname);
                break;
        case GPG_ERR_SIG_EXPIRED:
                result = g_strdup_printf(_("Expired signature from %s."), uname);
@@ -229,8 +225,8 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status)
                case GPG_ERR_NO_ERROR:
                case GPG_ERR_KEY_EXPIRED:
                        g_string_append_printf(siginfo,
-                               _("Good signature from \"%s\"\n"),
-                               uid);
+                               _("Good signature from \"%s\" (Trust: %s)\n"),
+                               uid, get_validity_str(sig->validity));
                        break;
                case GPG_ERR_SIG_EXPIRED:
                        g_string_append_printf(siginfo,