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

Ethereal-dev: [ethereal-dev] GtkCTree "Select" mode

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Thu, 30 Dec 1999 11:29:20 -0600
Just to let everyone know; I'm trying to work on a fix for the selection
bar in the GtkCList and GtkCTree. When in "select" mode, you can actuall select
more than one packet/tree item by shift-clicking or ctrl-clicking.

I am using GTK_SELECTION_EXTENDED for the "select" mode. GTK_SELECTION_BROWSE
is actual what I want (yeah, the name is opposite of what it sounds like), but there
seems to be a bug in the GtkCTree widget when using that selection mode *and*
hiding the column titles (GtkCTrees, like their GtkCList parents, can have column
titles. We only have one column, so there's no reason to display the column title).

It appears that when the column titles are hidden, some pixel-width setting is being
incremented when it shouldn't. Eventually this width counter exceeds 32768, the limit
of a GdkWindow, and so we get:

Gtk-WARNING **: Unable to locate loadable module in module_path: "libthinice.so",

Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 32867 and height 1

Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 33592 and height 1

Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 34317 and height 1

Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 35060 and height 1

Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 35803 and height 1

Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 36528 and height 1


...until the counter wraps past 65535 to 0.

So, I'm trying to either:

1. Work around the bug.
2. Find the bug (or search for its solution on the GTK+ list)
3. Come up with a reason to have more than one column so that the column names
in the GtkCTree can be displayed. Yes, that's a hoaky solution.
4. Come up with a reason to be able to select more than one item. I can see its utility
in the packet list, but not in the protocol tree.

--gilbert