1
1

Ticket #1986 (not converted text in confirm dialog)

fixed encoding of text in 'Confirm replace' dialog.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Этот коммит содержится в:
Ilia Maslakov 2010-02-24 22:02:35 +00:00
родитель f1790672dc
Коммит cf16304bf6

Просмотреть файл

@ -1517,6 +1517,8 @@ edit_replace_cmd (WEdit *edit, int again)
static char *saved2 = NULL; static char *saved2 = NULL;
char *input1 = NULL; /* user input from the dialog */ char *input1 = NULL; /* user input from the dialog */
char *input2 = NULL; char *input2 = NULL;
char *disp1 = NULL;
char *disp2 = NULL;
int replace_yes; int replace_yes;
long times_replaced = 0, last_search; long times_replaced = 0, last_search;
gboolean once_found = FALSE; gboolean once_found = FALSE;
@ -1538,9 +1540,9 @@ edit_replace_cmd (WEdit *edit, int again)
input1 = g_strdup (saved1 ? saved1 : ""); input1 = g_strdup (saved1 ? saved1 : "");
input2 = g_strdup (saved2 ? saved2 : ""); input2 = g_strdup (saved2 ? saved2 : "");
} else { } else {
char *disp1 = edit_replace_cmd__conv_to_display (saved1 ? saved1 : (char *) "");
char *disp2 = edit_replace_cmd__conv_to_display (saved2 ? saved2 : (char *) "");
char *tmp_inp1, *tmp_inp2; char *tmp_inp1, *tmp_inp2;
disp1 = edit_replace_cmd__conv_to_display (saved1 ? saved1 : (char *) "");
disp2 = edit_replace_cmd__conv_to_display (saved2 ? saved2 : (char *) "");
edit_push_action (edit, KEY_PRESS + edit->start_display); edit_push_action (edit, KEY_PRESS + edit->start_display);
@ -1632,7 +1634,9 @@ edit_replace_cmd (WEdit *edit, int again)
/*so that undo stops at each query */ /*so that undo stops at each query */
edit_push_key_press (edit); edit_push_key_press (edit);
/* and prompt 2/3 down */ /* and prompt 2/3 down */
switch (editcmd_dialog_replace_prompt_show (edit, input1, input2, -1, -1)) { disp1 = edit_replace_cmd__conv_to_display (saved1);
disp2 = edit_replace_cmd__conv_to_display (saved2);
switch (editcmd_dialog_replace_prompt_show (edit, disp1, disp2, -1, -1)) {
case B_ENTER: case B_ENTER:
replace_yes = 1; replace_yes = 1;
break; break;
@ -1647,6 +1651,8 @@ edit_replace_cmd (WEdit *edit, int again)
edit->replace_mode = -1; edit->replace_mode = -1;
break; break;
} }
g_free (disp1);
g_free (disp2);
} }
if (replace_yes) { /* delete then insert new */ if (replace_yes) { /* delete then insert new */
GString *repl_str, *tmp_str; GString *repl_str, *tmp_str;