GtkOptionMenu and signals



Hello all, I'm hoping the collective brilliance out there can help me with a 
small problem.

I'm porting an application, and I need my file selection dialog to include a
drop down for filtering file types.  For example, it will contain items such
as "Rich Text Format (*.rtf)".

I've decided to use the GtkFileSelection widget and add to it a dropdown, similar
in appearence to what AbiWord does with the same dialog.

Trouble is, I want to re-filter the files (but not the directories) each time
the directory is changed, and here is where I run into trouble.

I want to either:

(1) Put a callback on the file selection dialog's dir_list GtkCList widget so I know
when it's refilled in the GtkFileSelection widget code, or

(2) Put a callback on the dir_list to know when a directory is selected AND
put a callback on the history_pulldown GtkOptionMenu to know when an item is
selected from that.

It seems to me that (1) is not possible.  Can anyone verify/refute this?

It seems that (2) is possible, but I'm wondering if there's a way to do the latter
part *without* connecting a callback to every GtkMenuItem in the option menu. 
(The reason I don't want to do this is because I would have to iterate through all 
the items in the menu attached to the option menu every time the user changes 
directories.)  Does anyone know of a way to capture something analogous to "clicked" 
or "pressed" events on a GtkOptionMenu? (those particular ones don't appear to work)

Thank you all,
ALf





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