tweaks: in comments, reword "titlebar" and "statusbar" to two words each

To differentiate them from the function names.
master
Benno Schulenberg 2020-01-16 16:16:31 +01:00
parent f47ef539db
commit 706f3e93f4
6 changed files with 37 additions and 37 deletions

View File

@ -129,8 +129,8 @@ void make_new_buffer(void)
#endif
}
/* Mark the current file as modified if it isn't already, and then
* update the titlebar to display the file's new status. */
/* Mark the current file as modified if it isn't already, and
* then update the title bar to display the file's new status. */
void set_modified(void)
{
if (openfile->modified)
@ -562,10 +562,10 @@ bool replace_buffer(const char *filename, undo_type action, bool marked,
}
#endif /* ENABLE_SPELLER */
/* Update the titlebar and the multiline cache to match the current buffer. */
/* Update the title bar and the multiline cache to match the current buffer. */
void prepare_for_display(void)
{
/* Update the titlebar, since the filename may have changed. */
/* Update the title bar, since the filename may have changed. */
if (!inhelp)
titlebar(NULL);
@ -620,7 +620,7 @@ void redecorate_after_switch(void)
openfile->firstcolumn = 0;
#endif
/* Update titlebar and multiline info to match the current buffer. */
/* Update title bar and multiline info to match the current buffer. */
prepare_for_display();
/* Ensure that the main loop will redraw the help lines. */
@ -1032,7 +1032,7 @@ void do_insertfile(void)
int response;
const char *msg;
char *given = copy_of("");
/* The last answer the user typed at the statusbar prompt. */
/* The last answer the user typed at the status-bar prompt. */
#ifndef NANO_TINY
format_type was_fmt = openfile->fmt;
bool execute = FALSE;
@ -2468,7 +2468,7 @@ char **cwd_tab_completion(const char *buf, bool allow_files,
return matches;
}
/* Do tab completion. place refers to how much the statusbar cursor
/* Do tab completion. place refers to how much the status-bar cursor
* position should be advanced. refresh_func is the function we will
* call to refresh the edit window. */
char *input_tab(char *buf, bool allow_files, size_t *place,

View File

@ -112,7 +112,7 @@ WINDOW *edit = NULL;
* contents of the current buffer, the file we are editing. */
WINDOW *bottomwin = NULL;
/* The bottom portion of the screen, where we display statusbar
* messages, the statusbar prompt, and a list of shortcuts. */
* messages, the status-bar prompt, and a list of shortcuts. */
int editwinrows = 0;
/* How many rows does the edit window take up? */
int editwincols = -1;
@ -163,7 +163,7 @@ char *word_chars = NULL;
/* Nonalphanumeric characters that also form words. */
char *answer = NULL;
/* The answer string used by the statusbar prompt. */
/* The answer string used by the status-bar prompt. */
ssize_t tabsize = -1;
/* The width of a tab in spaces. The default is set in main(). */

View File

@ -317,7 +317,7 @@ void disable_bracketed_paste(void)
/* Exit normally: restore the terminal state and save history files. */
void finish(void)
{
/* Blank the statusbar and (if applicable) the shortcut list. */
/* Blank the status bar and (if applicable) the shortcut list. */
blank_statusbar();
blank_bottombars();
wrefresh(bottomwin);
@ -457,12 +457,12 @@ void window_init(void)
delwin(bottomwin);
}
/* If the terminal is very flat, don't set up a titlebar. */
/* If the terminal is very flat, don't set up a title bar. */
if (LINES < 3) {
topwin = NULL;
editwinrows = 1;
/* Set up two subwindows. If the terminal is just one line,
* edit window and statusbar window will cover each other. */
* edit window and status-bar window will cover each other. */
edit = newwin(1, COLS, 0, 0);
bottomwin = newwin(1, COLS, LINES - 1, 0);
} else {

View File

@ -24,18 +24,18 @@
#include <string.h>
static char *prompt = NULL;
/* The prompt string used for statusbar questions. */
/* The prompt string used for status-bar questions. */
static size_t typing_x = HIGHEST_POSITIVE;
/* The cursor position in answer. */
#ifdef ENABLE_MOUSE
/* Handle a mouse click on the statusbar prompt or the shortcut list. */
/* Handle a mouse click on the status-bar prompt or the shortcut list. */
int do_statusbar_mouse(void)
{
int click_row, click_col;
int retval = get_mouseinput(&click_row, &click_col, TRUE);
/* We can click on the statusbar window text to move the cursor. */
/* We can click on the status-bar window text to move the cursor. */
if (retval == 0 && wmouse_trafo(bottomwin, &click_row, &click_col, FALSE)) {
size_t start_col = breadth(prompt) + 2;
@ -362,7 +362,7 @@ void do_statusbar_uncut_text(void)
}
/* Return the column number of the first character of the answer that is
* displayed in the statusbar when the cursor is at the given column,
* displayed in the status bar when the cursor is at the given column,
* with the available room for the answer starting at base. Note that
* (0 <= column - get_statusbar_page_start(column) < COLS). */
size_t get_statusbar_page_start(size_t base, size_t column)
@ -435,7 +435,7 @@ void add_or_remove_pipe_symbol_from_answer(void)
}
#endif
/* Get a string of input at the statusbar prompt. */
/* Get a string of input at the status-bar prompt. */
functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
bool allow_files, bool *listed, linestruct **history_list,
void (*refresh_func)(void))
@ -549,7 +549,7 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
* the help viewer or display a message indicating that help
* is disabled, which means that finished has been set to TRUE.
* Set it back to FALSE here, so that we aren't kicked out of
* the statusbar prompt. */
* the status-bar prompt. */
finished = FALSE;
}
@ -576,7 +576,7 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
return func;
}
/* Ask a question on the statusbar. Return 0 when text was entered,
/* Ask a question on the status bar. Return 0 when text was entered,
* -1 for a cancelled entry, -2 for a blank string, and the relevant
* keycode when a valid shortcut key was pressed.
*
@ -592,7 +592,7 @@ int do_prompt(bool allow_tabs, bool allow_files,
int retval;
functionptrtype func = NULL;
bool listed = FALSE;
/* Save a possible current statusbar x position and prompt. */
/* Save a possible current status-bar x position and prompt. */
size_t was_typing_x = typing_x;
char *saved_prompt = prompt;
@ -646,7 +646,7 @@ int do_prompt(bool allow_tabs, bool allow_files,
}
/* Ask a simple Yes/No (and optionally All) question, specified in msg,
* on the statusbar. Return 1 for Yes, 0 for No, 2 for All (if all is
* on the status bar. Return 1 for Yes, 0 for No, 2 for All (if all is
* TRUE when passed in), and -1 for Cancel. */
int do_yesno_prompt(bool all, const char *msg)
{

View File

@ -3117,7 +3117,7 @@ void do_wordlinechar_count(void)
openfile->current = was_current;
openfile->current_x = was_x;
/* Display the total word, line, and character counts on the statusbar. */
/* Display the total word, line, and character counts on the status bar. */
statusline(HUSH, _("%sWords: %zu Lines: %zd Chars: %zu"), openfile->mark ?
_("In Selection: ") : "", words, lines, chars);
}
@ -3138,7 +3138,7 @@ void do_verbatim_input(void)
/* Read in all the verbatim characters. */
kbinput = get_verbatim_kbinput(edit, &count);
/* Unsuppress cursor-position display or blank the statusbar. */
/* Unsuppress cursor-position display or blank the status bar. */
if (ISSET(CONSTANT_SHOW))
suppress_cursorpos = FALSE;
else

View File

@ -48,7 +48,7 @@ static int digit_count = 0;
static bool waiting_mode = TRUE;
/* Whether getting a character will wait for a key to be pressed. */
static int statusblank = 0;
/* The number of keystrokes left before we blank the statusbar. */
/* The number of keystrokes left before we blank the status bar. */
#ifdef USING_OLD_NCURSES
static bool seen_wide = FALSE;
/* Whether we've seen a multicolumn character in the current line. */
@ -338,7 +338,7 @@ int get_kbinput(WINDOW *win, bool showcursor)
while (kbinput == ERR)
kbinput = parse_kbinput(win);
/* If we read from the edit window, blank the statusbar if needed. */
/* If we read from the edit window, blank the status bar if needed. */
if (win == edit)
check_statusblank();
@ -1777,8 +1777,8 @@ void blank_bottombars(void)
}
}
/* Check if the number of keystrokes needed to blank the statusbar has
* been pressed. If so, blank the statusbar, unless constant cursor
/* Check if the number of keystrokes needed to blank the status bar has
* been pressed. If so, blank the status bar, unless constant cursor
* position display is on and we are in the editing screen. */
void check_statusblank(void)
{
@ -2005,17 +2005,17 @@ int buffer_number(openfilestruct *buffer)
/* If path is NULL, we're in normal editing mode, so display the current
* version of nano, the current filename, and whether the current file
* has been modified on the titlebar. If path isn't NULL, we're either
* has been modified on the title bar. If path isn't NULL, we're either
* in the file browser or the help viewer, so show either the current
* directory or the title of help text, that is: whatever is in path. */
void titlebar(const char *path)
{
size_t verlen, prefixlen, pathlen, statelen;
/* The width of the different titlebar elements, in columns. */
/* The width of the different title-bar elements, in columns. */
size_t pluglen = 0;
/* The width that "Modified" would take up. */
size_t offset = 0;
/* The position at which the center part of the titlebar starts. */
/* The position at which the center part of the title bar starts. */
const char *upperleft = "";
/* What is shown in the top left corner. */
const char *prefix = "";
@ -2027,7 +2027,7 @@ void titlebar(const char *path)
char *indicator = NULL;
/* The buffer sequence number plus buffer count. */
/* If the screen is too small, there is no titlebar. */
/* If the screen is too small, there is no title bar. */
if (topwin == NULL)
return;
@ -2144,7 +2144,7 @@ void titlebar(const char *path)
wrefresh(topwin);
}
/* Display a message on the statusbar, and set suppress_cursorpos to
/* Display a message on the status bar, and set suppress_cursorpos to
* TRUE, so that the message won't be immediately overwritten if
* constant cursor position display is on. */
void statusline(message_type importance, const char *msg, ...)
@ -2237,7 +2237,7 @@ void statusline(message_type importance, const char *msg, ...)
SET(WHITESPACE_DISPLAY);
#endif
/* If doing quick blanking, blank the statusbar after just one keystroke.
/* If doing quick blanking, blank the status bar after just one keystroke.
* Otherwise, blank it after twenty-six keystrokes, as Pico does. */
if (ISSET(QUICK_BLANK))
statusblank = 1;
@ -2245,13 +2245,13 @@ void statusline(message_type importance, const char *msg, ...)
statusblank = 26;
}
/* Display a normal message on the statusbar, quietly. */
/* Display a normal message on the status bar, quietly. */
void statusbar(const char *msg)
{
statusline(HUSH, msg);
}
/* Warn the user on the statusbar and pause for a moment, so that the
/* Warn the user on the status bar and pause for a moment, so that the
* message can be noticed and read. */
void warn_and_shortly_pause(const char *msg)
{
@ -3338,7 +3338,7 @@ void total_refresh(void)
bottombars(currmenu);
}
/* Show info about the current cursor position on the statusbar.
/* Show info about the current cursor position on the status bar.
* Do this unconditionally when force is TRUE; otherwise, only if
* suppress_cursorpos is FALSE. In any case, reset the latter. */
void do_cursorpos(bool force)
@ -3366,7 +3366,7 @@ void do_cursorpos(bool force)
if (openfile->current != openfile->filebot)
sum--;
/* Display the current cursor position on the statusbar. */
/* Display the current cursor position on the status bar. */
linepct = 100 * openfile->current->lineno / openfile->filebot->lineno;
colpct = 100 * cur_xpt / cur_lenpt;
charpct = (openfile->totsize == 0) ? 0 : 100 * sum / openfile->totsize;