1. 27 Sep, 2004 1 commit
    • Matthias Clasen's avatar
      Emit ::finished-loading. · e8522b9c
      Matthias Clasen authored
      2004-09-27  Matthias Clasen  <mclasen@redhat.com>
      
      	* gtk/gtkfilesystemunix.c (gtk_file_folder_unix_list_children):
      	Emit ::finished-loading.
      e8522b9c
  2. 01 Sep, 2004 1 commit
  3. 15 Aug, 2004 1 commit
  4. 09 Aug, 2004 1 commit
    • Matthias Clasen's avatar
      Add hidden aliases for exported symbols which are used internally in order · 3612aee5
      Matthias Clasen authored
      Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>
      
      	Add hidden aliases for exported symbols which are
      	used internally in order to get rid of many PLT
      	entries.  (#145519, Arjan van de Ven)
      
      	* gtk/Makefile.am: Add rules to generate gtk.def and
      	from gtk.symbols, and make make check check the abi
      	with abicheck.sh.
      	(gtk_private_h_sources): Add gtkinternals.h
      	(gtk_built_private_headers): Add gtkalias.h
      	(gtk_extra_sources): Add gtk.symbols
      	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh
      
      	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
      	The file can be processed by cpp to filter out certain
      	subsets of symbols.
      
      	* gtk/abicheck.sh: New file. Script to check the actually
      	symbols exported from libgtk-x11.2.0.so against the symbols
      	found in gtk.symbols.
      
      	* gtk/makegtkalias.pl: New file. Perl script to generate the
      	header containing the alias definitions for internally used
      	exported symbols from a list of symbols.
      
      	* gtk/gtkinternals.h: New file. An uninstalled header listing
      	symbols which must be exported for some reason and do not appear
      	in any other header.
      
      	* gtk/*.c: Include gtkalias.h
      3612aee5
  5. 09 Jul, 2004 2 commits
    • Federico Mena Quintero's avatar
      Fixes #137031: · 42067dfb
      Federico Mena Quintero authored
      2004-07-09  Federico Mena Quintero  <federico@ximian.com>
      
      	Fixes #137031:
      
      	* gtk/gtkfilesystemunix.c (get_fallback_icon): New helper
      	function, fetches a stock icon as a fallback.
      	(gtk_file_system_unix_volume_render_icon): Fall back to a stock
      	icon.
      	(gtk_file_system_unix_render_icon): Fall back to a stock icon.
      	Use helper functions rather than being a mega-function.
      	(get_icon_name_for_directory): Renamed from
      	get_icon_for_directory().
      	(get_icon_type_from_path): New helper function; code pulled out
      	from gtk_file_system_unix_render_icon().
      	(get_special_icon): Likewise.
      	(get_icon_for_mime_type): Likewise.
      42067dfb
    • Federico Mena Quintero's avatar
      Fix #139290: · b3fbcef8
      Federico Mena Quintero authored
      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.
      b3fbcef8
  6. 22 Jun, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fixes the GTK+ part of #142308: · a2e95582
      Federico Mena Quintero authored
      2004-06-22  Federico Mena Quintero  <federico@ximian.com>
      
      	Fixes the GTK+ part of #142308:
      
      	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_filename_to_path):
      	Use filename_to_path().
      	(gtk_file_system_unix_uri_to_path): Likewise.
      	(filename_to_path): Use remove_trailing_slash().
      a2e95582
  7. 07 Apr, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fix #132500. · d903e89e
      Federico Mena Quintero authored
      2004-04-07  Federico Mena Quintero  <federico@ximian.com>
      
      	Fix #132500.
      
      	* gtk/gtkfilesystem.c (gtk_file_system_parse): Ensure that the
      	passed-in 'str' is not NULL.
      
      	* gtk/gtkfilesystemunix.c (expand_tilde): New helper function;
      	expands "~/" or "~foo/" at the beginning of a filename.
      	(gtk_file_system_unix_parse): Use expand_tilde() before doing
      	anything else.
      
      	* gtk/gtkfilechooserentry.c
      	(gtk_file_chooser_entry_maybe_update_directory): Take in a
      	force_reload argument.
      	(gtk_file_chooser_entry_changed): If gtk_file_system_parse()
      	returns an error, set the file_part_pos to -1.
      	(load_directory_callback): Only populate the model if the
      	file_part_pos is not -1.
      d903e89e
  8. 06 Apr, 2004 1 commit
  9. 29 Mar, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fix #137520. · 7f62edf3
      Federico Mena Quintero authored
      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.
      7f62edf3
  10. 19 Mar, 2004 2 commits
    • Federico Mena Quintero's avatar
      Revert the patch to #137520, as 2.4.1 is for conservative bug fixes only. · da83c1cb
      Federico Mena Quintero authored
      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
      da83c1cb
    • Federico Mena Quintero's avatar
      Fix #137520. · 68030a7e
      Federico Mena Quintero authored
      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.
      68030a7e
  11. 15 Mar, 2004 4 commits
    • Federico Mena Quintero's avatar
      Only hide the "create folder" button in OPEN mode; all the others should · 7cd0c268
      Federico Mena Quintero authored
      2004-03-15  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtk/gtkfilechooserdefault.c (update_appearance): Only hide the
      	"create folder" button in OPEN mode; all the others should show it
      	it.
      	(get_paths_foreach): Handle the editable row.
      
      	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder):
      	Force a re-get of the folder so that the new directory gets added
      	to its hash table of file info.
      7cd0c268
    • Federico Mena Quintero's avatar
      Allow the path to be NULL, so that people can ask for information about a · 084bb2fe
      Federico Mena Quintero authored
      2004-03-14  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtk/gtkfilesystem.c (gtk_file_folder_get_info): Allow the path
      	to be NULL, so that people can ask for information about a
      	parent-less file system root (e.g. get_info (get_folder ("/"), NULL)).
      
      	* gtk/gtkfilesystemunix.c (gtk_file_folder_unix_get_info): Allow
      	the condition describe above.
      
      	* gtk/gtkfilechooserdefault.c (get_file_info): Allow getting
      	information of root paths.
      
      	* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Handle root paths correctly.
      084bb2fe
    • Morten Welinder's avatar
      Kill g_prints. · 538ca81c
      Morten Welinder authored
      538ca81c
    • Federico Mena Quintero's avatar
      Fixes #136185, patch by Morten Welinder, with some changes. · dfa36bb4
      Federico Mena Quintero authored
      2004-03-14  Federico Mena Quintero  <federico@ximian.com>
      
      	Fixes #136185, patch by Morten Welinder, with some changes.
      
      	* gtk/gtkfilechooserdefault.c (check_is_folder): New helper function.
      	(shortcuts_insert_path): Check the path first with check_is_folder().
      	(gtk_file_chooser_default_set_current_folder): Likewise.
      	(gtk_file_chooser_default_add_shortcut_folder): Likewise.
      	(browse_widgets_create): Unref the size group.
      
      	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder):
      	Handle the case where the file exists but it is not a directory.
      	(IconType): Add value for ICON_UNDECIDED.
      	(struct stat_info_entry): New structure to hold a file's struct
      	stat, its MIME type and its icon type.
      	(struct _GtkFileFolderUnix): Added a hash of struct
      	stat_info_entry, and flags to remember which info types we've read
      	so far.
      	(get_icon_type): Use a helper function for the icons-from-stat
      	types.
      	(gtk_file_system_unix_render_icon): Use the cached file info.
      	(gtk_file_folder_unix_get_info): Put the info in the cache.
      	(gtk_file_system_unix_get_folder): Create the cache of file info
      	structures.
      
      	* gtk/gtkfilesystem.c (gtk_file_info_set_display_name): Handle the
      	case where display_name is the same as the existing
      	info->display_name.
      dfa36bb4
  12. 14 Mar, 2004 1 commit
  13. 13 Mar, 2004 1 commit
    • Anders Carlsson's avatar
      Remove trailing slashes in path names. · 72804ba4
      Anders Carlsson authored
      2004-03-13  Anders Carlsson  <andersca@gnome.org>
      
      	* gtk/gtkfilesystemunix.c: (remove_trailing_slash),
      	(gtk_file_system_unix_get_folder),
      	(gtk_file_system_unix_create_folder), (get_parent_dir),
      	(gtk_file_system_unix_get_parent), (gtk_file_folder_unix_get_info):
      	Remove trailing slashes in path names.
      72804ba4
  14. 09 Mar, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fixes #136080. · 57cbeff0
      Federico Mena Quintero authored
      2004-03-08  Federico Mena Quintero  <federico@ximian.com>
      
      	Fixes #136080.
      
      	* gtk/gtkfilesystemunix.c: Only lstat() if stat() failed due to
      	ENOENT.
      	(filename_get_info): Likewise.
      57cbeff0
  15. 08 Mar, 2004 2 commits
    • Morten Welinder's avatar
      Protect errno. · 74a9f1d2
      Morten Welinder authored
      2004-03-08  Morten Welinder  <terra@gnome.org>
      
      	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder,
      	get_icon_type, filename_get_info): Protect errno.
      74a9f1d2
    • Anders Carlsson's avatar
      Use better icons for home and desktop. · 683eff48
      Anders Carlsson authored
      2004-03-08  Anders Carlsson  <andersca@gnome.org>
      
      	* gtk/gtkfilesystemunix.c: (get_icon_for_directory),
      	(gtk_file_system_unix_render_icon):
      	Use better icons for home and desktop.
      683eff48
  16. 06 Mar, 2004 1 commit
  17. 03 Mar, 2004 1 commit
    • Federico Mena Quintero's avatar
      Handle errors in setting the path bar's path. Fixes #136000, based on a · e50fb687
      Federico Mena Quintero authored
      2004-03-02  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtk/gtkfilechooserdefault.c
      	(gtk_file_chooser_default_set_current_folder): Handle errors in
      	setting the path bar's path.  Fixes #136000, based on a patch by
      	Morten Welinder.
      
      	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_insert_bookmark):
      	Don't free our own propagated error.
      
      	* gtk/gtkpathbar.c (gtk_path_bar_set_path): Likewise, and free the
      	parent_path upon error.  Fixes #136006, patch by Morten Welinder.
      	(gtk_path_bar_set_path): Unref the file_folder upon error.
      	(gtk_path_bar_set_path): Return a boolean success code.
      e50fb687
  18. 01 Mar, 2004 1 commit
    • Morten Welinder's avatar
      Only stat when needed. · b45b1536
      Morten Welinder authored
      2004-03-01  Morten Welinder  <terra@gnome.org>
      
      	* gtk/gtkfilesystemunix.c (filename_get_info): Only stat when
      	needed.
      b45b1536
  19. 27 Feb, 2004 1 commit
    • Federico Mena Quintero's avatar
      Added a "position" argument. · c9e88e4e
      Federico Mena Quintero authored
      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.
      c9e88e4e
  20. 14 Feb, 2004 1 commit
  21. 09 Feb, 2004 1 commit
  22. 06 Feb, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fix #132327. · bf54dcdc
      Federico Mena Quintero authored
      2004-02-06  Federico Mena Quintero  <federico@ximian.com>
      
      	Fix #132327.
      
      	* gtk/gtkfilesystemunix.c (struct _GtkFileSystemUnix): Add a
      	folder_hash field to keep a list of live folder objects.
      	(gtk_file_system_unix_init): Create the folder_hash.
      	(gtk_file_system_unix_finalize): Destroy the folder_hash.
      	(gtk_file_system_unix_get_folder): Ref and return an existing
      	folder if we have it around, otherwise return a new folder object.
      	(struct _GtkFileFolderUnix): Add a field for the parent file system.
      	(gtk_file_folder_unix_finalize): Remove the folder from the file
      	system's hash table.
      	(gtk_file_system_unix_create_folder):  Emit "files-added" on the
      	newly-created folder's parent.  Fixes #132327.
      bf54dcdc
  23. 05 Feb, 2004 1 commit
  24. 30 Jan, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fix #129872, based on a patch by Jan Arne Petersen <jpetersen@uni-bonn.de> · 275cf046
      Federico Mena Quintero authored
      2004-01-30  Federico Mena Quintero  <federico@ximian.com>
      
      	Fix #129872, based on a patch by Jan Arne Petersen
      	<jpetersen@uni-bonn.de>
      
      	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_list_bookmarks):
      	Implement.
      	(gtk_file_system_unix_add_bookmark): Implement.
      	(gtk_file_system_unix_remove_bookmark): Implement.
      
      2004-01-29  Federico Mena Quintero  <federico@ximian.com>
      
      	Fixes #132693.
      
      	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_parent): Don't
      	use filename_from_path().  Also, check that the filename is
      	absolute.
      	(gtk_file_system_unix_get_folder): Likewise.
      	(gtk_file_system_unix_create_folder): Likewise.
      	(gtk_file_system_unix_make_path): Likewise.
      	(gtk_file_system_unix_parse): Likewise.
      	(gtk_file_folder_unix_get_info): Likewise.
      	(filename_from_path): Removed.
      275cf046
  25. 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
  26. 17 Jan, 2004 1 commit
    • Federico Mena Quintero's avatar
      Added a has_editable field. (_gtk_file_system_model_add_editable): New · 02cb4554
      Federico Mena Quintero authored
      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.
      02cb4554
  27. 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
  28. 06 Jan, 2004 1 commit
  29. 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
  30. 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
  31. 03 Nov, 2003 1 commit
    • Federico Mena Quintero's avatar
      Add a stock icon to the "Add bookmark" button. · 3dbad630
      Federico Mena Quintero authored
      2003-11-03  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Add a stock
      	icon to the "Add bookmark" button.
      
      	* gtk/gtkfilesystemunix.c: Mark missing strings for translation.
      	* gtk/gtkfilesystemmodel.c: Likewise.
      	* gtk/gtkfilechooser.c: Likewise.
      	* gtk/gtkfilechooserdefault.c: Likewise.
      
      Mon Nov  3 20:56:28 2003  Matthias Clasen  <maclas@gmx.de>
      3dbad630
  32. 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
  33. 20 Oct, 2003 1 commit
    • Federico Mena Quintero's avatar
      New utility function. (gtk_file_system_gnome_vfs_get_folder): Use · 1e49d49a
      Federico Mena Quintero authored
      2003-10-20  Federico Mena Quintero  <federico@ximian.com>
      
      	* gtkfilesystemgnomevfs.c (folder_child_new): New utility
      	function.
      	(gtk_file_system_gnome_vfs_get_folder): Use folder_child_new().
      	(gtk_file_folder_gnome_vfs_get_info): Likewise.
      	(directory_load_callback): Likewise.
      	(monitor_callback): Likewise.
      
      	* TODO: Removed the item about factoring out the code that creates
      	FolderChild structures.
      1e49d49a
  34. 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