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
This commit is contained in:
Colin Leroy 2005-10-13 17:48:47 +00:00
parent 5d7f510b64
commit 7f628693fe
7 changed files with 49 additions and 15 deletions

View 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

View file

@ -873,3 +873,4 @@
( 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

View 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=

View 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);

View 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;
}

View 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__ */

View 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,