From 7ed7c83e8d2ebbaa41fb40aff307eb6fdefc5937 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 13 May 2009 08:58:12 +0400 Subject: [PATCH] Replaced addstr(str_term_form(...)) to tty_print_string(...). --- src/dialog.c | 2 +- src/info.c | 14 ++++++++------ src/layout.c | 2 +- src/menu.c | 15 +++++++-------- src/view.c | 4 ++-- src/widget.c | 8 ++++---- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/dialog.c b/src/dialog.c index 65f1b5e86..6b3d0d03e 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -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); } } diff --git a/src/info.c b/src/info.c index d4e7def86..9755bfa56 100644 --- a/src/info.c +++ b/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")); diff --git a/src/layout.c b/src/layout.c index b1f3a0019..b517675b4 100644 --- a/src/layout.c +++ b/src/layout.c @@ -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); } diff --git a/src/menu.c b/src/menu.c index 6ff0710e1..0c892d59c 100644 --- a/src/menu.c +++ b/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) diff --git a/src/view.c b/src/view.c index 5bee6f945..41c01a895 100644 --- a/src/view.c +++ b/src/view.c @@ -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 { diff --git a/src/widget.c b/src/widget.c index 27609213a..d1b822ce5 100644 --- a/src/widget.c +++ b/src/widget.c @@ -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: