summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement bookmark renaming (#136216, Sean Middleditch)Matthias Clasen2005-03-221-7/+19
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Add -lole32, needed for CoTaskMemFree in get_special_folder() below.Tor Lillqvist2005-01-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-01-02 Tor Lillqvist <tml@iki.fi> * gtk/Makefile.am (libgtk_target_ldflags): Add -lole32, needed for CoTaskMemFree in get_special_folder() below. * gtk/gtkfilesystem.h: Implement case-insensitive path compare on Win32 using _gtk_file_system_win32_path_compare(). * gtk/gtk.symbols: Add _gtk_file_system_win32_path_compare. * gtk/gtkfilechooserbutton.c (model_add_special) * gtk/gtkfilechooserdefault.c (shortcuts_append_desktop): Use _gtk_file_system_win32_get_desktop() to get correct Desktop folder on Win32. (#144003) * gtk/gtkfilesystemwin32.c: Remove unnecessary includes. Do consider all drives "mounted", including floppies. Trying to inspect the contents of a nonexistent floppy will cause errors later that are handled normally, no need to avoid them completely. Keep the drive type in the GtkFileSystemVolume. Support UNC paths. (#161797) Fix error message capitalizations as in gtkfilesystemunix.c. (gtk_file_system_win32_init): Start one timeout per GtkFileSystemWin32. (gtk_file_system_win32_finalize): Remove the timeout. (get_special_folder): Copied from GLib. (_gtk_file_system_win32_get_desktop): New function, uses get_special_folder(). (gtk_file_system_win32_list_volumes): Don't start a timeout at each call to this function. Don't assume A: and B: are floppies. (gtk_file_system_win32_get_volume_for_path): Don't assume all volumes are drive roots, i.e. support share roots of UNC paths (\\server\share). (gtk_file_system_win32_get_folder): Don't assume errno is set after g_file_test() returns FALSE. It isn't on Win32 (and even on Unix I don't think one should assume anything about errno after g_file_test()). (gtk_file_system_win32_volume_get_is_mounted): Always return TRUE. (gtk_file_system_win32_volume_get_display_name): Don't call GetVolumeInformation() on drives A: or B: if they are removable, as they might then be floppies, causing an unnecessary delay. (#157820) (gtk_file_system_win32_volume_render_icon): Use network icon for unrecognized drive types. (canonicalize_filename, gtk_file_system_win32_parse): Don't get confused by UNC paths. (bookmarks_serialize): Use _gtk_file_system_win32_path_compare() for case-insensitive UTF-8 path comparison. (extract_icon): Use SHGetFileInfo() which is faster than ExtractAssociatedIcon(). Icon extraction is still slow, though, needs work. (win32_pseudo_mime_lookup): Don't use the same icon for all shortcuts or executables. Cache only other file type icons. (gtk_file_system_win32_render_icon): Use network stock icon for remote drives and UNC server share roots. Compare home directory case-insensitively. Do lookup icons also for executable files, after all, it's these files that can have individual icons in the first place. Yes, it can be slow. Needs work. (filename_is_drive_root): Require also the slash after the colon. (filename_is_server_share): New function. (_gtk_file_system_win32_path_compare): New function, does case-folded UTF-8 comparison. * gtk/gtkfilesystemwin32.h: Declare _gtk_file_system_win32_path_compare().
* Mark as const.Matthias Clasen2004-11-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-11-23 Matthias Clasen <mclasen@redhat.com> * gtk/gtkuimanager.h (gtk_ui_manager_get_type): * gtk/gtktreeview.h (gtk_tree_view_get_type): * gtk/gtktreeviewcolumn.h (gtk_tree_view_column_get_type): * gtk/gtktreestore.h (gtk_tree_store_get_type): * gtk/gtktreeselection.h (gtk_tree_selection_get_type): * gtk/gtktreemodelfilter.h (gtk_tree_model_filter_get_type): * gtk/gtktreemodel.h (gtk_tree_iter_get_type): (gtk_tree_path_get_type): (gtk_tree_row_reference_get_type): * gtk/gtktoolitem.h (gtk_tool_item_get_type): * gtk/gtktoolbutton.h (gtk_tool_button_get_type): * gtk/gtktoggleaction.h (gtk_toggle_action_get_type): * gtk/gtkthemes.h (gtk_theme_engine_get_type): * gtk/gtktextiter.h (gtk_text_iter_get_type): * gtk/gtksettings.h (gtk_settings_get_type): * gtk/gtkselection.h (gtk_selection_data_get_type): * gtk/gtkradioaction.h (gtk_radio_action_get_type): * gtk/gtkmenutoolbutton.h (gtk_menu_tool_button_get_type): * gtk/gtkliststore.h (gtk_list_store_get_type): * gtk/gtkiconview.h (gtk_icon_view_get_type): * gtk/gtkicontheme.h (gtk_icon_info_get_type): * gtk/gtkiconfactory.h (gtk_icon_factory_get_type): (gtk_icon_set_get_type): (gtk_icon_source_get_type): * gtk/gtkfilesystemwin32.h (gtk_file_system_win32_get_type): * gtk/gtkfilesystemunix.h (gtk_file_system_unix_get_type): * gtk/gtkfilesystem.h (gtk_file_folder_get_type): (gtk_file_info_get_type, gtk_file_path_get_type): (gtk_file_system_get_type): * gtk/gtkfilefilter.h (gtk_file_filter_get_type): * gtk/gtkfilechooserwidget.h (gtk_file_chooser_widget_get_type): * gtk/gtkfilechooser.h (gtk_file_chooser_get_type): * gtk/gtkfilechooserdialog.h (gtk_file_chooser_dialog_get_type): * gtk/gtkexpander.h (gtk_expander_get_type): * gtk/gtkentrycompletion.h (gtk_entry_completion_get_type): * gtk/gtkcombobox.h (gtk_combo_box_get_type): * gtk/gtkcomboboxentry.h (gtk_combo_box_entry_get_type): * gtk/gtkclipboard.h (gtk_clipboard_get_type): * gtk/gtkcellview.h (gtk_cell_view_get_type): * gtk/gtkcellrenderertoggle.h (gtk_cell_renderer_toggle_get_type): * gtk/gtkcellrenderertext.h (gtk_cell_renderer_text_get_type): * gtk/gtkcellrendererprogress.h (gtk_cell_renderer_progress_get_type): * gtk/gtkcellrendererpixbuf.h (gtk_cell_renderer_pixbuf_get_type): * gtk/gtkcellrenderercombo.h (gtk_cell_renderer_combo_get_type): * gtk/gtkcelllayout.h (gtk_cell_layout_get_type): * gtk/gtkactiongroup.h (gtk_action_group_get_type): * gtk/gtkaction.h (gtk_action_get_type): * gtk/gtkaccessible.h (gtk_accessible_get_type): * gtk/gtkaccelmap.h (gtk_accel_map_get_type): * gtk/gtkaccelgroup.h (gtk_accel_group_get_type): * gtk/gtkmessagedialog.h (gtk_message_dialog_get_type): Mark as const. * gtk/gtkicontheme.h: Don't mark gtk_icon_theme_error_quark() as const, to be consistent with all the other error_quark functions. (technically they are const, but since these are called only in error paths, giving the compiler better optimization opportunities doesn't matter much) * gtk/gtk.symbols: * gdk/gdk.symbols: Add attribute annotations. * gtk/makegtkalias.pl: * gdk/makegdkalias.pl: Keep attribute annotations, but strip PRIVATE. * gtk/Makefile.am (gtk.def): * gdk/Makefile.am (gdk.def): Strip attribute annotations, but keep PRIVATE.
* Merged from 2.4:Federico Mena Quintero2004-09-181-2/+0
| | | | | | | | | | 2004-09-18 Federico Mena Quintero <federico@ximian.com> Merged from 2.4: * gtk/gtkfilesystem.h: Removed the GTK_FILE_PATH() and GTK_IS_FILE_PATH() macros. They are not supposed to exist, as GtkFilePath is not an object. And they never worked, anyway.
* Fix #137520.Federico Mena Quintero2004-03-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Revert the patch to #137520, as 2.4.1 is for conservative bug fixes only.Federico Mena Quintero2004-03-191-6/+0
| | | | | | | | | | | | 2004-03-19 Federico Mena Quintero <federico@ximian.com> * Revert the patch to #137520, as 2.4.1 is for conservative bug fixes only. The patch is attached to the bug report, for reference. 2004-03-19 Morten Welinder <terra@gnome.org> * gtk/gtkfilechooserdefault.c
* Fix #137520.Federico Mena Quintero2004-03-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-03-19 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.
* Rewritten to use the GtkEntryCompletion API more correctly. Now pops downJonathan Blandford2004-03-151-0/+7
| | | | | | | | | | | | | Mon Mar 15 01:50:28 2004 Jonathan Blandford <jrb@gnome.org> * gtkfilechooserentry.c: Rewritten to use the GtkEntryCompletion API more correctly. Now pops down the dropdown well. * gtkfilesystem.c (gtk_file_path_get_type): New boxed type for the FilePath. * test/testfilechooser.c: disable preview widget temporarily. It's not representative of a good preview widget.
* Implement local_only by filtering the shortcuts and bookmarks list byOwen Taylor2004-03-151-0/+3
| | | | | | | | | | | | | Sun Mar 14 23:36:15 2004 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilechooserdefault.c: Implement local_only by filtering the shortcuts and bookmarks list by gtk_file_system_path_to_filename (file_system, path) != NULL. (#132894) * gtk/gtkfilesystem.c (gtk_file_system_path_is_local): Add a convenience function, may by interesting to push to the file system vtable later for performance.
* Added a "position" argument.Federico Mena Quintero2004-02-271-2/+5
| | | | | | | | | | | | | | | | | | | | | | 2004-02-27 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilesystem.c (gtk_file_system_insert_bookmark): Added a "position" argument. * gtk/gtkfilesystem.h (GtkFileSystemError): Added value for GTK_FILE_SYSTEM_ERROR_ALREADY_EXISTS. (struct _GtkFileSystemIface): Added a "position" argument to the ::insert_bookmark() method. * gtk/gtkfilesystemunix.c (gtk_file_system_unix_insert_bookmark): Updated; renamed from gtk_file_system_unix_add_bookmark(). Return an error if the path already exists in the bookmarks list. (gtk_file_system_unix_remove_bookmark): Return an error if the path does not exist in the bookmarks list. * gtk/gtkfilechooserdefault.c (shortcuts_add_bookmark_from_path): For now, use gtk_file_system_insert_bookmark() with -1 for the position. DnD will come next.
* Remove old file-system property. Add new file-system-backend stringAlexander Larsson2004-02-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 2004-02-19 Alexander Larsson <alexl@redhat.com> * gtk/gtkfilechooser.c: (gtk_file_chooser_class_init): * gtk/gtkfilechooserutils.c: * gtk/gtkfilechooserutils.h: * gtk/gtkfilechooserwidget.c: Remove old file-system property. Add new file-system-backend string property * gtk/gtkfilechooserdefault.[ch]: Handle the file-system-backend property * gtk/gtkfilechooserdialog.[ch]: (gtk_file_chooser_dialog_new_with_backend): Remove old file-system property. Add new file-system-backend string property Add new function gtk_file_chooser_dialog_new_with_backend * gtk/gtkfilesystem.c: * gtk/gtkfilesystem.h: Add filesystem module support.
* Fix #132314.Federico Mena Quintero2004-01-271-27/+1
| | | | | | | | | | | | | | | | 2004-01-27 Federico Mena Quintero <federico@ximian.com> Fix #132314. * gtk/gtkfilesystem.h: Removed the #ifdef-ed out, old icon API. * gtk/gtkfilesystem.c: Likewise. * gtk/gtkfilesystemunix.c (filename_get_info): Removed the old icon-type code. (gtk_file_system_unix_render_icon): Moved the icon-rendering code from GtkFileInfo to here. (gtk_file_system_unix_volume_render_icon): Implement.
* New get_volume_for_path() method. (struct _GtkFileSystemIface): FinallyFederico Mena Quintero2004-01-161-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-01-16 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilesystem.h (struct _GtkFileSystemIface): New get_volume_for_path() method. (struct _GtkFileSystemIface): Finally removed the list_roots() and get_root_info() methods, and the "roots-changed" signal. * gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path): New function. (gtk_file_system_list_roots): Removed. (gtk_file_system_get_root_info): Removed. * gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_volume_for_path): Implement. (get_root_volume): New helper function. (gtk_file_system_unix_list_volumes): Use get_root_volume(). (gtk_file_system_unix_list_roots): Removed. (gtk_file_system_unix_get_root_info): Removed. * gtk/gtkfilesystemmodel.c (_gtk_file_system_model_new): Don't accept a NULL root_path. (struct _GtkFileSystemModel): Add a field to remember the root_path. (_gtk_file_system_model_new): Store the root_path in the model structure. (find_and_ref_path): Stop going up the hierarchy at the root_path of the model. Also, don't return prematurely when walking up the hierarchy. * gtk/gtkfilechooserdefault.c (create_file_list): Sigh, restore the rules_hint. (struct _GtkFileChooserDefault): Added a current_volume_path field. (set_tree_model): New function; create the folder tree model here. (create_folder_tree): Don't create the model here. (set_list_model): Set the show_hidden flag on the list model.
* Added a "volumes-changed" signal. Added the following methods:Federico Mena Quintero2003-12-171-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-12-16 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilesystem.h (struct _GtkFileSystemIface): Added a "volumes-changed" signal. Added the following methods: list_volumes volume_free volume_get_base_path volume_get_is_mounted volume_mount volume_get_display_name volume_render_icon * gtk/gtkfilesystem.c (gtk_file_system_base_init): Create the "volumes-changed" signal. (gtk_file_system_list_volumes): New function. (gtk_file_system_volume_free): New function. (gtk_file_system_volume_get_base_path): New function. (gtk_file_system_volume_get_is_mounted): New function. (gtk_file_system_volume_mount): New function. (gtk_file_system_volume_get_display_name): New function. (gtk_file_system_volume_render_icon): New function. * gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_free): Implement. (gtk_file_system_unix_volume_get_base_path): Implement. (gtk_file_system_unix_volume_get_is_mounted): Implement. (gtk_file_system_unix_volume_mount): Implement. (gtk_file_system_unix_volume_get_display_name): Implement. (gtk_file_system_unix_volume_render_icon): Implement. * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault): Added a field for the "volumes-changed" signal connection. (gtk_file_chooser_default_set_property): Connect to "volumes-changed" on the file system. (gtk_file_chooser_default_finalize): Disconnect from "volumes-changed". * gtk/gtkfilechooserdefault.c (shortcuts_remove_rows): New helper function. (shortcuts_get_index): New helper function. (shortcuts_insert_path): Can now insert volumes as well as paths. (shortcuts_append_paths): Don't take is_file_system_root. (shortcuts_add_volumes): New function. (shortcuts_append_file_system_roots): Removed. (create_shortcuts_model): Use shortcuts_add_volumes(). (remove_bookmark_button_clicked_cb): Check that the index is within range. (bookmarks_check_add_sensitivity): Take volumes into account. (shortcuts_get_selected_index): New helper function. (remove_bookmark_button_clicked_cb): Use shortcuts_get_selected_index(). (bookmarks_check_remove_sensitivity): Likewise. (shortcuts_select_func): Likewise. (shortcuts_row_activated_cb): Handle volumes as well as normal paths. (shortcuts_activate_volume): New function. (struct _GtkFileChooserDefault): Removed the bookmarks_set and bookmarks_iter fields. (shortcuts_append_bookmarks): Use shortcuts_remove_rows(). (bookmarks_changed_cb): Use shortcuts_add_bookmarks(). (remove_bookmark_rows): Removed. (shortcuts_add_bookmarks): New function; moved most of the code over from shortcuts_append_bookmarks(). (shortcuts_append_bookmarks): Add the separator node here, and then call shortcuts_add_bookmarks().
* Added a render_icon virtual method.Federico Mena Quintero2003-11-191-0/+20
| | | | | | | | | | | | | | | | | | | | 2003-11-19 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilesystem.h (struct _GtkFileSystemIface): Added a render_icon virtual method. * gtk/gtkfilesystem.c (gtk_file_system_render_icon): New function. * gtk/gtkfilesystemunix.c (gtk_file_system_unix_render_icon): Implement as a stub for now. * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Use gtk_file_system_render_icon(). (list_icon_data_func): Likewise. (toolbar_create): Set the toolbar style to icons only. * gtk/gtkfilechooser.c (gtk_file_chooser_add_shortcut_folder_uri): Fix doc comments.
* Changew index to filter_index to fix compilation error.Padraig O'Briain2003-10-281-1/+1
| | | | | | | | | 2003-10-28 Padraig O'Briain <padraig.obriain@sun.com> * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_remove_filter): Changew index to filter_index to fix compilation error. * gtk/gtkfilesystem.h: Correct definition of gtk_file_path_get_string.
* gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: Basic frameworkOwen Taylor2003-10-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch] gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]: gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: Basic framework for the new file selector widget. * gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch] gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]: Initial implementation of the GtkFileChooser user interface. * gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation for Unix files. * configure.in gtk/Makefile.am gtk/xdgmime: Build code for freedesktop.org MIME system on Unix. * tests/testfilechooser.c: Test program for GtkFileChooser * tests/prop-editor.c: Add support for properties on interfaces.
* Removed. (gtk_file_system_gnome_vfs_set_bookmarks): Removed.Federico Mena Quintero2003-10-181-24/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-17 Federico Mena Quintero <federico@ximian.com> * gtkfilesystemgnomevfs.c (gtk_file_system_gnome_vfs_get_supports_bookmarks): Removed. (gtk_file_system_gnome_vfs_set_bookmarks): Removed. (gtk_file_system_gnome_vfs_add_bookmark): Implement. (gtk_file_system_gnome_vfs_remove_bookmark): Implement. * gtkfilechooserprivate.h (struct _GtkFileChooserIface): Replaced the ::set_shortcut_folders() method with :;add_shortcut_folder() and ::remove_shortcut_folder(). * gtkfilechooserutils.c (delegate_add_shortcut_folder): New function. (delegate_remove_shortcut_folder): New function. (delegate_list_shortcut_folders): New function. * gtkfilechooserimpldefault.c (create_shortcuts_model): Insert the Desktop directory as well. (shortcuts_insert_path): Renamed from shortcuts_append_path; now takes a position index instead of a parent node iter. Also takes a GError argument. (struct _GtkFileChooserImplDefault): Removed the shortcuts_folder list. It is all kept in the model now. (shortcuts_append_home): Save whether adding a shortcut for the home directory was successful. (shortcuts_append_desktop): Likewise for the desktop. (shortcuts_append_file_system_roots): Count and save the number of roots added. (shortcuts_append_shortcut_folders): Removed. (gtk_file_chooser_impl_default_add_shortcut_folder): Implement. (shortcuts_append_bookmarks): Now that we don't have a bookmarks parent node, don't expand the tree. (add_bookmark_button_clicked_cb): Use gtk_file_system_add_bookmark(). (remove_bookmark_button_clicked_cb): Use gtk_file_system_remove_bookmark(). (gtk_file_chooser_impl_default_list_shortcut_folders): Get the folders from the shortcuts model; we no longer keep a separate list. * gtkfilesystem.h (struct _GtkFileSystemIface): Oops, there shouldn't be shortcuts-related virtual methods here. * gtkfilechooser.c (file_paths_to_strings): New helper function. (gtk_file_chooser_get_filenames): Use file_paths_to_strings(). (gtk_file_chooser_get_uris): Likewise. (gtk_file_chooser_set_shortcut_folders): Removed. (gtk_file_chooser_list_shortcut_folders): Return a list of strings, not of GtkFilePath*. (gtk_file_chooser_list_shortcut_folder_uris): New function. (gtk_file_chooser_add_shortcut_folder): New function. (gtk_file_chooser_remove_shortcut_folder): New function. (gtk_file_chooser_add_shortcut_folder_uri): New function. (gtk_file_chooser_remove_shortcut_folder_uri): New function. (_gtk_file_chooser_add_shortcut_folder): New function. (_gtk_file_chooser_remove_shortcut_folder): New function. * gtkfilechooser.h: New enum. * gtkfilechooser.c (gtk_file_chooser_error_quark): New function. * gtkfilesystem.c (gtk_file_system_get_supports_bookmarks): Removed. (gtk_file_system_set_bookmarks): Removed. (gtk_file_system_add_bookmark): New function. (gtk_file_system_remove_bookmark): New function. * gtkfilesystemunix.c (gtk_file_system_unix_get_supports_bookmarks): Removed. (gtk_file_system_unix_set_bookmarks): Removed. (gtk_file_system_unix_add_bookmark): Just a stub for now. (gtk_file_system_unix_remove_bookmark): Likewise. * testfilechooser.c (main): Add a shortcut for testing purposes.
* Added methods for ::get_supports_bookmarks(), ::set_bookmarks(),Federico Mena Quintero2003-10-081-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-07 Federico Mena Quintero <federico@ximian.com> * gtkfilesystem.h (struct _GtkFileSystemIface): Added methods for ::get_supports_bookmarks(), ::set_bookmarks(), ::list_bookmarks(). Added a ::bookmarks_changed() signal. * gtkfilesystem.c (gtk_file_system_get_supports_bookmarks): New function. (gtk_file_system_set_bookmarks): New function. (gtk_file_system_list_bookmarks): New function. (gtk_file_system_base_init): Create the "bookmarks-changed" signal. (gtk_file_paths_copy): New function. * gtkfilesystemunix.c (gtk_file_system_unix_get_supports_bookmarks): Implement. (gtk_file_system_unix_set_bookmarks): Implement. (gtk_file_system_unix_get_bookmarks): Implement. * gtkfilesystemgnomevfs.c (struct _GtkFileSystemGnomeVFS): Added fields for the bookmarks and the GConfClient. (gtk_file_system_gnome_vfs_set_bookmarks): Implement. (gtk_file_system_gnome_vfs_list_bookmarks): Implement. * gtkfilechooserprivate.h (struct _GtkFileChooserIface): Added methods for ::set_shortcut_folders(), ::list_shortcut_folders(). * gtkfilechooser.c (gtk_file_chooser_set_shortcut_folders): New function. (gtk_file_chooser_list_shortcut_folders): New function. * gtkfilechooserimpldefault.c (create_shortcuts_model): Unref the old shortcuts model if it exists. Create the nodes for the app-specific shortcut folders. (struct _GtkFileChooserImplDefault): Added a field for the shortcut_folders. (gtk_file_chooser_impl_default_set_shortcut_folders): Implement. (select_shortcuts_folder): New helper function. (gtk_file_chooser_impl_default_set_current_folder): Use select_shortcuts_folder(). (shortcuts_append_path): Get the file info here, instead of the caller. (shortcuts_append_home): Use shortcuts_append_path(). (shortcuts_append_file_system_roots): Likewise. (create_shortcuts_model): Add the app-specific shortcut folders and the bookmarks. (gtk_file_chooser_impl_default_list_shortcut_folders): Implement. (create_shortcuts_tree): Added a button to let the user add the current folder to the bookmarks. (gtk_file_chooser_impl_default_set_property): Connect to "bookmarks-changed" on the file system. (shortcuts_append_bookmarks): New function. * configure.ac: Depend on GConf.
* Added fields for the shortcuts tree and its model. (create_file_list):Federico Mena Quintero2003-10-011-3/+17
| | | | | | | | | | | | | | | | | | | | | 2003-09-30 Federico Mena Quintero <federico@ximian.com> * gtkfilechooserimpldefault.c (struct _GtkFileChooserImplDefault): Added fields for the shortcuts tree and its model. (create_file_list): Don't call gtk_tree_view_column_set_sort_column_id() twice. (create_shortcuts_model): New function. (list_icon_data_func): Use an ICON_SIZE macro instead of a hardcoded value. (list_row_activated): Use _gtk_file_chooser_set_current_folder_path() to avoid converting the GtkFilePath to a URI string. (gtk_file_chooser_impl_default_set_current_folder): Select the appropriate item from the shortcuts list when the current folder changes, to let the user know where he is. (tree_selection_changed): Likewise. * gtkfilesystem.h (struct _GtkFileSystemIface): Added methods for ::supports_shortcuts(), ::list_shortcuts(), ::set_shortcuts().
* s/nonexistant/nonexistent Likewise. Likewise. Likewise.Federico Mena Quintero2003-09-021-1/+1
| | | | | | | | | | | | | | 2003-09-02 Federico Mena Quintero <federico@ximian.com> * gtkfilesystem.h: s/nonexistant/nonexistent * gtkfilesystem.c: Likewise. * gtkfilesystemgnomevfs.c: Likewise. * gtkfilesystemunix.c: Likewise. 2003-08-27 Federico Mena Quintero <federico@ximian.com> * README: The required GtkTreeView patches are already on CVS. Removed the part that mentions them.
* auto-ize.Owen Taylor2003-07-161-4/+20
| | | | | | | | | | | | | | | | | | | | | | | 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.
* - Disconnect signal connections when appropriate. - Listen toOwen Taylor2003-04-091-1/+2
| | | | | | | | | | | | | | | | | | | | | Wed Apr 9 12:28:04 2003 Owen Taylor <otaylor@redhat.com> * gtkfilesystemmodel.c: - Disconnect signal connections when appropriate. - Listen to ::roots-changed on the file system - When the last reference count on a child is removed, queue an idle to unload the parent. * gtkfilesystemgnomevfs.c - When URI's outside of file:/// are acessed, add toplevel URI's to the list of roots. - Improve display name computations * gtkfilechooserentry.c: Don't complete on empty file parts; free stored folder when base directory changes. * gtkfilechooser.c: Fill in some docs.
* Move interface definition into a private header so it can refer toOwen Taylor2003-04-041-69/+113
| | | | | | | | | | | | | | 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.
* Finish monitoring, add a TODO, fill in details in README, fix some missing ↵Owen Taylor2003-03-271-5/+5
| | | | finalization chainups
* - Add GnomeVFS backendOwen Taylor2003-03-261-2/+3
| | | | | | - Add gtk_file_info_get_display_key() - Start switching from file_added => files_added - Switch over to Nautilus-like Loading.../Empty
* Add GtkFileSystem::parse, and a chooser entry with completionOwen Taylor2003-03-251-0/+12
|
* Initial revisionOwen Taylor2003-03-211-0/+209