GNOME Bugzilla – Bug 52877
GtkFileSelection needs a refresh method.
Last modified: 2011-02-04 16:12:26 UTC
A GtkFileSelection can not be refreshed. It is unacceptable to have to create a new instance of the widget, particularly with language bindings. This should be real easy to do.
Probably in 2.0 only if we get a patch for it
Created attachment 533 [details] [review] Adds gtk_file_selection_refresh()
OK, here's a patch. It's very simple, and it can be done without the extra function, but the public use of the get-and-set side-effect would not be a clear API.
Consider for API freeze, despite the fact that all other GtkFileSel bugs have been punted until 2.2.
What is the reason you need this function? Is it just to be able to refresh the fileselector when it is shown? If so, it probably makes more sense to just automatically refresh it on show. Do you have any other usecase for this function?
Yes, I discovered the problem when trying to show a GtkFileSelection again. Refreshing it on show might be enough, but that would be a more complex patch.
We should _at least_ refresh on show. Better to avoid problems then make people compresent for them.
Moving off the API milestone, since I think refresh-on-show is better than further cluttering up the API in advance of knowing what we'll be doing as part of a more major filesel rework for 2.2.
Also note that the proposed patch uses only public API, so clearly there are easier ways to work around the problem (set the current directory again) than to create a new filesel from scratch.
Wed Jan 16 19:33:41 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_map): Refresh the dialog on map. (#52877, inspired by request from Murray Cumming) We might want the API as part of the filesel rewrite for 2.2, so moving the bug to that milestone.
How does this bug have anything to do with gtkmm other than that you filed it? :-) It's a trivial (and not at all critical since the filesel refreshes on map now) API enhancement request. Presumably gtkmm would support this API if and only if GTK+ offered it.
As I remember it, it was slightly more significant for gtkmm because C++ tends to reuse instances rather than reallocate them. However, yes, this is trivial, and I'm not even sure that it's still a bug - I[ll review it again at some point. I'm just gathering some bugs together.
Munge this together with the 'replace GtkFileSelection' issue.
Is this still an issue, or can we close the bug? It doesn't make much sense to have this in the 2.4 API milestone if GtkFileChooser now replaces GtkFileSelection.
It's old and I can't remember enough about the problem. I'm sure I'll complain if it's still a problem in future. Closing.