summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-11-05 10:11:45 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-11-05 10:11:45 +0000
commitd0ad8bcdcffd04d5c1a080b73ac6077b53009ebb (patch)
tree703ac8b74cb97235aa1f2349c9d4e77349fba312 /gtk
parentd10ca623048131c71db67e64711616617ed8fd4f (diff)
downloadwireshark-d0ad8bcdcffd04d5c1a080b73ac6077b53009ebb.tar.gz
Select the previous byte in the packet bytes hex view when clicking in
the column just behind the first half and the last half. This behavior is more user friendly. svn path=/trunk/; revision=30831
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main_proto_draw.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gtk/main_proto_draw.c b/gtk/main_proto_draw.c
index 95ebc0b75a..bb8b5e3ea0 100644
--- a/gtk/main_proto_draw.c
+++ b/gtk/main_proto_draw.c
@@ -340,20 +340,15 @@ byte_view_select(GtkWidget *widget, GdkEventButton *event)
* There are BYTES_PER_LINE/2 bytes displayed in the first
* half; there are 2 characters per byte, plus a separating
* blank after all but the last byte's characters.
- *
- * Then subtract 1 to get the last column of the first half
- * rather than the first column after the first half.
*/
digits_end_1 = digits_start_1 + (BYTES_PER_LINE/2)*2 +
- (BYTES_PER_LINE/2 - 1) - 1;
+ (BYTES_PER_LINE/2 - 1);
/*
* The column of the first hex digit in the second half.
- * Add back the 1 to get the first column after the first
- * half, and then add 2 for the 2 separating blanks between
- * the halves.
+ * Add 2 for the 2 separating blanks between the halves.
*/
- digits_start_2 = digits_end_1 + 3;
+ digits_start_2 = digits_end_1 + 2;
/*
* The column of the last hex digit in the second half.
@@ -361,15 +356,13 @@ byte_view_select(GtkWidget *widget, GdkEventButton *event)
* "digits_start_1".
*/
digits_end_2 = digits_start_2 + (BYTES_PER_LINE/2)*2 +
- (BYTES_PER_LINE/2 - 1) - 1;
+ (BYTES_PER_LINE/2 - 1);
/*
* The column of the first "text dump" character in the first half.
- * Add back the 1 to get the first column after the second
- * half's hex dump, and then add 3 for the 3 separating blanks
- * between the hex and text dummp.
+ * Add 3 for the 3 separating blanks between the hex and text dump.
*/
- text_start_1 = digits_end_2 + 4;
+ text_start_1 = digits_end_2 + 3;
/*
* The column of the last "text dump" character in the first half.