Ethereal-dev: Re: [Ethereal-dev] gui_prefs.c remember directory patch

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: Mon, 10 Nov 2003 21:16:42 -0800
On Mon, Nov 10, 2003 at 06:02:35PM -0500, Ian Schorr wrote:
> The gtk_table_set_row_spacings() change needed to be made since a new 
> row was added, but there's probably a better way to order the row 
> numbers in the two create_preference_radio_buttons() lines that would 
> help prevent this from happening again...

There is.

There wasn't any need to add a new row.  The code was using hardwired
row numbers for the "File open dialog behavior:" and "Directory:" items;
the numbers were correct for GTK+ 2.x, but not for GTK+ 1.2[x] - the
dialogs are different for the different versions of GTK+, as there are
two preferences available only with 1.2[.x] and one available only with
2.x.

I checked in a change *NOT* to use hardwired row numbers, but to use
"pos++", as was done for other items.  That meant I reversed the order
in which I added the items; I didn't connect the signals for the items
until the appropriate data was attached to them, meaning signal connects
are done after the second item is created.

That appears to fix the problem.