After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 102792 - gtk_file_selection_complete () doesn't work on unmapped filesel
gtk_file_selection_complete () doesn't work on unmapped filesel
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other other
: Low normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-01-07 23:04 UTC by node
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description node 2003-01-07 23:13:55 UTC
Package: gtk+
Severity: normal
Version: 2.2.0
Synopsis: gtk_file_selection_complete () doesn't work as documented
Bugzilla-Product: gtk+
Bugzilla-Component: GtkFileSel

Description:
Description of Problem:

From the docs: "If a partial match can be made, the "Files" list will
contain those file names which have been partially matched, and the
"Folders" list those directories which have been partially matched."

This is not the case; the files list contains *all* of the files in the
directory and only the text entry widget contains the partial match.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-01-07 18:13 -------

The original reporter (node@users.sourceforge.net) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.
Reassigning to the default owner of the component, gtk-bugs@gtk.org.

Comment 1 Owen Taylor 2003-01-22 22:03:02 UTC
Will work after you show the filesel on the screen. What broke
the unshown case was the change:

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)

This essentially does a gtk_file_selection_complete (filesel, "")
when the filesel is shown.

I don't have much of an idea how to fix this; perhaps simple
special case the case where gtk_file_selection_complete() is
called by the programmer while the filesel is unmapped.
Comment 2 Owen Taylor 2003-01-30 20:51:08 UTC
This one is going to be a fairly substantial (if very
straightforward) change.

* Add a GtkFileselectionPrivate structure done the same
  way as GtkMenuPrivate/gtk_menu_get_private.

* In this structure, put a single:
   guint entry_text_is_completion;

* Add a set_entry_text() utility method that does

    gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), str);

  and sets entry_text_is_completion to FALSE.

* Make gtk_file_selection_complete() set entry_text_is_completion
  to TRUE.

* in gtk_fileselection_map, replace:

  gtk_file_selection_populate (filesel, "", FALSE, FALSE);

  with:

  const char *text_to_complete = "";
  if (private->entry_is_completion)
    text_to_complete = gtk_entry_get_text (filesel->selection_entry);

  gtk_file_seleciton_popuplate (filesel, text_to_complete, FALSE, FALSE);


Comment 3 Federico Mena Quintero 2004-02-10 20:09:02 UTC
Setting the priority to "Low" for all bugs related to GtkFileSelection.  This
has been deprecated in favor of GtkFileChooser.
Comment 4 Owen Taylor 2004-02-23 23:43:45 UTC
Too much work to be worth fixing at this point now we have 
GtkFileChooser as a replacement.