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: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 18 Sep 2003 12:56:01 -0700

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.)