* editcmd.c (edit_replace_prompt): Allocate the label text
dynamically instead of using catstrs. Don't handle ENABLE_CHARSET specially.
Этот коммит содержится в:
родитель
a9f9db7b6b
Коммит
6c29de339b
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
* editcmd.c (edit_replace_cmd): Added const qualifier.
|
* editcmd.c (edit_replace_cmd): Added const qualifier.
|
||||||
* editwidget.c (edit_my_define): likewise.
|
* editwidget.c (edit_my_define): likewise.
|
||||||
|
* editcmd.c (edit_replace_prompt): Allocate the label text
|
||||||
|
dynamically instead of using catstrs. Don't handle
|
||||||
|
ENABLE_CHARSET specially.
|
||||||
|
|
||||||
2004-09-17 Andrew V. Samoilov <andrew@email.zp.ua>
|
2004-09-17 Andrew V. Samoilov <andrew@email.zp.ua>
|
||||||
|
|
||||||
|
@ -1182,20 +1182,16 @@ edit_replace_prompt (WEdit * edit, char *replace_text, int xpos, int ypos)
|
|||||||
0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0},
|
||||||
NULL_QuickWidget};
|
NULL_QuickWidget};
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET
|
GString *label_text = g_string_new (_(" Replace with: "));
|
||||||
char *msg = _(" Replace with: ");
|
|
||||||
|
|
||||||
if (*replace_text) {
|
if (*replace_text) {
|
||||||
int msg_len = strlen (msg);
|
size_t label_text_len = label_text->len;
|
||||||
msg = catstrs (msg, replace_text, 0);
|
g_string_append (label_text, replace_text);
|
||||||
convert_to_display (msg + msg_len);
|
convert_to_display (label_text->str + label_text_len);
|
||||||
}
|
}
|
||||||
quick_widgets[5].text = msg;
|
quick_widgets[5].text = label_text->str;
|
||||||
#else
|
|
||||||
quick_widgets[5].text = catstrs (_ (" Replace with: "), replace_text, 0);
|
|
||||||
#endif /* !HAVE_CHARSET */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
int retval;
|
||||||
QuickDialog Quick_input =
|
QuickDialog Quick_input =
|
||||||
{CONFIRM_DLG_WIDTH, CONFIRM_DLG_HEIGTH, 0, 0, N_ (" Confirm replace "),
|
{CONFIRM_DLG_WIDTH, CONFIRM_DLG_HEIGTH, 0, 0, N_ (" Confirm replace "),
|
||||||
"[Input Line Keys]", 0 /*quick_widgets */, 0 };
|
"[Input Line Keys]", 0 /*quick_widgets */, 0 };
|
||||||
@ -1210,7 +1206,9 @@ edit_replace_prompt (WEdit * edit, char *replace_text, int xpos, int ypos)
|
|||||||
ypos -= CONFIRM_DLG_HEIGTH;
|
ypos -= CONFIRM_DLG_HEIGTH;
|
||||||
|
|
||||||
Quick_input.ypos = ypos;
|
Quick_input.ypos = ypos;
|
||||||
return quick_dialog (&Quick_input);
|
retval = quick_dialog (&Quick_input);
|
||||||
|
g_string_free (label_text, TRUE);
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user