(edit_find_editor): rename from find_editor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-03-18 10:03:02 +03:00
parent c157b048e5
commit a286f042d4
3 changed files with 9 additions and 6 deletions

View File

@ -137,7 +137,7 @@ extern char *edit_window_close_char;
/*** declarations of public functions ************************************************************/
gboolean edit_add_window (WDialog * h, const WRect * r, const vfs_path_t * f, long fline);
WEdit *find_editor (const WDialog * h);
WEdit *edit_find_editor (const WDialog * h);
gboolean edit_widget_is_editor (const Widget * w);
gboolean edit_drop_hotkey_menu (WDialog * h, int key);
void edit_menu_cmd (WDialog * h);

View File

@ -1244,7 +1244,7 @@ edit_close_cmd (WEdit * edit)
edit = EDIT (g->current->data);
else
{
edit = find_editor (DIALOG (g));
edit = edit_find_editor (DIALOG (g));
if (edit != NULL)
widget_select (WIDGET (edit));
}

View File

@ -373,11 +373,14 @@ edit_get_shortcut (long command)
static char *
edit_get_title (const WDialog * h, size_t len)
{
const WEdit *edit = find_editor (h);
const char *modified = edit->modified ? "(*) " : " ";
const WEdit *edit;
const char *modified;
const char *file_label;
char *filename;
edit = edit_find_editor (h);
modified = edit->modified ? "(*) " : " ";
len -= 4;
if (edit->filename_vpath == NULL)
@ -419,7 +422,7 @@ edit_dialog_command_execute (WDialog * h, long command)
case CK_Close:
/* if there are no opened files anymore, close MC editor */
if (edit_widget_is_editor (CONST_WIDGET (g->current->data)) &&
edit_close_cmd (EDIT (g->current->data)) && find_editor (h) == NULL)
edit_close_cmd (EDIT (g->current->data)) && edit_find_editor (h) == NULL)
dlg_stop (h);
break;
case CK_Help:
@ -1295,7 +1298,7 @@ edit_get_file_name (const WEdit * edit)
/* --------------------------------------------------------------------------------------------- */
WEdit *
find_editor (const WDialog * h)
edit_find_editor (const WDialog * h)
{
const WGroup *g = CONST_GROUP (h);