2007-01-11 [paul] 2.7.0cvs8
* src/imap.c Fix recursion when server lists the current subfolder in the response * src/mimeview.c Fix updating of icon_list/ctree * src/plugins/pgpcore/select-keys.c Fix a few annoyances when choosing keys for the CMS (S/MIME) protocol
This commit is contained in:
parent
7df76138e4
commit
67ca12049b
6 changed files with 65 additions and 18 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2007-01-11 [paul] 2.7.0cvs8
|
||||
|
||||
* src/imap.c
|
||||
Fix recursion when server lists the
|
||||
current subfolder in the response
|
||||
* src/mimeview.c
|
||||
Fix updating of icon_list/ctree
|
||||
* src/plugins/pgpcore/select-keys.c
|
||||
Fix a few annoyances when choosing
|
||||
keys for the CMS (S/MIME) protocol
|
||||
|
||||
2007-01-11 [wwp] 2.7.0cvs7
|
||||
|
||||
* src/compose.c
|
||||
|
|
|
@ -2234,3 +2234,4 @@
|
|||
( cvs diff -u -r 1.274.2.161 -r 1.274.2.162 src/mainwindow.c; ) > 2.7.0cvs5.patchset
|
||||
( cvs diff -u -r 1.52.2.34 -r 1.52.2.35 src/prefs_folder_item.c; ) > 2.7.0cvs6.patchset
|
||||
( cvs diff -u -r 1.382.2.349 -r 1.382.2.350 src/compose.c; cvs diff -u -r 1.105.2.76 -r 1.105.2.77 src/prefs_account.c; cvs diff -u -r 1.49.2.23 -r 1.49.2.24 src/prefs_account.h; ) > 2.7.0cvs7.patchset
|
||||
( cvs diff -u -r 1.179.2.146 -r 1.179.2.147 src/imap.c; cvs diff -u -r 1.83.2.96 -r 1.83.2.97 src/mimeview.c; cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/plugins/pgpcore/select-keys.c; ) > 2.7.0cvs8.patchset
|
||||
|
|
|
@ -11,7 +11,7 @@ MINOR_VERSION=7
|
|||
MICRO_VERSION=0
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=7
|
||||
EXTRA_VERSION=8
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -4098,7 +4098,7 @@ static GSList * imap_list_from_lep(IMAPFolder * folder,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!all && strcmp(dup_name, real_path) == 0) {
|
||||
if (!all && path_cmp(name, real_path) == 0) {
|
||||
g_free(base);
|
||||
free(dup_name);
|
||||
continue;
|
||||
|
|
|
@ -357,7 +357,6 @@ void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
|
|||
g_signal_handlers_block_by_func(G_OBJECT(ctree), mimeview_selected,
|
||||
mimeview);
|
||||
|
||||
mimeview_set_multipart_tree(mimeview, mimeinfo, NULL);
|
||||
icon_list_create(mimeview, mimeinfo);
|
||||
|
||||
g_signal_handlers_unblock_by_func(G_OBJECT(ctree),
|
||||
|
@ -1813,6 +1812,7 @@ static void icon_selected (MimeView *mimeview, gint num, MimeInfo *partinfo)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -1965,7 +1965,7 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
|
|||
GINT_TO_POINTER(mimeview->icon_count));
|
||||
g_object_set_data(G_OBJECT(button), "partinfo",
|
||||
mimeinfo);
|
||||
|
||||
|
||||
switch (mimeinfo->type) {
|
||||
|
||||
case MIMETYPE_TEXT:
|
||||
|
@ -2172,6 +2172,8 @@ static void icon_list_create(MimeView *mimeview, MimeInfo *mimeinfo)
|
|||
{
|
||||
GtkRequisition size;
|
||||
|
||||
mimeview_set_multipart_tree(mimeview, mimeinfo, NULL);
|
||||
|
||||
g_return_if_fail(mimeinfo != NULL);
|
||||
|
||||
while (mimeinfo != NULL) {
|
||||
|
|
|
@ -77,7 +77,7 @@ struct select_keys_s {
|
|||
};
|
||||
|
||||
|
||||
static void set_row (GtkCList *clist, gpgme_key_t key);
|
||||
static void set_row (GtkCList *clist, gpgme_key_t key, gpgme_protocol_t proto);
|
||||
static gpgme_key_t fill_clist (struct select_keys_s *sk, const char *pattern,
|
||||
gpgme_protocol_t proto);
|
||||
static void create_dialog (struct select_keys_s *sk);
|
||||
|
@ -95,7 +95,7 @@ static void sort_keys (struct select_keys_s *sk, enum col_titles column);
|
|||
static void sort_keys_name (GtkWidget *widget, gpointer data);
|
||||
static void sort_keys_email (GtkWidget *widget, gpointer data);
|
||||
|
||||
static gboolean use_untrusted (gpgme_key_t);
|
||||
static gboolean use_untrusted (gpgme_key_t, gpgme_protocol_t proto);
|
||||
|
||||
static void
|
||||
update_progress (struct select_keys_s *sk, int running, const char *pattern)
|
||||
|
@ -184,14 +184,14 @@ destroy_key (gpointer data)
|
|||
}
|
||||
|
||||
static void
|
||||
set_row (GtkCList *clist, gpgme_key_t key)
|
||||
set_row (GtkCList *clist, gpgme_key_t key, gpgme_protocol_t proto)
|
||||
{
|
||||
const char *s;
|
||||
const char *text[N_COL_TITLES];
|
||||
char *algo_buf;
|
||||
int row;
|
||||
gsize by_read = 0, by_written = 0;
|
||||
gchar *ret_str;
|
||||
gchar *ret_str = NULL;
|
||||
|
||||
/* first check whether the key is capable of encryption which is not
|
||||
* the case for revoked, expired or sign-only keys */
|
||||
|
@ -207,17 +207,38 @@ set_row (GtkCList *clist, gpgme_key_t key)
|
|||
s += 8; /* show only the short keyID */
|
||||
text[COL_KEYID] = s;
|
||||
|
||||
|
||||
s = key->uids->name;
|
||||
if (!s || !strlen(s))
|
||||
if (!s || !*s)
|
||||
s = key->uids->uid;
|
||||
ret_str = g_locale_to_utf8 (s, strlen(s), &by_read, &by_written, NULL);
|
||||
if (proto == GPGME_PROTOCOL_CMS) {
|
||||
if (strstr(s, ",CN="))
|
||||
s = strstr(s, ",CN=")+4;
|
||||
else if (strstr(s, "CN="))
|
||||
s = strstr(s, "CN=")+3;
|
||||
}
|
||||
|
||||
ret_str = NULL;
|
||||
if (!g_utf8_validate(s, -1, NULL))
|
||||
ret_str = g_locale_to_utf8 (s, strlen(s), &by_read, &by_written, NULL);
|
||||
if (ret_str && by_written) {
|
||||
s = ret_str;
|
||||
}
|
||||
text[COL_NAME] = s;
|
||||
|
||||
s = key->uids->email;
|
||||
ret_str = g_locale_to_utf8 (s, strlen(s), &by_read, &by_written, NULL);
|
||||
if (proto == GPGME_PROTOCOL_CMS && !key->uids->email || !*key->uids->email) {
|
||||
gpgme_user_id_t uid = key->uids->next;
|
||||
if (uid)
|
||||
s = uid->email;
|
||||
else
|
||||
s = key->uids->email;
|
||||
} else {
|
||||
s = key->uids->email;
|
||||
}
|
||||
|
||||
ret_str = NULL;
|
||||
if (!g_utf8_validate(s, -1, NULL))
|
||||
ret_str = g_locale_to_utf8 (s, strlen(s), &by_read, &by_written, NULL);
|
||||
if (ret_str && by_written) {
|
||||
s = ret_str;
|
||||
}
|
||||
|
@ -293,12 +314,19 @@ fill_clist (struct select_keys_s *sk, const char *pattern, gpgme_protocol_t prot
|
|||
while ( !(err = gpgme_op_keylist_next ( ctx, &key )) ) {
|
||||
gpgme_user_id_t uid = key->uids;
|
||||
debug_print ("%% %s:%d: insert\n", __FILE__ ,__LINE__ );
|
||||
set_row (clist, key );
|
||||
set_row (clist, key, proto );
|
||||
for (; uid; uid = uid->next) {
|
||||
if (!strcmp(pattern, uid->email)) {
|
||||
gchar *raw_mail = NULL;
|
||||
if (!uid->email)
|
||||
continue;
|
||||
raw_mail = g_strdup(uid->email);
|
||||
extract_address(raw_mail);
|
||||
if (!strcmp(pattern, raw_mail)) {
|
||||
exact_match = TRUE;
|
||||
g_free(raw_mail);
|
||||
break;
|
||||
}
|
||||
g_free(raw_mail);
|
||||
}
|
||||
num_results++;
|
||||
last_key = key;
|
||||
|
@ -310,7 +338,7 @@ fill_clist (struct select_keys_s *sk, const char *pattern, gpgme_protocol_t prot
|
|||
|
||||
if (exact_match == TRUE && num_results == 1) {
|
||||
if (last_key->uids->validity < GPGME_VALIDITY_FULL &&
|
||||
!use_untrusted(last_key))
|
||||
!use_untrusted(last_key, proto))
|
||||
exact_match = FALSE;
|
||||
}
|
||||
|
||||
|
@ -489,7 +517,7 @@ select_btn_cb (GtkWidget *widget, gpointer data)
|
|||
key = gtk_clist_get_row_data(sk->clist, row);
|
||||
if (key) {
|
||||
if ( key->uids->validity < GPGME_VALIDITY_FULL ) {
|
||||
use_key = use_untrusted(key);
|
||||
use_key = use_untrusted(key, sk->proto);
|
||||
if (!use_key) {
|
||||
debug_print ("** Key untrusted, will not encrypt");
|
||||
return;
|
||||
|
@ -555,10 +583,15 @@ other_btn_cb (GtkWidget *widget, gpointer data)
|
|||
|
||||
|
||||
static gboolean
|
||||
use_untrusted (gpgme_key_t key)
|
||||
use_untrusted (gpgme_key_t key, gpgme_protocol_t proto)
|
||||
{
|
||||
AlertValue aval;
|
||||
gchar *buf = g_strdup_printf(_("The key of '%s' is not fully trusted.\n"
|
||||
gchar *buf = NULL;
|
||||
|
||||
if (proto != GPGME_PROTOCOL_OpenPGP)
|
||||
return TRUE;
|
||||
|
||||
buf = g_strdup_printf(_("The key of '%s' is not fully trusted.\n"
|
||||
"If you choose to encrypt the message with this key you don't\n"
|
||||
"know for sure that it will go to the person you mean it to.\n"
|
||||
"Do you trust it enough to use it anyway?"), key->uids->email);
|
||||
|
|
Loading…
Reference in a new issue