1. 30 Jan, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fixes #132975. · a9fbfc99
      Federico Mena Quintero authored
      2004-01-30  Federico Mena Quintero  <federico@ximian.com>
      
      	Fixes #132975.
      
      	* gtk/gtkfilesystem.c (gtk_file_system_make_path): Return NULL,
      	not FALSE.
      	(gtk_file_system_volume_render_icon): Likewise.
      
      	* gtk/gtkfilesystemwin32.c (gtk_file_system_win32_make_path):
      	Likewise.
      
      	* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Return 0,
      	not FALSE.
      
      	* gtk/gtktoolbar.c (gtk_toolbar_get_drop_index): Return -1, not
      	FALSE.
      
      	* gtk/gtktextiter.c (gtk_text_iter_get_chars_in_line): Return 0,
      	not FALSE.
      	(gtk_text_iter_get_bytes_in_line): Likewise.
      
      	* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):
      	Likewise.
      
      	* gdk/linux-fb/gdkcolor-fb.c (gdk_colors_alloc): Return FALSE, not
      	0.
      a9fbfc99
  2. 27 Jan, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fix #132314. · 7af769f9
      Federico Mena Quintero authored
      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.
      7af769f9
  3. 16 Jan, 2004 1 commit
    • Federico Mena Quintero's avatar
      New get_volume_for_path() method. (struct _GtkFileSystemIface): Finally · f2f12b9a
      Federico Mena Quintero authored
      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.
      f2f12b9a
  4. 17 Dec, 2003 1 commit
    • Federico Mena Quintero's avatar
      Added a "volumes-changed" signal. Added the following methods: · 8baf8571
      Federico Mena Quintero authored
      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().
      8baf8571
  5. 19 Nov, 2003 1 commit
    • Federico Mena Quintero's avatar
      Added a render_icon virtual method. · a3976b68
      Federico Mena Quintero authored
      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.
      a3976b68
  6. 03 Nov, 2003 1 commit
    • Federico Mena Quintero's avatar
      Do not set a border width for the toplevel container. (toolbar_create): · a92ff3fa
      Federico Mena Quintero authored
      2003-11-02  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): Do
      	not set a border width for the toplevel container.
      	(toolbar_create): New function; create a simple toolbar for the
      	file chooser.
      	(gtk_file_chooser_default_constructor): Use a spacing of 12 for
      	the table, as per the HIG.
      	(gtk_file_chooser_default_init): Likewise, for the default
      	implementation's vbox.
      
      	* gtk/gtkfilesystem.c (gtk_file_system_get_parent): Added docs to
      	note that NULL is a valid return value for the parent path.
      a92ff3fa
  7. 23 Oct, 2003 1 commit
    • Owen Taylor's avatar
      gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: Basic framework · b3bae3b4
      Owen Taylor authored
      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.
      b3bae3b4
  8. 21 Oct, 2003 1 commit
    • Federico Mena Quintero's avatar
      Free the info itself. · 806d18a4
      Federico Mena Quintero authored
      2003-10-20  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtkfilesystem.c (gtk_file_info_free): Free the info itself.
      
      	* gtkfilechooserimpldefault.c (shortcuts_insert_path): Free the
      	GtkFileInfo.
      806d18a4
  9. 18 Oct, 2003 1 commit
    • Federico Mena Quintero's avatar
      Removed. (gtk_file_system_gnome_vfs_set_bookmarks): Removed. · b49a5ec5
      Federico Mena Quintero authored
      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.
      b49a5ec5
  10. 08 Oct, 2003 1 commit
    • Federico Mena Quintero's avatar
      Added methods for ::get_supports_bookmarks(), ::set_bookmarks(), · 462aab4a
      Federico Mena Quintero authored
      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.
      462aab4a
  11. 09 Sep, 2003 1 commit
    • Federico Mena Quintero's avatar
      Free the display_key. · 613b441b
      Federico Mena Quintero authored
      2003-09-08  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtkfilesystem.c (gtk_file_info_free): Free the display_key.
      
      	* gtkfilechooserimpldefault.c (list_mtime_data_func): New
      	function.
      	(create_file_list): Add a modification time column; remove the
      	size column.
      	(mtime_sort_func): New callback.
      	(tree_selection_changed): Add a sorting function for the mtime
      	column.  Have the model fetch the modification time as well.
      	(tree_selection_changed): Do allow the file list model to show
      	directories.
      
      	* testfilechooser.c (my_new_from_file_at_size): Do not try to read
      	non-regular files.
      613b441b
  12. 02 Sep, 2003 1 commit
    • Federico Mena Quintero's avatar
      s/nonexistant/nonexistent Likewise. Likewise. Likewise. · cc4836c9
      Federico Mena Quintero authored
      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.
      cc4836c9
  13. 16 Jul, 2003 1 commit
    • Owen Taylor's avatar
      auto-ize. · 7e54248b
      Owen Taylor authored
      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.
      7e54248b
  14. 11 Jul, 2003 1 commit
    • Owen Taylor's avatar
      Add gtk_file_chooser_set_current_name() to set the current entry contents. · 7f8ae32c
      Owen Taylor authored
      Fri Jul 11 14:37:07 2003  Owen Taylor  <otaylor@redhat.com>
      
              * gtkfilechooser.[ch] gtkfilechooserprivate.h
              gtkfilechooserimpldefault.c: Add
              gtk_file_chooser_set_current_name() to set the current
              entry contents.
      
              * *.c: Consistently use '-' not '_' in property names and
              signal names.
      
              * gtkfilechooser.c: Document all exported functions.
      7f8ae32c
  15. 04 Apr, 2003 1 commit
    • Owen Taylor's avatar
      Move interface definition into a private header so it can refer to · bc3fb55c
      Owen Taylor authored
      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.
      bc3fb55c
  16. 27 Mar, 2003 1 commit
  17. 26 Mar, 2003 2 commits
  18. 25 Mar, 2003 1 commit
  19. 21 Mar, 2003 2 commits