ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] Packet list columns are not resizeable with GTK+2.x

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Greg Morris" <gmorris@xxxxxxxxxx>
Date: Thu, 18 Sep 2003 14:09:43 -0600
Yes, The problem was related to clicking on the column header itself. Actually clicking between two columns when the pointer changes to <-> then when you clicked the mouse to resize the column it was being processed by this function and the resize would not occur. If you click within the column data then the packet is selected as you would expect. I would assume that the else if is not necessary but I was hoping that someone more familiar with this part of the code would know.
 
Greg

>>> Guy Harris <guy@xxxxxxxxxxxx> 9/18/2003 1:56:01 PM >>>

On Sep 18, 2003, at 7:06 AM, Greg Morris wrote:

> Attached is a patch to main.c that fixes the problem with the Columns
> not being resizable on Windows when Ethereal is compiled with GTK2.x.

The patched code compares "event_button->type" against 4; 4 is
GDK_EVENT_BUTTON, but that comparison is done inside an "if" that
checks for "event->type == GDK_EVENT_BUTTON", so the patch is
equivalent to a patch that changes

    else if (event_button->button == 1)

to

    else if (event_button->button == 1 && 0)

i.e. to

    else if (0)

i.e. to an "if" that's *always* false, unless I'm missing something.

With that patch, is it possible to select a packet in the packet list
by clicking on it?

If so, why is that "else if", and the code inside it even in the code? 
It's not in the GTK+ 1.2[.x] version; the 1.2[.x]
"packet_list_button_pressed_cb()" just checks for clicking button 2 to
mark the packet, not for button 1 to select it.

Was it compensating for a bug or a misfeature in the GtkClist code in
older versions of GTK+ 2.x?  (I'm primarily asking Olivier that
question - it was in there since the GTK+ 1.2[.x] and 2.x code was
merged in, and it might have been there since the 2.x code was first
put in.)

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev