libgnomeui patches for icon selection widgets




Hi, here's some diffs I made to fix some problems with icon selection
dialogs.

gnome-icon-entry.diff:  
When in an icon selection dialog (say, after going to the properties of a
drawer and trying to change the drawer icon by clicking its icon in
properties), panel will crash if you try to pick a new directory while a
directory that contains a lot of icons is loading.  This only happens the 
first time the dialog comes up.  The reason it happens is because there's 
a call to gtk_object_set_user_data() *after* the icons are done loading, 
but while the icons are loading, gtk events can occur that call event 
handlers that assume that gtk_object_set_user_data() has already been called.  
The event handlers don't check the return value of gtk_object_get_user_data() 
at all (which you might consider somewhat dangerous to begin with) and it 
tries to deference a null pointer and psplat.  This simple patch moves the
gtk_object_set_user_data() call to before the icon loading function that
can trigger gtk events.

gnome-icon-sel.diff: 
If you try to load a directory while another is loading in an 
icon-selection widget, multiple progressbars and labels appear.  This 
happens because the progressbar and label are created locally, so each 
time the load icons function is called, new ones are created.  You can 
fix by calling gtk_object_set_user_data on the progressbar and label 
to retain each between calls.  I thought about adding both to the 
definitions of GnomeIconSelection in the header file, which was easier 
and seemed more natural, but I read something about changing structure 
definitions breaks binary compatability.  But, I also read about how 
set_user_data/get_user_data were bad.  Which is worse?

gnome-icon-list.diff:
Ah, try to load another directory while a GnomeIconSelection is loading
another as before (there's nothing I love more than multitasking madness 
like loading icon directories...wuhhoo!).  Try hitting enter multiple 
times in the entry widget so the directory stops loading and reloading 
several times.  When it's finished loading, there's no icons.   I think
gnome_canvas_display needs to get called on a gnome_icon_list.  But
gnome_icon_list_thaw() never calls it when you freeze() it multiple times
before thaw()ing,  even if you call thaw() the same number of times.  
This patch fixes that.

bye

david meybohm

gnome-icon-selection patch

gnome-icon-entry patch

gnome-icon-list patch



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]