From 75691621a61c7001c0274ab631c64bba0c8e2d24 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Sat, 21 May 2005 10:02:09 +0000 Subject: [PATCH] * view.c: Made the F2 key action much simpler---now it just toggles between hexview and hexedit mode. Switching between text and hex mode can be done with , as before. --- src/ChangeLog | 6 ++++++ src/view.c | 9 ++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6c67c7e00..b06988412 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-05-21 Roland Illig + + * view.c: Made the F2 key action much simpler---now it just + toggles between hexview and hexedit mode. Switching between text + and hex mode can be done with , as before. + 2005-05-20 Pavel Roskin * find.c: Fix warnings reported by gcc 4.0.0. diff --git a/src/view.c b/src/view.c index 0b5c71db0..98bb77a5e 100644 --- a/src/view.c +++ b/src/view.c @@ -1952,11 +1952,7 @@ static void toggle_hexedit_mode (WView *view) { get_bottom_first (view, 1, 1); - if (view->hexedit_mode) { - view->hexview_in_text = !view->hexview_in_text; - } else { - view->hexedit_mode = !view->hexedit_mode; - } + view->hexedit_mode = !view->hexedit_mode; view_labels (view); view->dirty++; view_update (view); @@ -2235,8 +2231,7 @@ view_labels (WView *view) if (view->hex_mode) if (view->hexedit_mode) - my_define (h, 2, view->hexview_in_text ? _("EdHex") : _("EdText"), - toggle_hexedit_mode, view); + 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? */