mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
Replaced addstr(str_term_form(...)) to tty_print_string(...).
This commit is contained in:
parent
62cdac4d1f
commit
7ed7c83e8d
@ -165,7 +165,7 @@ common_dialog_repaint (struct Dlg_head *h)
|
||||
if (h->title) {
|
||||
tty_setcolor (DLG_HOT_NORMALC (h));
|
||||
dlg_move (h, space, (h->cols - str_term_width1 (h->title)) / 2);
|
||||
addstr (str_term_form (h->title));
|
||||
tty_print_string (h->title);
|
||||
}
|
||||
}
|
||||
|
||||
|
14
src/info.c
14
src/info.c
@ -138,28 +138,30 @@ info_show_info (struct WInfo *info)
|
||||
widget_move (&info->widget, 13, 3);
|
||||
str_printf (buff, _("Device: %s"),
|
||||
str_trunc (myfs_stats.device, info->widget.cols - i18n_adjust));
|
||||
addstr (str_term_form (buff->str));
|
||||
tty_print_string (buff->str);
|
||||
g_string_set_size(buff, 0);
|
||||
case 12:
|
||||
widget_move (&info->widget, 12, 3);
|
||||
str_printf (buff, _("Filesystem: %s"),
|
||||
str_trunc (myfs_stats.mpoint, info->widget.cols - i18n_adjust));
|
||||
addstr (str_term_form (buff->str));
|
||||
tty_print_string (buff->str);
|
||||
g_string_set_size(buff, 0);
|
||||
case 11:
|
||||
widget_move (&info->widget, 11, 3);
|
||||
str_printf (buff, _("Accessed: %s"), file_date (st.st_atime));
|
||||
addstr (str_term_form (buff->str));
|
||||
tty_print_string (buff->str);
|
||||
g_string_set_size(buff, 0);
|
||||
case 10:
|
||||
widget_move (&info->widget, 10, 3);
|
||||
str_printf (buff, _("Modified: %s"), file_date (st.st_mtime));
|
||||
addstr (str_term_form (buff->str));
|
||||
tty_print_string (buff->str);
|
||||
g_string_set_size(buff, 0);
|
||||
case 9:
|
||||
widget_move (&info->widget, 9, 3);
|
||||
/* TRANSLATORS: "Status changed", like in the stat(2) man page */
|
||||
printw (_("Status: %s"), file_date (st.st_ctime));
|
||||
str_printf (buff, _("Status: %s"), file_date (st.st_ctime));
|
||||
tty_print_string (buff->str);
|
||||
g_string_set_size(buff, 0);
|
||||
|
||||
case 8:
|
||||
widget_move (&info->widget, 8, 3);
|
||||
@ -207,7 +209,7 @@ info_show_info (struct WInfo *info)
|
||||
str_printf (buff, file_label,
|
||||
str_trunc (current_panel->dir.list [current_panel->selected].fname,
|
||||
info->widget.cols - i18n_adjust));
|
||||
addstr (str_term_form (buff->str));
|
||||
tty_print_string (buff->str);
|
||||
} else
|
||||
addstr (_("File: None"));
|
||||
|
||||
|
@ -308,7 +308,7 @@ layout_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
|
||||
old_output_lines = _output_lines;
|
||||
tty_setcolor (COLOR_NORMAL);
|
||||
dlg_move (h, LAYOUT_OPTIONS_COUNT, 16 + first_width);
|
||||
addstr (str_term_form (output_lines_label));
|
||||
tty_print_string (output_lines_label);
|
||||
dlg_move (h, LAYOUT_OPTIONS_COUNT, 10 + first_width);
|
||||
tty_printf ("%02d", _output_lines);
|
||||
}
|
||||
|
15
src/menu.c
15
src/menu.c
@ -106,17 +106,17 @@ static void menubar_paint_idx (WMenu *menubar, int idx, int color)
|
||||
widget_move (&menubar->widget, y, x);
|
||||
addch ((unsigned char) entry->first_letter);
|
||||
hline (' ', menubar->max_entry_len + 1); /* clear line */
|
||||
addstr (str_term_form (entry->text.start));
|
||||
tty_print_string (entry->text.start);
|
||||
|
||||
if (entry->text.hotkey != NULL) {
|
||||
tty_setcolor (color == MENU_SELECTED_COLOR ?
|
||||
MENU_HOTSEL_COLOR : MENU_HOT_COLOR);
|
||||
addstr (str_term_form (entry->text.hotkey));
|
||||
tty_print_string (entry->text.hotkey);
|
||||
tty_setcolor(color);
|
||||
}
|
||||
|
||||
if (entry->text.end != NULL)
|
||||
addstr (str_term_form (entry->text.end));
|
||||
tty_print_string (entry->text.end);
|
||||
|
||||
/* move cursor to the start of entry text */
|
||||
widget_move (&menubar->widget, y, x + 1);
|
||||
@ -164,18 +164,17 @@ static void menubar_draw (WMenu *menubar)
|
||||
MENU_SELECTED_COLOR : SELECTED_COLOR);
|
||||
widget_move (&menubar->widget, 0, menubar->menu [i]->start_x);
|
||||
|
||||
addstr (str_term_form (menubar->menu[i]->text.start));
|
||||
tty_print_string (menubar->menu[i]->text.start);
|
||||
|
||||
if (menubar->menu[i]->text.hotkey != NULL) {
|
||||
tty_setcolor ((menubar->active && i == menubar->selected) ?
|
||||
MENU_HOTSEL_COLOR : COLOR_HOT_FOCUS);
|
||||
addstr (str_term_form (menubar->menu[i]->text.hotkey));
|
||||
tty_print_string (menubar->menu[i]->text.hotkey);
|
||||
tty_setcolor ((menubar->active && i == menubar->selected) ?
|
||||
MENU_SELECTED_COLOR : SELECTED_COLOR);
|
||||
}
|
||||
if (menubar->menu[i]->text.end != NULL) {
|
||||
addstr (str_term_form (menubar->menu[i]->text.end));
|
||||
}
|
||||
if (menubar->menu[i]->text.end != NULL)
|
||||
tty_print_string (menubar->menu[i]->text.end);
|
||||
}
|
||||
|
||||
if (menubar->dropped)
|
||||
|
@ -2494,7 +2494,7 @@ view_display_text (WView * view)
|
||||
|
||||
if (!str_iscombiningmark (info.cnxt)) {
|
||||
if (str_isprint (info.cact)) {
|
||||
addstr (str_term_form (info.cact));
|
||||
tty_print_string (info.cact);
|
||||
} else {
|
||||
addch ('.');
|
||||
}
|
||||
@ -2509,7 +2509,7 @@ view_display_text (WView * view)
|
||||
view_read_continue (view, &info);
|
||||
g_string_append(comb,info.cact);
|
||||
}
|
||||
addstr (str_term_form (comb->str));
|
||||
tty_print_string (comb->str);
|
||||
g_string_free (comb, TRUE);
|
||||
}
|
||||
} else {
|
||||
|
@ -135,16 +135,16 @@ static void
|
||||
draw_hotkey (Widget *w, const struct hotkey_t hotkey, gboolean focused)
|
||||
{
|
||||
widget_selectcolor (w, focused, FALSE);
|
||||
addstr (str_term_form (hotkey.start));
|
||||
tty_print_string (hotkey.start);
|
||||
|
||||
if (hotkey.hotkey != NULL) {
|
||||
widget_selectcolor (w, focused, TRUE);
|
||||
addstr (str_term_form (hotkey.hotkey));
|
||||
tty_print_string (hotkey.hotkey);
|
||||
widget_selectcolor (w, focused, FALSE);
|
||||
}
|
||||
|
||||
if (hotkey.end != NULL)
|
||||
addstr (str_term_form (hotkey.end));
|
||||
tty_print_string (hotkey.end);
|
||||
}
|
||||
|
||||
static int button_event (Gpm_Event *event, void *);
|
||||
@ -2629,7 +2629,7 @@ groupbox_callback (Widget *w, widget_msg_t msg, int parm)
|
||||
tty_setcolor (COLOR_HOT_NORMAL);
|
||||
dlg_move (g->widget.parent, g->widget.y - g->widget.parent->y,
|
||||
g->widget.x - g->widget.parent->x + 1);
|
||||
addstr (str_term_form (g->title));
|
||||
tty_print_string (g->title);
|
||||
return MSG_HANDLED;
|
||||
|
||||
case WIDGET_DESTROY:
|
||||
|
Loading…
Reference in New Issue
Block a user