Package: lfhex Version: 0.42-3 Severity: normal Tags: patch, upstream According to <http://stoopidsimple.com/lfhex/screenshots> and the source code, lfhex 0.42 is supposed to have a "Cursor Position" field where the user can type a number to quickly skip to that position. However, when I run lfhex, that field does not appear. The status bar initially shows "Ready" and then goes blank.
I debugged this and the problem seems to be with QStatusBar, which gets confused about which items it should display because the status bar itself is still hidden when HexGui::HexGui adds the items to it and displays the temporary "Ready" message. I am not sure whether QStatusBar is intended to support that kind of use. Anyway, the following lfhex patch works around the problem by removing the message; which may be a good idea in any case, so that the user can set the Cursor Position immediately after the window opens, without first having to wait for the message to go away.
diff -ru lfhex-0.42-3/src/hexGui.cpp lfhex-0.42/src/hexGui.cpp --- lfhex-0.42-3/src/hexGui.cpp 2008-09-19 03:36:49.000000000 +0300 +++ lfhex-0.42-3-statusbar/src/hexGui.cpp 2011-06-01 00:08:01.000000000 +0300 @@ -121,7 +121,6 @@ menuBar()->addMenu(viewMenu); resize(400,196); - statusBar()->showMessage("Ready",2000); statusBar()->addWidget(new QLabel("Cursor Offset:",statusBar())); offsetLineEdit = new QLineEdit(statusBar()); // offsetLineEdit->setValidator( new HexValidator(offsetLineEdit) );
If one wanted to keep the message, one could instead override QWidget::showEvent(QShowEvent *) and show the message from there. Because the window and the status bar have been shown by that time, QStatusBar would then correctly track which items it needs to display. Such a change would however require additional logic, to avoid showing the message again if the window is iconified and restored. I will try to notify the upstream author of lfhex about this bug. -- System Information: Debian Release: 6.0.1 APT prefers oldstable APT policy: (500, 'oldstable'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lfhex depends on: ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libgcc1 1:4.4.5-8 GCC support library ii libqtcore4 4:4.6.3-4 Qt 4 core module ii libqtgui4 4:4.6.3-4 Qt 4 GUI module ii libstdc++6 4.4.5-8 The GNU Standard C++ Library v3 lfhex recommends no packages. lfhex suggests no packages. -- no debconf information
pgp5zhpkvnd6j.pgp
Description: PGP signature