summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystemunix.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 520874 - Should use gio directly.Carlos Garnacho2008-06-101-2730/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-10 Carlos Garnacho <carlos@imendio.com> Bug 520874 - Should use gio directly. * gtk/gtkfilesystem.[ch]: Turn into a private object, which mostly provides helper functions for asynchronous calls, folder abstraction and uniform handling of volumes/drives/mounts. * gtk/gtkfilesystemwin32.[ch]: * gtk/gtkfilesystemunix.[ch]: Removed, these are no longer required. * gtk/gtkfilechooser.c: * gtk/gtkfilechooserbutton.c: * gtk/gtkfilechooserdefault.c: * gtk/gtkfilechooserentry.[ch]: * gtk/gtkfilechooserprivate.h: * gtk/gtkfilechooserutils.c: * gtk/gtkfilesystemmodel.[ch]: * gtk/gtkpathbar.[ch]: Use GIO internally. Adapt to GtkFileSystem API. Do not load filesystem implementation modules. * gtk/Makefile.am: * gtk/gtk.symbols: the gtkfilesystem.h private header isn't installed anymore, nor the unix/win32 implementations. * README.in: Add blurb about these changes. svn path=/trunk/; revision=20342
* bgo492134 - fix tilde expansion in GtkFileSystemUnixFederico Mena Quintero2008-04-021-1/+2
| | | | | | Signed-off-by: Federico Mena Quintero <federico@gnu.org> svn path=/trunk/; revision=19962
* When refreshing an existing unix folder, turn off its is_finished_loading stateFederico Mena Quintero2008-03-011-0/+1
| | | | | | | | | | | | | | 2008-02-29 Federico Mena Quintero <federico@novell.com> * gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder): When refreshing an existing folder (i.e. when we are about to reload its file list), turn off the folder's is_finished_loading flag. Otherwise callers which do ::is_finished_loading() followed by ::list_children() will get nothing. Signed-off-by: Federico Mena Quintero <federico@gnu.org> svn path=/trunk/; revision=19677
* Use g_get_user_special_dir() to obtain the path for the DESKTOP directory.Matthias Clasen2007-06-071-6/+1
| | | | | | | | | | | | | 2007-06-06 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooserbutton.c (model_add_special): * gtk/gtkfilechooserdefault.c (shortcuts_append_desktop): * gtk/gtkfilesystemunix.c (get_icon_name_for_directory): * gtk/gtkpathbar.c (_gtk_path_bar_set_file_system): Use g_get_user_special_dir() to obtain the path for the DESKTOP directory. svn path=/trunk/; revision=18070
* Make a single tilde go to $HOME in the location entry. Patch from YevgenKjartan Maraas2007-01-111-5/+10
| | | | | | | | | | | 2007-01-11 Kjartan Maraas <kmaraas@gnome.org> * gtk/gtkfilesystemunix.c: (expand_tilde): Make a single tilde go to $HOME in the location entry. Patch from Yevgen Muntyan. Closes the gtk+ part of bug #334168. svn path=/trunk/; revision=17130
* Call setlocale().Matthias Clasen2007-01-021-1/+1
| | | | | | | | | | | | | | | | | 2007-01-02 Matthias Clasen <mclasen@redhat.com> * gtk/updateiconcache.c (main): Call setlocale(). * gtk/gtkfilesel.c: * gtk/gtkfilesystemunix.c: * gtk/gtkfilesystemwin32.c: * gtk/gtkfilechoosersettings.c: * gtk/updateiconcache.c: Consistently use folder instead of directory in translated messages. (#344584, Javier F. Serrador) svn path=/trunk/; revision=17024
* Return FALSE. (#389623, Carlos Garnacho Parro)Matthias Clasen2006-12-261-0/+2
| | | | | | | 2006-12-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (execute_callbacks): Return FALSE. (#389623, Carlos Garnacho Parro)
* Replace a lot of idle and timeout calls by the new gdk_threads api.Matthias Clasen2006-12-221-21/+4
| | | | | | | 2006-12-22 Matthias Clasen <mclasen@redhat.com> * *.c: Replace a lot of idle and timeout calls by the new gdk_threads api.
* Apply a cleanup patch by Kjartan Maraas (#341812)Matthias Clasen2006-10-081-4/+4
| | | | | | 2006-10-08 Matthias Clasen <mclasen@redhat.com> * Apply a cleanup patch by Kjartan Maraas (#341812)
* Apply a patch by Padraig O'Briain to avoid a deadlock.Matthias Clasen2006-09-291-5/+12
| | | | | | 2006-09-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c: Apply a patch by Padraig O'Briain to avoid a deadlock.
* First part of file chooser fixes.Kristian Rietveld2006-09-021-17/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-09-02 Kristian Rietveld <kris@imendio.com> First part of file chooser fixes. * gtk/gtkfilechooserbutton.c (model_add_special): also set the handle in the model for the desktopdir case. * gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder): free volume in case we retrieved it but don't pass it on to insert_path, (shortcuts_model_create): change the column type for the handles to pointer instead of GObject so our handle ref counting is not disturbed, (show_and_select_paths_finished_loading): don't forget to unref the dialog. * gtk/gtkfilesystemunix.c (gtk_file_system_unix_class_init), (gtk_file_system_unix_init), (gtk_file_system_unix_dispose): remove pending execute_callbacks_idle during dispose, also execute all callbacks waiting to be run in the next idle, (queue_*callback), (execute_callbacks_idle): refactor to maintain a list of callbacks to call per file system instead of globally, guard the file system during callback invocation, (gtk_file_system_unix_get_folder): only add load folder idle if none has been added yet.
* Maintain a hash table of live handles and check that we have noMatthias Clasen2006-08-231-1/+88
| | | | | | | | | 2006-08-23 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c: Maintain a hash table of live handles and check that we have no outstanding handles at finalization time. (Copying what Federico did for gtkfilesystemgnomevfs.c)
* Improve consistency of signal and property namesMatthias Clasen2006-07-061-2/+2
|
* More of the sameMatthias Clasen2006-05-141-2/+2
|
* Make symbol list mstch reality.Matthias Clasen2006-05-041-6/+6
| | | | | | | | | | | | | | | | 2006-05-04 Matthias Clasen <mclasen@redhat.com> * gtk/gtk.symbols: * gtk/gtkfilesystem.c: * gtk/gtkfilesystemunix.c: * gtk/gtkprintbackend.h: * gtk/gtkrecentchooserdefault.c: * gtk/gtkrecentchooserdefault.h: * gtk/paper_names_offsets.c: Make symbol list mstch reality. * gtk/Makefile.am: Fix a typo. * gdk/x11/Makefile.am (EXTRA_DIST): Add gdksettings.c
* Boilerplate reductionMatthias Clasen2006-05-021-90/+11
|
* Merge of the GTK+ asynchronous file chooser branch. Please see theAFTER_KRIS_ASYNC_BRANCH_MERGEKristian Rietveld2006-05-011-262/+661
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-05-01 Kristian Rietveld <kris@imendio.com> Merge of the GTK+ asynchronous file chooser branch. Please see the kris-asynch-branch for more detailed ChangeLog entries. * configure.in: increase binary version to 2.9.0. * gtk.symbols: * gtkfilechooser.c: * gtkfilechooserbutton.c: * gtkfilechooserdefault.c: * gtkfilechooserdialog.c: * gtkfilechooserembed.c: * gtkfilechooserembed.h: * gtkfilechooserentry.c: * gtkfilechooserentry.h: * gtkfilechooserprivate.h: * gtkfilesystem.c: * gtkfilesystem.h: * gtkfilesystemmodel.c: * gtkfilesystemmodel.h: * gtkfilesystemunix.c: * gtkpathbar.c: * gtkpathbar.h: Merge from kris-async-branch.
* Use the slice allocator for many small allocations.Matthias Clasen2006-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 2006-01-04 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccelmap.c: * gtk/gtkactiongroup.c: * gtk/gtkdialog.c: * gtk/gtkfilesystemunix.c: * gtk/gtkgc.c: * gtk/gtkkeyhash.c: * gtk/gtkplug.c: * gtk/gtktextiter.c: * gtk/gtktextlayout.c: * gtk/gtkuimanager.c: * gtk/gtkwidget.c: * gtk/gtkwindow.c: * gtk/gtkxembed.c: Use the slice allocator for many small allocations. * gtk/gtkcolorsel.c: * gtk/gtktreeview.c: Use IPN. * gtk/gtkwidget.c: Remove an unused field from the AccelPath struct.
* Default to "drive-harddisk" and then fall back to gnome-dev-harddiskRodney Dawes2005-12-141-0/+21
| | | | | | | | | | | | 2005-12-14 Rodney Dawes <dobey@novell.com> * gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_render_icon): Default to "drive-harddisk" and then fall back to gnome-dev-harddisk (get_icon_for_mime_type): Look up the mime type icons according to the Icon Naming Specification and then fall back to the gnome-mime- prefix for the mime type icons Fixes #323655
* Fix a C99ism, spotted by Crispin Flowerday.Matthias Clasen2005-12-071-2/+3
| | | | | | | 2005-12-07 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (cb_fill_in_mime_type): Fix a C99ism, spotted by Crispin Flowerday.
* Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)Matthias Clasen2005-12-021-0/+3
| | | | | | | 2005-12-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
* Pass statbufs down to xdg_mime_get_mime_type_for_file() where possible, toMatthias Clasen2005-09-011-5/+8
| | | | | | | | 2005-09-01 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c: Pass statbufs down to xdg_mime_get_mime_type_for_file() where possible, to avoid useless re-stating.
* Intern some more strings.Matthias Clasen2005-09-011-4/+4
| | | | | | | | | 2005-09-01 Matthias Clasen <mclasen@redhat.com> * gdk/*.c: Intern some more strings. * gtk/gtkintl.h: * gtk/*.c: Define an I_() macro and use it instead of the bulky g_intern_static_string().
* Also intern static strings passed to g_object_set_data()Matthias Clasen2005-08-311-2/+2
|
* Intern type names in code generated by glib-mkenums, too.Matthias Clasen2005-08-311-2/+2
| | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * gdk/Makefile.am: * gtk/Makefile.am: Intern type names in code generated by glib-mkenums, too. * gtk/*.c: * gdk/x11/*.c: * gdk/*.c: Intern type names before registering the type to avoid unnecessary copies.
* 2.8.2GTK_2_8_2Matthias Clasen2005-08-241-1/+1
|
* Follow the Nautilus change and rename "Filesystem" to "File System",Matthias Clasen2005-07-121-1/+1
| | | | | | | | | 2005-07-12 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_get_display_name): Follow the Nautilus change and rename "Filesystem" to "File System", string change. (#310047, Vincent Noel)
* Fix an error in the cache timeout logic. (#166601, Morten Welinder)Matthias Clasen2005-06-231-5/+9
| | | | | | | | 2005-06-23 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder): Fix an error in the cache timeout logic. (#166601, Morten Welinder)
* Use g_file_set_contents(). (#308722, Morten Welinder)Matthias Clasen2005-06-231-65/+25
| | | | | | | 2005-06-23 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (bookmark_list_write): Use g_file_set_contents(). (#308722, Morten Welinder)
* Remove gratitious differences between the stable branch and HEAD, whichMatthias Clasen2005-06-221-48/+24
| | | | | | * gtk/gtkfilesystemunix.c: Remove gratitious differences between the stable branch and HEAD, which sneaked in with the bookmark renaming.
* Support .hidden files. (#129170, Sayamindu Dasgupta, patch by Jan ArneMatthias Clasen2005-06-121-8/+78
| | | | | | | 2005-06-12 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c: Support .hidden files. (#129170, Sayamindu Dasgupta, patch by Jan Arne Petersen)
* Treat backup files the same way as hidden files, to be closer to whatMatthias Clasen2005-06-111-1/+4
| | | | | | | | 2005-06-11 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (create_file_info): Treat backup files the same way as hidden files, to be closer to what Nautilus does. (#136196, Sean Middleditch)
* Merged from gtk-2-6:Federico Mena Quintero2005-05-061-4/+8
| | | | | | | | | | | 2005-05-06 Federico Mena Quintero <federico@ximian.com> Merged from gtk-2-6: * gtk/gtkfilesystemunix.c (fill_in_mime_type): Don't fill the mime types if this is an AFS directory. (fill_in_names): If we are in an AFS directory, set the MIME type blindly to "x-directory/normal".
* Merged from gtk-2-6:Federico Mena Quintero2005-05-031-7/+45
| | | | | | | | | | | | | | | | | | | | | 2005-05-02 Federico Mena Quintero <federico@ximian.com> Merged from gtk-2-6: Fixes #301068: * gtk/gtkfilesystemunix.c (struct _GtkFileSystemUnix): Add fields to store struct stat for /afs and /net, and boolean fields to say whether these are valid. (struct _GtkFileFolderUnix): Added a boolean is_network_dir field. (gtk_file_system_unix_get_folder): Fill in the is_network_dir field of the folder structure. (fill_in_names): If the folder is a network directory, create a fake struct stat for its entries. (fill_in_stats): Don't stat() the children of network directories. * gtk/gtkfilechooserdefault.c (list_mtime_data_func): If the mtime is 0, use "Unknown" for the cell's displayed text.
* Implement bookmark renaming (#136216, Sean Middleditch)Matthias Clasen2005-03-221-33/+172
| | | | | | | | | | | | | | | | | | | | | | | 2005-03-22 Matthias Clasen <mclasen@redhat.com> Implement bookmark renaming (#136216, Sean Middleditch) * gtk/gtkfilesystem.h (struct _GtkFileSystemIface): Add get_bookmark_label and set_bookmark_label vfuncs. * gtk/gtkfilesystem.h: * gtk/gtkfilesystem.c (gtk_file_system_set_bookmark_label): (gtk_file_system_get_bookmark_label): Wrappers for the vfuncs. * gtk/gtk.symbols: Add new exported symbols. * gtk/gtkfilesystemunix.c (gtk_file_system_unix_set_bookmark_label): (gtk_file_system_unix_get_bookmark_label): Implementations for the Unix backend. * gtk/gtkfilechooserdefault.c: Add a context menu to the bookmarks pane, and allow to rename bookmarks.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-1/+4
| | | | | | | | | | | | | | | | | | 2005-03-20 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdkalias.h: * gtk/grk.symbols: Group symbols by header and source file. * gtk/makegtkalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegtkalias.pl -def * gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate this file. * gtk/*.c: Include gtkalias.h after the other headers, include gtkaliasdef.c at the bottom. * gtk/*.h: Small cleanups.
* Fix #162617.Federico Mena Quintero2005-01-101-119/+229
| | | | | | | | | | | | | | | | | | | | | | | | 2005-01-10 Federico Mena Quintero <federico@ximian.com> Fix #162617. * gtk/gtkfilesystemunix.c (STAT_NEEDED_MASK): Take out GTK_FILE_INFO_IS_HIDDEN; we don't need to stat() to know this. (gtk_file_system_unix_get_folder): Make error reporting more accurate. Don't bail out if we can't read the directory. (fill_in_stats): Don't return an error; just assume we don't have stat info for this folder's files. (fill_in_names): Don't create the hash table for the names if we can't open the directory. (gtk_file_folder_unix_list_children): Don't emit the "finished-loading" signal --- we don't do asynchronous loads, so we are always finished loading. (gtk_file_folder_unix_get_info): Use helper functions; handle the case where we can't stat '/'. (get_icon_type_from_path): Don't call fill_in_stats() here; only use the info we have. (fill_in_mime_type): Don't return an error. Don't do anything if we don't have the stat info.
* Clean up some cases of errno handling (#162496, noted by Tor Lillqvist),Matthias Clasen2004-12-301-8/+8
| | | | | | | | | 2004-12-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c: Clean up some cases of errno handling (#162496, noted by Tor Lillqvist), and use g_filename_display_name() for error messages. Also mark some error messages for translation, fix capitalization of error messages.
* Clean up some cases of errno handling (#162496, noted by Tor Lillqvist),Matthias Clasen2004-12-301-33/+35
| | | | | | | | 2004-12-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c: Clean up some cases of errno handling (#162496, noted by Tor Lillqvist), and use g_filename_display_name() for error messages.
* Use g_filename_display_basename to calculate display name.Alexander Larsson2004-12-151-3/+1
| | | | | | | 2004-12-15 Alexander Larsson <alexl@redhat.com> * gtk/gtkfilesystemunix.c (gtk_file_folder_unix_get_info): Use g_filename_display_basename to calculate display name.
* Emit ::finished-loading.Matthias Clasen2004-09-271-0/+2
| | | | | | | 2004-09-27 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c (gtk_file_folder_unix_list_children): Emit ::finished-loading.
* Protect the unistd.h include by HAVE_UNISTD_H.Matthias Clasen2004-09-011-0/+2
| | | | | | | | 2004-09-01 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystemunix.c: * gtk/gtkfilechooserbutton.c: Protect the unistd.h include by HAVE_UNISTD_H.
* Make the use of S_ISFIFO and S_ISSOCK conditional. (#150146, GustavoMatthias Clasen2004-08-151-0/+4
| | | | | | | | Sun Aug 15 02:31:55 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkfilesystemunix.c (get_icon_type_from_stat): Make the use of S_ISFIFO and S_ISSOCK conditional. (#150146, Gustavo Carneiro)
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gtk/Makefile.am: Add rules to generate gtk.def and from gtk.symbols, and make make check check the abi with abicheck.sh. (gtk_private_h_sources): Add gtkinternals.h (gtk_built_private_headers): Add gtkalias.h (gtk_extra_sources): Add gtk.symbols (EXTRA_DIST): Add makegtkalias.pl and abicheck.sh * gtk/gtk.symbols: New file. Definition of the GTK+ ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gtk/abicheck.sh: New file. Script to check the actually symbols exported from libgtk-x11.2.0.so against the symbols found in gtk.symbols. * gtk/makegtkalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * gtk/gtkinternals.h: New file. An uninstalled header listing symbols which must be exported for some reason and do not appear in any other header. * gtk/*.c: Include gtkalias.h
* Fixes #137031:Federico Mena Quintero2004-07-091-88/+187
| | | | | | | | | | | | | | | | | | | 2004-07-09 Federico Mena Quintero <federico@ximian.com> Fixes #137031: * gtk/gtkfilesystemunix.c (get_fallback_icon): New helper function, fetches a stock icon as a fallback. (gtk_file_system_unix_volume_render_icon): Fall back to a stock icon. (gtk_file_system_unix_render_icon): Fall back to a stock icon. Use helper functions rather than being a mega-function. (get_icon_name_for_directory): Renamed from get_icon_for_directory(). (get_icon_type_from_path): New helper function; code pulled out from gtk_file_system_unix_render_icon(). (get_special_icon): Likewise. (get_icon_for_mime_type): Likewise.
* Fix #139290:Federico Mena Quintero2004-07-091-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-07-08 Federico Mena Quintero <federico@ximian.com> Fix #139290: * gtk/gtkfilesystemmodel.c (_gtk_file_system_model_new): Add a GError argument. Do check for errors when getting the GtkFileFolder: get the folder and read the children before actually creating the model. Removed obsolete code that handled roots-changed on the file system. (file_model_node_get_info): Assert that we don't reach the old case to display file system roots. (roots_changed_callback): Removed. * gtk/gtkfilechooserdefault.c (set_list_model): Add a GError argument, and a boolean return value. Return an error if we cannot create the file system model. On error, set a NULL model on the tree. (gtk_file_chooser_default_set_current_folder): Use the error value from set_list_model(). (gtk_file_chooser_default_set_property): Set the show_hidden property only if the browse_files_model exists. (gtk_file_chooser_default_unselect_path): Only operate if the browse_files_model exists. (check_preview_change): Check whether we have the sort_model. (change_folder_and_display_error): Copy the path we get passed before using it. There's a comment in there that explains why we need to copy it; basically, if the passed path belongs to the model, the model may go away in the middle of this function and we'll be left with a dangling pointer. (install_list_model_filter): Assert that the model is not NULL. (set_current_filter): Check whether the model exists. * gtk/gtktreeselection.c (gtk_tree_selection_get_selected): Don't g_return_if_fail if the model is NULL. (gtk_tree_selection_get_selected_rows): Likewise. (gtk_tree_selection_count_selected_rows): Likewise. (gtk_tree_selection_selected_foreach): Likewise. (gtk_tree_selection_path_is_selected): Likewise; rather just return FALSE. (gtk_tree_selection_select_all): Likewise. (gtk_tree_selection_unselect_all): Likewise. (gtk_tree_selection_select_range): Do g_return_if_fail() if the model is NULL. (gtk_tree_selection_unselect_range): Likewise. * gtk/gtkfilesystemunix.c (fill_in_names): Return immediately if g_dir_open() fails: there is no need to set the error ourselves, as g_dir_open() already does it.
* Fixes the GTK+ part of #142308:Federico Mena Quintero2004-06-221-4/+14
| | | | | | | | | | | 2004-06-22 Federico Mena Quintero <federico@ximian.com> Fixes the GTK+ part of #142308: * gtk/gtkfilesystemunix.c (gtk_file_system_unix_filename_to_path): Use filename_to_path(). (gtk_file_system_unix_uri_to_path): Likewise. (filename_to_path): Use remove_trailing_slash().
* Fix #132500.Federico Mena Quintero2004-04-071-4/+60
| | | | | | | | | | | | | | | | | | | | | | 2004-04-07 Federico Mena Quintero <federico@ximian.com> Fix #132500. * gtk/gtkfilesystem.c (gtk_file_system_parse): Ensure that the passed-in 'str' is not NULL. * gtk/gtkfilesystemunix.c (expand_tilde): New helper function; expands "~/" or "~foo/" at the beginning of a filename. (gtk_file_system_unix_parse): Use expand_tilde() before doing anything else. * gtk/gtkfilechooserentry.c (gtk_file_chooser_entry_maybe_update_directory): Take in a force_reload argument. (gtk_file_chooser_entry_changed): If gtk_file_system_parse() returns an error, set the file_part_pos to -1. (load_directory_callback): Only populate the model if the file_part_pos is not -1.
* Look for G_DIR_SEPARATOR in the display_name, and err out if it isFederico Mena Quintero2004-04-061-0/+12
| | | | | | | | 2004-04-05 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilesystemunix.c (gtk_file_system_unix_make_path): Look for G_DIR_SEPARATOR in the display_name, and err out if it is present; use the same error message as Nautilus. Fixes #136467.
* Fix #137520.Federico Mena Quintero2004-03-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-03-29 Federico Mena Quintero <federico@ximian.com> Fix #137520. * gtk/gtkfilesystem.h (struct _GtkFileFolderIface): Added slots for an ::is_finished_loading() method and a ::finished_loading() signal at the end of the struct. * gtk/gtkfilesystem.c (gtk_file_folder_base_init): Create the "finished-loading" signal. (gtk_file_folder_is_finished_loading): New function. * gtk/gtkfilesystemunix.c (gtk_file_folder_unix_is_finished_loading): Implement. * gtk/gtkfilesystemmodel.c (struct _GtkFileSystemModelClass): New slot for a "finished-loading" signal. (gtk_file_system_model_class_init): Create the "finished-loading" signal. (struct _GtkFileSystemModel): New field idle_finished_loading_source. We emit the "finished-loading" signal in an idle if the root folder was done loading right in _gtk_file_system_model_new(), so that the caller has a chance to connect to the signal. (_gtk_file_system_model_new): Connect to the normal signals of the folder even if the initial _list_children() fails. Also, see if the folder is finished loading; connect to the "finished-loading" signal otherwise. (gtk_file_system_model_finalize): Remove the idle handler. * gtk/gtkfilechooserdefault.c (set_list_model): Set a busy cursor and connect to the model's "finished-loading" signal. (get_toplevel): New helper function. (error_message): Use get_toplevel(). (trap_activate_cb): Likewise. (location_popup_handler): Likewise. (set_busy_cursor): New function. (browse_files_model_finished_loading_cb): New callback.