summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystemmodel.h
Commit message (Collapse)AuthorAgeFilesLines
* s/get_is_visible/iter_is_visible for clarityFederico Mena Quintero2009-10-151-1/+1
| | | | Signed-off-by: Federico Mena Quintero <federico@novell.com>
* Make _gtk_file_system_model_remove_file() staticFederico Mena Quintero2009-10-151-2/+0
| | | | | | It was only used internally by the model. Signed-off-by: Federico Mena Quintero <federico@novell.com>
* Make _gtk_file_system_model_add_file() staticFederico Mena Quintero2009-10-151-3/+0
| | | | | | It was only used internally by the model, anyway. Signed-off-by: Federico Mena Quintero <federico@novell.com>
* Improve show_and_select_files() functionBenjamin Otte2009-10-151-0/+2
| | | | | | | The previous function enumerated the whole directory and used a lot of outdated API to decide how to show files. The new code queries the filesystem model to decide about this. The now unused old functions were removed.
* Convert search to use a GtkFileSystemModelBenjamin Otte2009-10-151-0/+3
| | | | | | | | Replace the list model code with the file system model and use all the file system model API niceties we get from that. Also adds the function _gtk_file_system_model_add_and_query_file() which g_file_query_info()'s the file before adding it, so it gets added with the right information.
* Add a constructor to filesystem model that does not monitor a directoryBenjamin Otte2009-10-151-1/+5
| | | | | This is in preparation for switching search and recent models to use GtkFileSystemModel
* Make the filesystem model filter API use a GtkFileFilterBenjamin Otte2009-10-151-9/+4
| | | | | This gets rid of the vfunc API and does exactly what the file chooser wants.
* Implement new GtkFileSystemModelBenjamin Otte2009-10-151-20/+34
| | | | | | | | | | | | | | | | | | | | The new model is mostly API-compatible with the old model (minimal changes were required), but is a lot faster and has a lot of very desirable features. - the model does no longer support a tree, just a list of files in a given directory - the storage has been moved to a GArray as opposed to a tree - no more dependency on GtkFileSystem - columns are managed by the creator of the model, so any number of nodes can be added as needed. This also makes the API more similar to GtkListStore. - Values are filled on demand using a function given when creating the model. - The function can decide to let the model cache returned values or decide to be called again the next time the value is queried. - implements GtkTreeSortable - _gtk_file_system_model_get_value() was added to significantly speed up value access, which is necessary when sorting large models.
* 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
* gtk/gtkaction.h gtk/gtkbuildable.h gtk/gtkbuilderprivate.hMichael Natterer2008-06-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-23 Michael Natterer <mitch@imendio.com> * gtk/gtkaction.h * gtk/gtkbuildable.h * gtk/gtkbuilderprivate.h * gtk/gtkcelllayout.h * gtk/gtkentrycompletion.h * gtk/gtkfilechoosersettings.h * gtk/gtkfilesystem.h * gtk/gtkfilesystemmodel.h * gtk/gtkicontheme.h * gtk/gtklinkbutton.h * gtk/gtkpagesetup.h * gtk/gtkpapersize.h * gtk/gtkprintcontext.h * gtk/gtkprintoperation.h * gtk/gtkprintoperationpreview.h * gtk/gtkprintsettings.h * gtk/gtkrecentchooserprivate.h * gtk/gtkrecentmanager.h * gtk/gtksearchengine.h * gtk/gtktexttag.h * gtk/gtktreeselection.h * gtk/gtktreeviewcolumn.h * gtk/gtkuimanager.h: remove redundant inclusion of <glib.h> and <glib-object.h>. There is no point in relying on them being pulled in by other headers in some places and placing them explicitly in other places, so choose the "as little includes as possible" approach and get rid of them. svn path=/trunk/; revision=20675
* Bug 520874 - Should use gio directly.Carlos Garnacho2008-06-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge of the GTK+ asynchronous file chooser branch. Please see theAFTER_KRIS_ASYNC_BRANCH_MERGEKristian Rietveld2006-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Mark as const.Matthias Clasen2004-11-281-1/+1
| | | | | | | | | | | | | | | | | | 2004-11-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkwidget.h (gtk_requisition_get_type): * gtk/gtktypeutils.h (gtk_identifier_get_type): * gtk/gtktexttag.h (gtk_text_attributes_get_type): * gtk/gtkstyle.h (gtk_border_get_type): * gtk/gtkfilesystemmodel.h (_gtk_file_system_model_get_type): * gtk/gtkfilechooserentry.h (_gtk_file_chooser_entry_get_type): * gtk/gtkfilechooserembed.h (_gtk_file_chooser_embed_get_type): * gtk/gtkfilechooserdefault.h (_gtk_file_chooser_default_get_type): * gtk/gtkaccelmap.h (gtk_accel_map_get_type): Mark as const. * gtk/gtk.symbols: * gtk/Makefile.am: Mark get_type() functions generated by glib-mkenums as const.
* Fix #139290:Federico Mena Quintero2004-07-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added a has_editable field. (_gtk_file_system_model_add_editable): NewFederico Mena Quintero2004-01-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-01-16 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilesystemmodel.c (struct _GtkFileSystemModel): Added a has_editable field. (_gtk_file_system_model_add_editable): New function. (_gtk_file_system_model_remove_editable): New function. (gtk_file_system_model_get_value): Return appropriate values for the temporary editable row. (_gtk_file_system_model_get_info): Handle the editable row. (_gtk_file_system_model_get_path): Likewise. * gtk/gtkfilechooserdefault.c (shortcuts_append_bookmarks): Removed an unused variable. (toolbar_button_new): Optionally show the button. (up_button_clicked_cb): Renamed from up_button_cb(), fixed prototype. (toolbar_create): Add a "New Folder" button for Save mode. (error_building_filename_dialog): New helper function. (gtk_file_chooser_default_get_paths): Use error_building_filename_dialog(). (create_file_list): Connect to the "edited" signal of the text cell renderer. Store the name column and text renderer in the impl structure. (renderer_edited_cb): New callback. (gtk_file_chooser_default_set_property): Show/hide the "New folder" button when the save action changes. (COMPARE_DIRECTORIES): Allow the info values to be NULL. (COMPARE_DIRECTORIES): Duh, use the list_model, not the tree_model. (get_list_file_info): Likewise! (list_icon_data_func): Handle the path being NULL. (new_folder_button_clicked): New callback. (list_name_data_func): If we are on the editable row, set the text to "Type name of new folder". (list_selection_changed): Handle the editable row. (list_mtime_data_func): Likewise. * gtk/gtkfilesystemunix.c (gtk_file_system_unix_make_path): Return NULL, not FALSE. (gtk_file_system_unix_create_folder): Test the result of mkdir() correctly.
* File filter objects.Owen Taylor2003-07-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Wed Jul 23 11:23:43 2003 Owen Taylor <otaylor@redhat.com> * gtkfilefilter.[ch]: File filter objects. * gtkfilechooser.[ch] gtkfilechooserutils.[ch]: Add file filtering to API. * gtkfilechooserimpldefault.c: Implement file filters. * testfilechooser.c: Try out the filter functionality. * gtkfilesystemmodel.c: Add _gtk_file_system_model_set_filter() to set a callback function for filtering. * gtkfilechooserutils.c: Propagate property notification to the receiver. * fnmatch.c: Copy this from GTK+ temporarily to get UTF-8 pattern matching functionality.
* auto-ize.Owen Taylor2003-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Wed Jul 16 16:50:31 2003 Owen Taylor <otaylor@redhat.com> * configure.ac Makefile.am: auto-ize. * xdgmime/: Add freedesktop.org MIME spec implementatin by Jonathan Blandford. * gtkfilesystem.[ch]: Add gtk_file_info_render_icon() gtk_file_info_set/get_icon_type to do icon handling based on MIME type. Add a simple icon caching system. * gtkfilesystemgnomevfs.c: Implement ensure_types() so that extending the set of types for a loaded directory works. Set the MIME type to get the default icon handling. * gtkfilesystemunix.c: Look up the MIME type using xdgmime. * gtkfilechooserimpldefault.c: Display icons in the list.
* Move interface definition into a private header so it can refer toOwen Taylor2003-04-041-11/+10
| | | | | | | | | | | | | | Fri Apr 4 17:30:27 2003 Owen Taylor <otaylor@redhat.com> * gtkfilechooserprivate.h gtkfilechooser.h: Move interface definition into a private header so it can refer to GtkFileSystem. * *.[ch]: Switch over from using gchar *uri internally to using GtkFilePath * internally, and add conversion routines to GtkFileSystem. * TODO README: Updates.
* Make incrememtal searching work, some bug fixesOwen Taylor2003-03-241-0/+1
|
* Initial revisionOwen Taylor2003-03-211-0/+72