mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-12 10:53:23 +03:00
(edit_find_editor): rename from find_editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
c157b048e5
commit
a286f042d4
@ -137,7 +137,7 @@ extern char *edit_window_close_char;
|
|||||||
/*** declarations of public functions ************************************************************/
|
/*** declarations of public functions ************************************************************/
|
||||||
|
|
||||||
gboolean edit_add_window (WDialog * h, const WRect * r, const vfs_path_t * f, long fline);
|
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_widget_is_editor (const Widget * w);
|
||||||
gboolean edit_drop_hotkey_menu (WDialog * h, int key);
|
gboolean edit_drop_hotkey_menu (WDialog * h, int key);
|
||||||
void edit_menu_cmd (WDialog * h);
|
void edit_menu_cmd (WDialog * h);
|
||||||
|
@ -1244,7 +1244,7 @@ edit_close_cmd (WEdit * edit)
|
|||||||
edit = EDIT (g->current->data);
|
edit = EDIT (g->current->data);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
edit = find_editor (DIALOG (g));
|
edit = edit_find_editor (DIALOG (g));
|
||||||
if (edit != NULL)
|
if (edit != NULL)
|
||||||
widget_select (WIDGET (edit));
|
widget_select (WIDGET (edit));
|
||||||
}
|
}
|
||||||
|
@ -373,11 +373,14 @@ edit_get_shortcut (long command)
|
|||||||
static char *
|
static char *
|
||||||
edit_get_title (const WDialog * h, size_t len)
|
edit_get_title (const WDialog * h, size_t len)
|
||||||
{
|
{
|
||||||
const WEdit *edit = find_editor (h);
|
const WEdit *edit;
|
||||||
const char *modified = edit->modified ? "(*) " : " ";
|
const char *modified;
|
||||||
const char *file_label;
|
const char *file_label;
|
||||||
char *filename;
|
char *filename;
|
||||||
|
|
||||||
|
edit = edit_find_editor (h);
|
||||||
|
modified = edit->modified ? "(*) " : " ";
|
||||||
|
|
||||||
len -= 4;
|
len -= 4;
|
||||||
|
|
||||||
if (edit->filename_vpath == NULL)
|
if (edit->filename_vpath == NULL)
|
||||||
@ -419,7 +422,7 @@ edit_dialog_command_execute (WDialog * h, long command)
|
|||||||
case CK_Close:
|
case CK_Close:
|
||||||
/* if there are no opened files anymore, close MC editor */
|
/* if there are no opened files anymore, close MC editor */
|
||||||
if (edit_widget_is_editor (CONST_WIDGET (g->current->data)) &&
|
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);
|
dlg_stop (h);
|
||||||
break;
|
break;
|
||||||
case CK_Help:
|
case CK_Help:
|
||||||
@ -1295,7 +1298,7 @@ edit_get_file_name (const WEdit * edit)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
WEdit *
|
WEdit *
|
||||||
find_editor (const WDialog * h)
|
edit_find_editor (const WDialog * h)
|
||||||
{
|
{
|
||||||
const WGroup *g = CONST_GROUP (h);
|
const WGroup *g = CONST_GROUP (h);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user