Replaced addstr(str_term_form(...)) to tty_print_string(...).

This commit is contained in:
Andrew Borodin 2009-05-13 08:58:12 +04:00
parent 62cdac4d1f
commit 7ed7c83e8d
6 changed files with 23 additions and 22 deletions

View File

@ -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);
}
}

View File

@ -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"));

View File

@ -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);
}

View File

@ -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)

View File

@ -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 {

View File

@ -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: