Ethereal-dev: Re: [Ethereal-dev] scrollbar range

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, 24 Jul 2003 11:17:46 -0700
On Thu, Jul 24, 2003 at 05:00:24PM +0800, li wrote:
> Does the scrollbar have the range from 0 to 2^32,
> which mean the Packet ID limited in 4G?

In most GUI toolkits, the scrollbar knows nothing of what it's
scrolling; in particular, in GTK+, the scrollbar works in floating-point
numbers.  (The scrollbar scrolls in units of pixels, not rows or lines
or....)

The widget being scrolled, in GTK+, stores the row number in a "gint",
which is a 32-bit signed data type on most if not all platforms, so the
number of rows is limited to 2^31 (not 2^32), or perhaps 2^31-1 if there
is no "row 0" (I don't remember whether the first row is row 0 or row
1).

Ethereal also has a packet number field that is a "guint32", which would
limit the packet number to 2^32-1.