bgo#586315 - gtk_file_chooser_list_shortcut_folders() was crashing

The virtual method list_shortcut_folders returns a GSList * of GFile *.
In turn, gtk_file_chooser_list_shortcut_folders() converts those to strings.

However, the delegate in gtkfilechooserutils.c was calling
gtk_file_chooser_list_shortcut_folders() every time, so we were trying
to convert invalid data.

Now we have an internal function that deals with GFile *.  That
function is called by the delegate, and the conversion is done only
once by the API entry points.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
This commit is contained in:
Federico Mena Quintero
2009-06-18 21:29:54 -05:00
parent 6382eac6d8
commit 3d527afadb
3 changed files with 11 additions and 3 deletions

View File

@ -286,7 +286,7 @@ delegate_remove_shortcut_folder (GtkFileChooser *chooser,
static GSList *
delegate_list_shortcut_folders (GtkFileChooser *chooser)
{
return gtk_file_chooser_list_shortcut_folders (get_delegate (chooser));
return _gtk_file_chooser_list_shortcut_folder_files (get_delegate (chooser));
}
static gboolean