167 |
kid = key->subkeys->keyid; |
kid = key->subkeys->keyid; |
168 |
if (!s || !strcmp (kid+8, k->keyid)) |
if (!s || !strcmp (kid+8, k->keyid)) |
169 |
continue; |
continue; |
170 |
u = utf8_to_wincp (s, strlen (s)); |
u = utf8_to_native (s); |
171 |
SendDlgItemMessage (dlg, IDC_ADDREV_KEYLIST, CB_ADDSTRING, |
SendDlgItemMessage (dlg, IDC_ADDREV_KEYLIST, CB_ADDSTRING, |
172 |
0, (WPARAM)(char *)u); |
0, (WPARAM)(char *)u); |
173 |
free (u); |
free (u); |
194 |
n = strlen (utf8_name) + strlen (email) + 16; |
n = strlen (utf8_name) + strlen (email) + 16; |
195 |
if (comment) |
if (comment) |
196 |
n += strlen (comment); |
n += strlen (comment); |
197 |
uid = utf8_to_wincp (utf8_name, strlen (utf8_name)); |
uid = utf8_to_native (utf8_name); |
198 |
p = new char[n+1]; |
p = new char[n+1]; |
199 |
if (!p) |
if (!p) |
200 |
BUG (NULL); |
BUG (NULL); |
252 |
GpgKeyEdit *ke; |
GpgKeyEdit *ke; |
253 |
gpgme_error_t err; |
gpgme_error_t err; |
254 |
gpg_uid_info_t inf, ui; |
gpg_uid_info_t inf, ui; |
255 |
|
char *ui_name = NULL; |
256 |
int pos = -1; |
int pos = -1; |
257 |
|
|
258 |
ke = new GpgKeyEdit (keyid); |
ke = new GpgKeyEdit (keyid); |
268 |
} |
} |
269 |
|
|
270 |
for (ui = inf; ui; ui = ui->next) { |
for (ui = inf; ui; ui = ui->next) { |
271 |
if (name && email && ui->email && ui->name) { |
safe_free (ui_name); |
272 |
|
ui_name = utf8_to_native (ui->name); |
273 |
|
if (name && email && ui->email && ui_name) { |
274 |
if (!strcmp (ui->email, email) && |
if (!strcmp (ui->email, email) && |
275 |
!strncmp (ui->name, name, strlen (name))) { |
!strncmp (ui_name, name, strlen (name))) { |
276 |
pos = ui->index; |
pos = ui->index; |
277 |
break; |
break; |
278 |
} |
} |
287 |
as the fallbck when no email address is available. */ |
as the fallbck when no email address is available. */ |
288 |
continue; |
continue; |
289 |
} |
} |
290 |
if (ui->name && name && !strcmp (ui->name, name)) { |
if (ui_name && name && !strcmp (ui_name, name)) { |
291 |
pos = ui->index; |
pos = ui->index; |
292 |
break; |
break; |
293 |
} |
} |
296 |
*r_inf = inf; |
*r_inf = inf; |
297 |
else |
else |
298 |
gpg_uid_info_release (inf); |
gpg_uid_info_release (inf); |
299 |
|
safe_free (ui_name); |
300 |
return pos; |
return pos; |
301 |
} |
} |
302 |
|
|
552 |
|
|
553 |
rc = GetDlgItemText (dlg, IDC_ADDUID_COMMENT, |
rc = GetDlgItemText (dlg, IDC_ADDUID_COMMENT, |
554 |
comment, sizeof comment -1); |
comment, sizeof comment -1); |
555 |
|
utf8_name = native_to_utf8 (name); |
|
/* XXX: something is wrong with the encoding :-( */ |
|
|
utf8_name = wincp_to_utf8 (name, strlen (name)); |
|
556 |
|
|
557 |
ke = new GpgKeyEdit (ctx->keyid); |
ke = new GpgKeyEdit (ctx->keyid); |
558 |
if (!ke) |
if (!ke) |
1183 |
/* XXX: add comment if available */ |
/* XXX: add comment if available */ |
1184 |
attr = u->name; |
attr = u->name; |
1185 |
if (attr) { |
if (attr) { |
1186 |
char *uid = utf8_to_wincp (attr, strlen (attr)); |
char *uid = utf8_to_native (attr); |
1187 |
if (uid) { |
if (uid) { |
1188 |
listview_add_sub_item (lv, j, 1, uid); |
listview_add_sub_item (lv, j, 1, uid); |
1189 |
free (uid); |
free (uid); |