[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    GtkFileChooser GtkFileFilter and select signals
From:       v4r4n <console.cowboy () gmail ! com>
Date:       2009-07-28 18:49:53
Message-ID: 428c6cc90907281149t1e898b35iaa868c27c502e8ae () mail ! gmail ! com
[Download RAW message or body]

I'm having trouble determining if I've come across a bug in GTK or a bug in
my code.  I tried looking through old bug reports, but I'm not sure how this
specific bug applies to potential broader bugs.

After the user makes an initial file selection with a GtkFileChooserDialog
and a GtkFileFilter, when they open the dialog again (which remembers that
last file selected), the combo widget that lists the
available GtkFileFilters is somehow unset to a blank (null, nothing) which
isn't even a normal option to the user.  The old filters are still there,
but the user has to select them again.

With some experimentation, I noticed that if I add a
gtk_file_chooser_unselect_all() before the dialog runs, the
GtkFileFilter isn't killed, but then the last file selected by the user is
no longer highlighted.

While watching my "selection-changed" signal I noticed on the last signal
gtk_file_chooser_get_filter() returns a NULL.  I've tried using
g_signal_lookup(), g_signal_query(), and g_signal_get_invocation_hint(), but
can't seem to figure out how to get GLIB/GTK to tell me where/what is
breaking my GtkFileChooser widget and setting its GtkFileFilter to NULL.

The application is currently using GTK 2.16.*.  GTK 2.8.* doesn't have the
problem described above.

I'm attempting all this debugging on an Ubuntu 9.04 system.  Are there
complete source packages for all of GLIB/GTK?  I couldn't find them so I'm
having trouble stepping around through the entire function call stack.

In the meantime I recently added a lame hack.  It basically listens to the
"selection-changed" signal, keeps track of the current GtkFileFilter, and
when it detects a NULL GtkFileFilter, simply
uses gtk_file_chooser_set_filter() to restore what the GtkFileFilter should
be.

If this is the wrong mailing list to post such a question, please redirect
me.

~Thanks
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic