summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't do completion in the middle of an incomplete hostnameFederico Mena Quintero2009-01-211-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix completion so it doesn't pop up for every character in a URI hostname: * gtk/gtkfilechooser.h (GtkFileChooserError): Add a GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME. * gtk/gtkfilesystem.c (_gtk_file_system_parse): Return an "incomplete hostname" error if the user has not typed a full hostname yet in an URI. * gtk/gtkfilechooserentry.c (append_common_prefix): If we get an incomplete hostname, just don't pop up an error, since that is a transient state and the user doesn't need to be notified about it. (refresh_current_folder_and_file_part): Don't revert to showing the base folder if we have an incomplete hostname. (reload_current_folder): Handle the passed folder being NULL, even if we must force a reload. Also, reload the folder if we didn't have a cancellable for it (i.e. we hadn't started to load it before). Signed-off-by: Federico Mena Quintero <federico@novell.com> svn path=/trunk/; revision=22157
* bgo545980 - parse URIs in GtkFileChooserEntryFederico Mena Quintero2009-01-211-1/+24
| | | | | | | | | | | | | | | | 2009-01-15 Federico Mena Quintero <federico@novell.com> http://bugzilla.gnome.org/show_bug.cgi?id=545980 - GtkFileChooserEntry should handle URIs * gtk/gtkfilesystem.c (_gtk_file_system_parse): Detect URI schemes and parse the full URI. (has_uri_scheme): New function, stolen from the old gtkfilesystemgnomevfs.c. Signed-off-by: Federico Mena Quintero <federico@novell.com> svn path=/trunk/; revision=22154
* Mask G_FILE_TYPE_SHORTCUT as a directory (#561494)Tomas Bzatek2008-12-151-1/+2
| | | | | | | | | | | 2008-12-15 Tomas Bzatek <tbzatek@redhat.com> * gtk/gtkfilechooserdefault.c: (list_row_activated): * gtk/gtkfilesystem.c: (_gtk_file_info_consider_as_directory): Mask G_FILE_TYPE_SHORTCUT as a directory (#561494) svn path=/trunk/; revision=21906
* Privately export this method. It classifies directories and mountables theMatthias Clasen2008-12-141-0/+15
| | | | | | | | | | | | | | | | | | | * gtk/gtkfilesystem.[hc] (_gtk_file_info_consider_as_directory): Privately export this method. It classifies directories and mountables the same. * gtk/gtkfilesystem.c (enclosing_volume_mount_cb): Silently drop G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible mounts. * gtk/gtkfilesystemmodel.c: * gtk/gtkfilechooserbutton.c: * gtk/gtkfilechooserentry.c: * gtk/gtkfilechooserdefault.c: Use the new function instead of direct checks for G_FILE_TYPE_DIRECTORY throughout. svn path=/trunk/; revision=21898
* Filter out shadow mountsMatthias Clasen2008-12-011-2/+43
| | | | svn path=/trunk/; revision=21838
* Bug 528320 - Incorrect icons displayed for files with custom mimetypeAlexander Larsson2008-10-231-0/+8
| | | | | | | | | | | | | | | | | 2008-10-23 Alexander Larsson <alexl@redhat.com> Bug 528320 - Incorrect icons displayed for files with custom mimetype icons * gtk/gtkfilesystem.c: (_gtk_file_info_render_icon): Fall back on default file icon if there was no icon or it was not found in the theme. This goes with the corresponding change in glib to not add the fallback icon, but is useful in other cases too. svn path=/trunk/; revision=21702
* Bug 554702 – gtkfilesystem leaks GErrorChristian Persch2008-10-081-3/+9
| | | | | | | Also fixes some "format not a string literal and no format arguments" warnings. svn path=/trunk/; revision=21611
* Bug 554701 – filechooser spams console with useless warningsChristian Persch2008-10-021-1/+3
| | | | svn path=/trunk/; revision=21571
* use the correct gi18n header. Fixes bug #553000.Frederic Crozat2008-09-221-1/+1
| | | | | | | | | | 2008-09-22 Frederic Crozat <fcrozat@mandriva.com> * gtk/gtkfilesystem.c: use the correct gi18n header. Fixes bug #553000. svn path=/trunk/; revision=21486
* Don't free a GFile. Reported by Sebastien BacherMatthias Clasen2008-07-161-1/+1
| | | | | | | | | * gtk/gtkfilesystem.c (_gtk_file_system_set_bookmark_label): Don't free a GFile. Reported by Sebastien Bacher svn path=/trunk/; revision=20843
* include the two needed headers instead of <gtk/gtk.h>.Michael Natterer2008-07-071-1/+2
| | | | | | | | | | 2008-07-07 Michael Natterer <mitch@imendio.com> * gtk/gtkfilesystem.c: include the two needed headers instead of <gtk/gtk.h>. svn path=/trunk/; revision=20804
* Fix a memory leak. Patch by Christian Persch.Matthias Clasen2008-07-031-0/+2
| | | | | | | | * gtk/gtkfilesystem.c (get_volumes_list): Fix a memory leak. Patch by Christian Persch. svn path=/trunk/; revision=20752
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* Practically everything changed.Cody Russell2008-06-301-1/+1
| | | | | | | | | | | | | 2008-06-30 Cody Russell <bratsche@gnome.org> * Practically everything changed. Change all references of GIMP Toolkit (and variations of it) to GTK+ Toolkit, showing no mercy at all to our beloved ancestry. (#540529) svn path=/trunk/; revision=20709
* #include "config.h"Michael Natterer2008-06-261-1/+4
| | | | | | | | | 2008-06-26 Michael Natterer <mitch@imendio.com> * gtk/gtkfilesystem.c: #include "config.h" svn path=/trunk/; revision=20688
* must return a value of the appropriate type with g_return_val_if_failHans Breuer2008-06-201-0/+2
| | | | | | | | | | | | | | | | | 2008-06-20 Hans Breuer <hans@breuer.org> * gtk/gtkmenuitem.c gtk/gtkmessagedialog.c gtk/gtkplug.c : must return a value of the appropriate type with g_return_val_if_fail * gdk/gdkconfig.h.win32 : add the GSEAL definition here as well * gtk/gtkfilesystem.c : don't add the "File System" on win32 * tests/makefile.msc : remove broken autotestfile(system|chooser) from build svn path=/trunk/; revision=20657
* Use standard icon names.Matthias Clasen2008-06-181-7/+1
| | | | | | | | | | | | | | 2008-06-18 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c (_gtk_file_system_volume_render_icon): * gtk/gtkfilechooserbutton.c (change_icon_theme): (model_add_bookmarks): (model_update_current_folder): * gtk/gtkfilechooserdefault.c (shortcuts_insert_file): (shortcuts_reload_icons): Use standard icon names. svn path=/trunk/; revision=20454
* Remove GtkFileSystemError, use GtkFileChooserError instead. (#538378,Carlos Garnacho2008-06-171-12/+6
| | | | | | | | | 2008-06-18 Carlos Garnacho <carlos@imendio.com> * gtk/gtkfilesystem.[ch]: Remove GtkFileSystemError, use GtkFileChooserError instead. (#538378, patch by Matthias Clasen) svn path=/trunk/; revision=20440
* Return full path here as expected, not just the basename.Carlos Garnacho2008-06-151-56/+2
| | | | | | | | | | | | | | | | | | | 2008-06-15 Carlos Garnacho <carlos@imendio.com> * gtk/gtkfilechooser.c (gtk_file_chooser_get_filename): Return full path here as expected, not just the basename. * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_update_current_folder): Ensure that we keep a reference to file, since it can be destroyed when switching back to browse mode. * gtk/gtkfilesystem.c (get_icon_for_special_directory): Removed, home and desktop directories are dealt by the filechooser as normal files, not volumes, so the icon for these is handled directly by GIO. (_gtk_file_system_volume_render_icon): Update caller. svn path=/trunk/; revision=20393
* Avoid PLT entriesMatthias Clasen2008-06-131-0/+2
| | | | svn path=/trunk/; revision=20379
* Really make GtkFileSystem private by _-prefixing all functions.Matthias Clasen2008-06-131-88/+88
| | | | | | | | | | | | | | * gtk/gtkfilechooserbutton.c: * gtk/gtkfilechooserdefault.c: * gtk/gtkfilechooserentry.c: * gtk/gtkfilesystem.c: * gtk/gtkfilesystem.h: * gtk/gtkfilesystemmodel.c: * gtk/gtkpathbar.c: Really make GtkFileSystem private by _-prefixing all functions. svn path=/trunk/; revision=20378
* check surface status after ceating a pdf. Avoids crashing when the targetHans Breuer2008-06-131-2/+2
| | | | | | | | | | | | | | | 2008-05-23 Hans Breuer <hans@breuer.org> * gtk/gtkprintoperation.c : check surface status after ceating a pdf. Avoids crashing when the target can not be written, bug #537685 * gdk/win32/gdkdisplay-win32.c : runtime linking of ProcessIdToSessionId * gtk/gtkfilesystem.c : variadic macros are not supported with c89 and it was not needed here anyway. svn path=/trunk/; revision=20370
* Add standard icon names, and also fall back to builtin gtk stock icons.Matthias Clasen2008-06-111-4/+24
| | | | | | | | | * gtk/gtkfilesystem.c (get_icon_for_special_directory): (gtk_file_system_volume_render_icon): Add standard icon names, and also fall back to builtin gtk stock icons. svn path=/trunk/; revision=20350
* do not leak the GIcon.Paolo Borelli2008-06-101-1/+7
| | | | | | | | | | 2008-06-10 Paolo Borelli <pborelli@katamail.com> * gtk/gtkfilesystem.c (gtk_file_system_volume_render_icon): do not leak the GIcon. svn path=/trunk/; revision=20346
* Bug 520874 - Should use gio directly.Carlos Garnacho2008-06-101-1081/+1447
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix fallback icon rendering sizeTomas Bzatek2008-04-081-2/+2
| | | | | | | | | | | 2008-04-08 Tomas Bzatek <tbzatek@redhat.com> * gtk/gtkfilesystem.c: (gtk_file_info_render_icon), (gtk_file_system_volume_render_icon): Fix fallback icon rendering size svn path=/trunk/; revision=19982
* gtk/gtk.symbols rename _gtk_file_system_create to gtk_file_system_createKristian Rietveld2007-06-131-1/+1
| | | | | | | | | | | | | | 2007-06-13 Kristian Rietveld <kris@imendio.com> * gtk/gtk.symbols * gtk/gtkfilesystem.[ch]: rename _gtk_file_system_create to gtk_file_system_create to make it public and bring trunk back in sync with gtk-2-10. * gtk/gtkfilechooserdefault.c (set_file_system_backend): updated. svn path=/trunk/; revision=18121
* Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,Matthias Clasen2007-03-091-14/+7
| | | | | | | | | | | | | 2007-03-09 Matthias Clasen <mclasen@redhat.com> * Everywhere: Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder, Djihed Afifi) * configure.in: Check for ftw.h svn path=/trunk/; revision=17444
* Apply a patch by Behdad Esfahbod to reduce relocations. (#359053)Matthias Clasen2006-10-031-2/+2
| | | | | | | 2006-10-03 Matthias Clasen <mclasen@redhat.com> * gtk/*.c, gdk/*.c: Apply a patch by Behdad Esfahbod to reduce relocations. (#359053)
* Commit a patch by Behdad to fix typos, omissions and other errors in theMatthias Clasen2006-09-101-1/+1
| | | | | | | | 2006-09-10 Matthias Clasen <mclasen@redhat.com> * Commit a patch by Behdad to fix typos, omissions and other errors in the symbol aliasing, and add checks for local PLT entries. (#354687, Behdad Esfahbod)
* Remove dead code. Reduce spurious differences between this file andTor Lillqvist2006-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-08-23 Tor Lillqvist <tml@novell.com> * gtk/gtkfilesystemwin32.c: Remove dead code. Reduce spurious differences between this file and gtkfilesystemunix.c so that it is easier to compare them and check if differences are intentional. I will later factor out the common functions and code snippets from these two files. 2006-08-23 Tor Lillqvist <tml@novell.com> Fix several problems with the file chooser on Windows, for instance prevent duplicated directory entries from appearing. * gtk/gtkfilesystem.c (gtk_file_paths_sort): Use _gtk_file_system_win32_path_compare() on Windows for casefolded sorting. * gtk/gtkfilesystemwin32.c (casefolded_hash, casefolded_equal): case-independent hash and equality functions. Scan the UTF-8 strings gunichar by gunichar, and ignore special casing rules, to more closely match NTFS behaviour. (gtk_file_system_win32_init): Use casefolded_hash() and casefolded_equal() for the folder hash table. (remove_trailing_slash): Don't remove the slash of a drive or share root. (get_mime_type_for_file): Take also a WIN32_FILE_ATTRIBUTE_DATA as argument, and use that to recognize directories. Don't call g_file_test() to check for executables, just look at the file name extension directly. (gtk_file_system_win32_make_path): Check illegal chars in file name, like in gtkfilesystemunix.c. (create_file_info): Drop unused basename parameter. Call g_filename_display_name() directly for roots, as g_filename_display_basename() mishandles those. (gtk_file_folder_win32_get_info): Skip sanity check for now, as it fails for server share roots. Construct basename only in the if branch that uses it. (fill_in_names): Use casefolded_hash() and casefolded_equal() for the folder's stat_info hash table, too. (_gtk_file_system_win32_path_compare): Scan the strings gunichar by gunichar and ignore special casing here, too, instead of using g_utf8_casefold(). Match slash and backslash.
* Do better fallbacks if the icon theme does not have icons. (#345666,Matthias Clasen2006-08-151-9/+22
| | | | | | | | | 2006-08-15 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c (gtk_file_info_render_icon) (gtk_file_system_volume_render_icon): Do better fallbacks if the icon theme does not have icons. (#345666, Kazuki Iwamoto)
* Don't return values from void functions.Matthias Clasen2006-05-221-2/+2
| | | | | | | | | | | | | | | | 2006-05-22 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprinter.c (_gtk_printer_prepare_for_print) (_gtk_printer_get_settings_from_options) (_gtk_printer_request_details): Don't return values from void functions. * gtk/gtkrecentchooserutils.c (delegate_unselect_uri): Don't return a value from a void function. * gtk/gtkfilesystem.c (gtk_file_system_cancel_operation): Don't return a value from a void function. Also, don't put semicolons behind G_DEFINE_TYPE. (#342543)
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Make symbol list mstch reality.Matthias Clasen2006-05-041-8/+0
| | | | | | | | | | | | | | | | 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-30/+1
|
* Merge of the GTK+ asynchronous file chooser branch. Please see theAFTER_KRIS_ASYNC_BRANCH_MERGEKristian Rietveld2006-05-011-43/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* No point in making the error path fast by caching quarks.Matthias Clasen2006-04-041-4/+1
| | | | | | | | | | | 2006-04-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrecentchooser.c (gtk_recent_chooser_error_quark): * gtk/gtkrecentmanager.c (gtk_recent_manager_error_quark): * gtk/gtkfilechooser.c (gtk_file_chooser_error_quark): * gtk/gtkfilesystem.c (gtk_file_system_error_quark): * gtk/gtkicontheme.c (gtk_icon_theme_error_quark): No point in making the error path fast by caching quarks.
* Return NULL instead of FALSE in g_return_val_if_fail in aBehdad Esfahbod2006-04-011-1/+1
| | | | | | | | | 2006-03-31 Behdad Esfahbod <behdad@gnome.org> * gtk/gtkfilesystem.c (gtk_file_system_get_bookmark_label): * gtk/gtklinkbutton.c (gtk_link_button_new_with_label): Return NULL instead of FALSE in g_return_val_if_fail in a pointer-returning function. (#336764, Morten Welinder)
* Copy the display_key as well. (#330389, Markku Vire)Matthias Clasen2006-02-081-0/+2
| | | | | | | 2006-02-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c (gtk_file_info_copy): Copy the display_key as well. (#330389, Markku Vire)
* Use G_MODULE_BIND_LAZY when opening modules.Matthias Clasen2005-12-161-1/+1
| | | | | | | | | | 2005-12-16 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c (gtk_file_system_module_load): * gtk/gtkimmodule.c (gtk_im_module_load): * gtk/gtkthemes.c (gtk_theme_engine_load): * gtk/gtkmodules.c (find_module): Use G_MODULE_BIND_LAZY when opening modules.
* Use G_MODULE_BIND_LAZY when dlopening modules. (#319557, Laszlo Peter)Matthias Clasen2005-10-271-1/+1
| | | | | | | | | 2005-10-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c (gtk_file_system_module_load): * gtk/gtkthemes.c (gtk_theme_engine_load): * gtk/gtkimmodule.c (gtk_im_module_load): Use G_MODULE_BIND_LAZY when dlopening modules. (#319557, Laszlo Peter)
* Intern some more strings.Matthias Clasen2005-09-011-11/+12
| | | | | | | | | 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().
* Intern type names in code generated by glib-mkenums, too.Matthias Clasen2005-08-311-4/+4
| | | | | | | | | | | | | 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.
* Use g_utf8_collate_key_for_filename().Matthias Clasen2005-06-081-4/+4
| | | | | | | 2005-06-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c (gtk_file_info_get_display_key): Use g_utf8_collate_key_for_filename().
* Remove another C99ism.Matthias Clasen2005-05-251-1/+3
| | | | | | | 2005-05-25 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c (gtk_file_folder_is_finished_loading): Remove another C99ism.
* Remove C99-isms (#304879, Kazuki IWAMOTO)Matthias Clasen2005-05-201-2/+6
| | | | | | | 2005-05-20 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c: Remove C99-isms (#304879, Kazuki IWAMOTO)
* Avoid getting the interface struct twice in the same function. (#300513,Matthias Clasen2005-05-041-9/+9
| | | | | | | | | 2005-05-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c: * gtk/gtkcelleditable.c: * gtk/gtktreemodel.c: Avoid getting the interface struct twice in the same function. (#300513, Billy Biggs)
* Use g_return_if_fail, not g_return_val_if_fail.Manish Singh2005-03-221-2/+2
| | | | | | | Tue Mar 22 14:16:31 2005 Manish Singh <yosh@gimp.org> * gtk/gtkfilesystem.c (gtk_file_system_set_bookmark_label): Use g_return_if_fail, not g_return_val_if_fail.
* Implement bookmark renaming (#136216, Sean Middleditch)Matthias Clasen2005-03-221-0/+50
| | | | | | | | | | | | | | | | | | | | | | | 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.