1
1

* view.c (view_labels): Simplified the code that decides whether

the user can switch to hexedit mode.
Этот коммит содержится в:
Roland Illig 2005-05-21 10:34:16 +00:00
родитель 0659621de4
Коммит 9eadb2ada4
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -7,6 +7,8 @@
only apply to text mode. Renamed dpy_text_start_col to only apply to text mode. Renamed dpy_text_start_col to
dpy_text_column. Renamed edit_cursor to hex_cursor, as it is dpy_text_column. Renamed edit_cursor to hex_cursor, as it is
used in hexview mode, too. 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> 2005-05-20 Pavel Roskin <proski@gnu.org>

Просмотреть файл

@ -2230,16 +2230,14 @@ view_labels (WView *view)
my_define (h, 6, view->hex_mode ? _("Save") : _("RxSrch"), my_define (h, 6, view->hex_mode ? _("Save") : _("RxSrch"),
regexp_search_cmd, view); regexp_search_cmd, view);
if (view->hex_mode) if (view->hex_mode) {
if (view->hexedit_mode) if (view->hexedit_mode) {
my_define (h, 2, _("View"), toggle_hexedit_mode, view); my_define (h, 2, _("View"), toggle_hexedit_mode, view);
else { } else if (view->datasource == DS_FILE) {
/* FIXME: add new function view_datasource_is_editable() */ my_define (h, 2, _("Edit"), toggle_hexedit_mode, view);
/* FIXME: why is editing in panel mode disabled? */ } else {
if (view->growbuf_in_use || view_is_in_panel (view)) my_define (h, 2, "", NULL, view);
my_define (h, 2, "", NULL, view); }
else
my_define (h, 2, _("Edit"), toggle_hexedit_mode, view);
} else } else
my_define (h, 2, view->text_wrap_mode ? _("UnWrap") : _("Wrap"), my_define (h, 2, view->text_wrap_mode ? _("UnWrap") : _("Wrap"),
toggle_wrap_mode, view); toggle_wrap_mode, view);