summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.c
Commit message (Collapse)AuthorAgeFilesLines
* File chooser: Convert icons to using cairo_surface_twip/window-scales2Alexander Larsson2013-07-031-28/+40
|
* Merge branch 'places-sidebar' into masterFederico Mena Quintero2013-04-111-433/+0
|\ | | | | | | | | | | This lands the GtkPlacesSidebar widget. It is used in GtkFileChooserDefault, and it can also be used by third-party applications.
| * Merge branch 'origin/master' into places-sidebarFederico Mena Quintero2013-02-271-1/+1
| |\
| * | Remove the bookmarking bits from GtkFileSystemFederico Mena Quintero2012-09-031-433/+0
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Federico Mena Quintero <federico@gnome.org> Conflicts: gtk/gtkfilesystem.c
* | | filechooser: Rename _gtk_file_is_path_not_local() to _gtk_file_has_native_path()Federico Mena Quintero2013-03-051-6/+5
| | | | | | | | | | | | | | | | | | Negatives in names of boolean functions are confusing. Signed-off-by: Federico Mena Quintero <federico@gnome.org>
* | | filechooser: Show FUSE mounted locations in shortcutsTimothy Arceri2013-03-051-0/+14
| |/ |/| | | | | | | | | | | Since FUSE locations can be handled safely by applications show these mounted locations regardless of whether gtk_file_chooser_set_local_only() is set to TRUE https://bugzilla.gnome.org/show_bug.cgi?id=586367
* | Fix deprecations for GtkIconInfoJasper St. Pierre2013-02-151-1/+1
|/
* Migrate to XDG config dir for bookmarksWilliam Jon McCann2012-04-301-9/+42
| | | | | | | Will read from old location if new location isn't found but will write it out to the new location. https://bugzilla.gnome.org/show_bug.cgi?id=646631
* Change FSF AddressJavier Jardón2012-02-271-6/+5
|
* filechooserentry: Move _gtk_file_system_parse()Benjamin Otte2011-12-161-140/+0
| | | | | It's very specific to the file chooser entry, so it's better kept there. It's also not used anywhere else in the code.
* gtkfolder: RemoveBenjamin Otte2011-12-161-489/+0
| | | | It's not used anymore. And new code should of course use gio.
* bgo#514843 - [filechooser] Deal with corrupted .gtk-bookmarks gracefullyJohn Ralls2011-09-121-4/+9
| | | | We weren't checking for the lines in that file being valid UTF-8 strings.
* Allow resolving absolute paths even if there is no base_folderFederico Mena Quintero2011-07-011-2/+15
| | | | | This lets us do proper completion in GtkFileChooserEntry even when no base folder has been set. Completion for relative paths won't work, as usual, as expected.
* Ensure we always grab the gdk lock in async callbacksAlexander Larsson2011-03-281-0/+3
| | | | | | Async callbacks are delivered in idles, so we need to make sure we get the gdk lock before calling any gdk/gtk stuff. This was missing in a few places.
* Initialize private structureJonh Wendell2010-09-301-1/+5
|
* Use GtkFooPrivate instead GtkFooPrivJavier Jardón2010-08-271-27/+27
|
* gtk/gtkfilesystem: Do not use GET_PRIVATE macro all the timeJavier Jardón2010-08-261-77/+41
| | | | Use a private pointer instead
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-2/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Fix file chooser refcounting issuesMatthias Clasen2010-03-081-1/+23
| | | | This was reported in bug 600992.
* 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.