mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
* view.c (view_labels): Simplified the code that decides whether
the user can switch to hexedit mode.
This commit is contained in:
parent
0659621de4
commit
9eadb2ada4
@ -7,6 +7,8 @@
|
||||
only apply to text mode. Renamed dpy_text_start_col to
|
||||
dpy_text_column. Renamed edit_cursor to hex_cursor, as it is
|
||||
used in hexview mode, too.
|
||||
* view.c (view_labels): Simplified the code that decides whether
|
||||
the user can switch to hexedit mode.
|
||||
|
||||
2005-05-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
|
16
src/view.c
16
src/view.c
@ -2230,16 +2230,14 @@ view_labels (WView *view)
|
||||
my_define (h, 6, view->hex_mode ? _("Save") : _("RxSrch"),
|
||||
regexp_search_cmd, view);
|
||||
|
||||
if (view->hex_mode)
|
||||
if (view->hexedit_mode)
|
||||
if (view->hex_mode) {
|
||||
if (view->hexedit_mode) {
|
||||
my_define (h, 2, _("View"), toggle_hexedit_mode, view);
|
||||
else {
|
||||
/* FIXME: add new function view_datasource_is_editable() */
|
||||
/* FIXME: why is editing in panel mode disabled? */
|
||||
if (view->growbuf_in_use || view_is_in_panel (view))
|
||||
my_define (h, 2, "", NULL, view);
|
||||
else
|
||||
my_define (h, 2, _("Edit"), toggle_hexedit_mode, view);
|
||||
} else if (view->datasource == DS_FILE) {
|
||||
my_define (h, 2, _("Edit"), toggle_hexedit_mode, view);
|
||||
} else {
|
||||
my_define (h, 2, "", NULL, view);
|
||||
}
|
||||
} else
|
||||
my_define (h, 2, view->text_wrap_mode ? _("UnWrap") : _("Wrap"),
|
||||
toggle_wrap_mode, view);
|
||||
|
Loading…
Reference in New Issue
Block a user