Commit Graph

284 Commits

Author SHA1 Message Date
Federico Mena Quintero
bbd78cd9a0 Fix #144232:
2004-08-06  Federico Mena Quintero  <federico@ximian.com>

	Fix #144232:

	* gtk/gtkfilechooserdefault.c (save_widgets_create): Use a
	GtkFileChooserEntry for the file name, rather than a GtkEntry.
	(update_chooser_entry): Set the contents of the file chooser entry
	rather than the plain entry's.
	(gtk_file_chooser_default_set_current_folder): Set the new folder
	on the save entry.
	(gtk_file_chooser_default_set_current_name): Set the name on the
	file chooser entry.
	(check_save_entry): Use the file chooser entry rather than the
	plain entry.

	* gtk/gtkfilechooserentry.c
	(_gtk_file_chooser_entry_set_base_folder): Call
	gtk_file_chooser_entry_changed() so that we recompute the current
	folder based on the new base folder.
2004-08-06 19:25:25 +00:00
Federico Mena Quintero
15f23d383c Add a field for an "add to shortcuts" menu item. (popup_menu_detach_cb):
2004-07-29  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault): Add
	a field for an "add to shortcuts" menu item.
	(popup_menu_detach_cb): Clear out the field.
	(file_list_build_popup_menu): Only build the menu here.
	(file_list_update_popup_menu): Build the menu, then update the
	sensitivity of its items.
	(file_list_popup_menu): Use file_list_update_popup_menu().
	(bookmarks_check_add_sensitivity): Also set the sensitivity of the
	popup menu item.  Correctly handle the case for a *single* file.
	Simplify a bit.
	(bookmarks_add_selected_folder): New helper function; code moved
	over from add_bookmark_button_clicked_cb().
	(add_bookmark_button_clicked_cb): Use the function above.
	(selection_check): Rather than returning a boolean value for
	emptiness, actually return the number of selected rows.  Also,
	simplify a bit.
	(get_selected_path): New helper function.
2004-07-29 20:53:52 +00:00
Federico Mena Quintero
db87e3fa90 Store signal IDs in gulongs, not guints!
2004-07-28  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
	Store signal IDs in gulongs, not guints!
	(gtk_file_chooser_default_hierarchy_changed): We now monitor the
	focus widget on our toplevel to know which widget was last focused
	at the time our "should_respond" method gets called.
	(shortcuts_activate_selected): New helper function.
	(shortcuts_get_selected): New helper function.
	(remove_selected_bookmarks): Use shortcuts_get_selected().
	(bookmarks_check_remove_sensitivity): Likewise.
	(shortcuts_reorder): Likewise.
	(shortcuts_activate_iter): Renamed from shortcuts_activate_item().
	Activate by iter, not by item number.
	(save_folder_combo_changed_cb): Use shortcuts_activate_iter().
	(shortcuts_row_activated_cb): Likewise.
	(gtk_file_chooser_default_should_respond): If the last focused
	widget on the toplevel was the shortcuts list, activate the
	selected shortcut.
2004-07-29 01:26:51 +00:00
Matthias Clasen
f0d8fe3a7d Add a new :ellipsize property which controls ellipsization of the rendered
Thu Jul 22 01:42:16 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
	Add a new :ellipsize property which controls ellipsization of the
	rendered text.  (#144835, Vincent Untz, patch by Jonathan Blandford
	and Anders Carlsson

	* gtk/gtkfilechooserdefault.c (create_file_list): Use ellipsization
	for the name column.
2004-07-22 05:45:19 +00:00
Federico Mena Quintero
d319b8f926 Fix #144405, patch by Padraig O'Briain <padraig.obriain@sun.com>:
2004-07-14  Federico Mena Quintero  <federico@ximian.com>

	Fix #144405, patch by Padraig O'Briain <padraig.obriain@sun.com>:

	* gtk/gtkfilechooserdefault.c (shortcuts_list_create): Set the
	accessible object name for the tree view.
	(create_file_list): Likewise.
2004-07-14 17:08:40 +00:00
Federico Mena Quintero
f9d9cc9aac Set a busy cursor while mounting the volume. Also, ref the chooser while
2004-07-13  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
	busy cursor while mounting the volume.  Also, ref the chooser
	while mounting, as we may re-enter.  Fixes #139376.
2004-07-13 18:25:48 +00:00
Federico Mena Quintero
b3fbcef831 Fix #139290:
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.
2004-07-09 00:53:48 +00:00
Matthias Clasen
ed4707d505 Improve positioning of keyboard-activated menus with Xinerama.
Tue Jul  6 02:00:28 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkfilechooserdefault.c (popup_position_func):
	* gtk/gtkentry.c (popup_position_func):
	* gtk/gtktextview.c (popup_position_func): Improve positioning
	of keyboard-activated menus with Xinerama.
2004-07-06 06:02:57 +00:00
Federico Mena Quintero
765d7d0517 Use a Save or an Open stock button for the C-l dialog depending on the
2004-06-22  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save
	or an Open stock button for the C-l dialog depending on the action
	in which the file chooser operates.  Fixes #141753.
2004-06-23 00:28:47 +00:00
Matthias Clasen
9bff92fbcd Don't use contractions like "don't" or "isn't" in error messages. It isn't
Fri Jun 11 22:02:56 2004  Matthias Clasen  <maclas@gmx.de>

	* io-gif.c, io-pnm.c, io-tga.c, io-xpm.c: Don't use
	contractions like "don't" or "isn't" in error messages.
	It isn't nice to use them in log entries either...
	(#137774, Morten Welinder, patch by Alexander Winston)
2004-06-12 02:08:45 +00:00
Federico Mena Quintero
2ec910595c Fixes #143578:
2004-06-11  Federico Mena Quintero  <federico@ximian.com>

	Fixes #143578:

	* gtk/gtkfilesystemmodel.c (_gtk_file_system_model_add_editable):
	Don't ref the editable node.
	(_gtk_file_system_model_remove_editable): Don't unref the editable node.
	(_gtk_file_system_model_remove_editable): Ahem, free the node.

	* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
	Added fields for edited_idle and edited_new_text.
	(renderer_edited_cb): Queue the
	creation of the folder in an idle handler.
	(renderer_editing_canceled_cb): Likewise for the cancellation.
	(gtk_file_chooser_default_finalize): Free the impl->edited_new_text.
2004-06-12 00:49:02 +00:00
Federico Mena Quintero
53684f70cf Change to the newly-created folder. Fixes #138932. (trap_activate_cb):
2004-05-31  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (renderer_edited_cb): Change to the
	newly-created folder.  Fixes #138932.
	(trap_activate_cb): Only return TRUE if we did handle the event.
	Fixes #143359; patch by jylefort@brutele.be.
2004-05-31 18:29:02 +00:00
Anders Carlsson
12b566cec4 Make separator rows insensitive.
2004-05-27  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkfilechooserdefault.c (save_folder_combo_create):
	Make separator rows insensitive.
2004-05-27 13:40:36 +00:00
Federico Mena Quintero
8e6a2b4f6e Fixes #139562, based on a patch by Christian Neumair.
2004-05-04  Federico Mena Quintero  <federico@ximian.com>

	Fixes #139562, based on a patch by Christian Neumair.

	* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault): Add
	a filter_combo_hbox field to contain the filter combo.
	(show_filters): Show/hide the filter_combo_hbox.
	(create_filename_entry_and_filter_combo): Removed.
	(file_pane_create): Create the filter_combo_hbox here.
2004-05-04 17:53:13 +00:00
Federico Mena Quintero
6631943388 Fixes #140412.
2004-04-29  Federico Mena Quintero  <federico@ximian.com>

	Fixes #140412.

	* gtk/gtkfilechooserdefault.c (remove_selected_bookmarks): New
	function; moved the code over from
	remove_bookmark_button_clicked_cb().
	(remove_selected_bookmarks): Now, getting a non-removable bookmark
	is not an error, as we may be called as a result of hitting the
	Delete key.
	(shortcuts_key_press_event_cb): New handler; delete the bookmark
	if the user presses Backspace, Delete, or KP_Delete.
2004-04-29 23:13:50 +00:00
Federico Mena Quintero
6cb9668e69 Use a variant of the code from gtkfilesel.c to parse a "text/uri-list"
2004-04-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (split_uris): Use a variant of the
	code from gtkfilesel.c to parse a "text/uri-list" blob.  Fixes
	#140126.
2004-04-15 19:17:50 +00:00
Federico Mena Quintero
f37b0a1d97 Use a title for SAVE and CREATE_FOLDER modes. Fixes #137272.
2004-04-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (location_popup_handler): Use a
	title for SAVE and CREATE_FOLDER modes.  Fixes #137272.
2004-04-06 03:15:21 +00:00
Federico Mena Quintero
a0f3ee5660 Make the new-folder button say "Create Fo_lder" rather than "Create
2004-04-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (file_pane_create): Make the
	new-folder button say "Create Fo_lder" rather than "Create
	_Folder", so that the mnemonic doesn't conflict with the "Save in
	_folder" label.  Fixes #136975.
2004-04-06 02:52:08 +00:00
Federico Mena Quintero
8e661364c6 Fix #136077.
2004-04-01  Federico Mena Quintero  <federico@ximian.com>

	Fix #136077.

	* gtk/gtkpathbar.h (struct _GtkPathBarClass): Add a
	"child_is_hidden" boolean argument to the "path-clicked" signal.

	* gtk/gtkpathbar.c (struct _ButtonData): Added a file_is_hidden
	field.
	(make_directory_button): Take a file_is_hidden argument; put it in
	the ButtonData.
	(_gtk_path_bar_set_path): See whether each path component path is
	a hidden file.
	(gtk_path_bar_class_init): Add the file_is_hidden argument to the
	"path-clicked" signal.
	(button_clicked_cb): See if the downwards button represents a
	hidden file for the file_is_hidden argument in the signal
	emission.

	* gtk/gtkmarshalers.list: Added a signal type VOID:POINTER,BOOLEAN.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_select_path): If we fail to switch
	folders, don't try to select the path in the file system model.
	Also, return the result from _gtk_file_system_model_path_do().
	(gtk_file_chooser_default_select_path): Turn on show_hidden in the
	file system model if we are asked to select a hidden file.
	(path_bar_clicked): Show hidden files based on whether the
	immediate downwards folder in the path bar is a hidden file
	itself.
	(struct _GtkFileChooserDefault): Added fields
	browse_files_popup_menu and browse_files_popup_menu_hidden_files_item.
	(create_file_list): Set an object data key of
	"GtkFileChooserDefault" on the tree view so that we can find the
	impl from the popup menu callbacks.  Also, hook up to the
	"button-press-event" and "popup-menu" signals in the file list to
	bring up a popup menu.
	(list_popup_menu_cb): New callback.
	(list_button_press_event_cb): New callback.

	Fix #138763:

	* gtk/gtkfilesystemmodel.c
	(_gtk_file_system_model_new): Oops, connect_object to
	"finished-loading".
2004-04-02 00:35:07 +00:00
Federico Mena Quintero
7f62edf379 Fix #137520.
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.
2004-03-29 19:52:16 +00:00
Federico Mena Quintero
e38ade9299 Just use the file under the cursor; we don't need the logic from
2004-03-25  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (check_preview_change): Just use the
	file under the cursor; we don't need the logic from
	GtkFileSelection after all.  Fixes #132255.
2004-03-25 21:52:04 +00:00
Federico Mena Quintero
cd486d396f Fill the location entry with the display name of the file under the cursor
2004-03-25  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (location_entry_create): Fill the
	location entry with the display name of the file under the cursor
	for Open mode, or the typed filename in Save mode.
2004-03-25 21:36:02 +00:00
Federico Mena Quintero
da83c1cbf3 Revert the patch to #137520, as 2.4.1 is for conservative bug fixes only.
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
2004-03-19 21:16:24 +00:00
Morten Welinder
f1c18d57d6 Test existance of the path after checking for locality, if needed.
2004-03-19  Morten Welinder  <terra@gnome.org>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_current_folder): Test existance of
	the path after checking for locality, if needed.
2004-03-19 20:18:09 +00:00
Federico Mena Quintero
68030a7ee7 Fix #137520.
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.
2004-03-19 19:41:06 +00:00
Morten Welinder
72d48463da Free volumes not actually put into the shortcut list.
2004-03-17  Morten Welinder  <terra@gnome.org>

	* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free
	volumes not actually put into the shortcut list.
2004-03-17 21:52:29 +00:00
Morten Welinder
8d3344036c Do nothing if we have no screen. Fixes #137260.
2004-03-17  Morten Welinder  <terra@gnome.org>

	* gtk/gtkfilechooserdefault.c (check_icon_theme): Do nothing if we
	have no screen.  Fixes #137260.
	(shortcuts_add_bookmark_from_path): Simplify using check_is_folder
	thereby fixing leak.  Fixes #137259.
2004-03-17 15:34:21 +00:00
Federico Mena Quintero
7cd0c2686d Only hide the "create folder" button in OPEN mode; all the others should
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.
2004-03-15 23:15:31 +00:00
Federico Mena Quintero
3e3ca55535 In the Save modes, set the Name entry of the file chooser if we get a
2004-03-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (update_from_entry): In the Save
	modes, set the Name entry of the file chooser if we get a
	nonexistent filename from the file entry.  Fixes #135911.
	(gtk_file_chooser_default_set_current_name): Oops, this should
	also work if we are in CREATE_FOLDER mode.

	* gtk/gtkfilesystem.c (gtk_file_path_real_copy): Use
	gtk_file_path_copy().

	* gtk/gtkfilechooserentry.c (check_completion_callback): Free the
	path that we got from the model.
	(completion_match_func): Use DISPLAY_NAME_COLUMN rather than a
	hard-coded constant.
2004-03-15 19:23:54 +00:00
Federico Mena Quintero
77c7092489 Only show the title string in OPEN/SELECT_FOLDER mode as it's
Mon Mar 15 12:51:17 2004  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtkfilechooserdefault.c (location_popup_handler): Only show
	the title string in OPEN/SELECT_FOLDER mode as it's open-specific.
	Put a blank title for SAVE/CREATE_FOLDER; we are in string freeze,
	so we'll fix it for 2.4.1 as #137272.

	* gtk/gtkpathbar.c (gtk_path_bar_scroll_down): calculate
	space_available correctly for RTL mode.  w/o this, you can't
	scroll down again.  Fixes #137021.

2004-03-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkpathbar.c (gtk_path_bar_scroll_up): Queue a resize.
	(gtk_path_bar_scroll_down): Likewise.
2004-03-15 18:12:51 +00:00
Jonathan Blandford
e8095cc81b set changing_folders to be true so we don't trigger a callback when we
Mon Mar 15 10:35:19 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): set
        changing_folders to be true so we don't trigger a callback when we
        remove the selection
        (shortcuts_add_bookmarks): ditto
2004-03-15 16:27:45 +00:00
Jonathan Blandford
486fc4fe45 implement correctly. (completion_match_func): Allow surpressing popdowns.
Mon Mar 15 08:48:48 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserentry.c (match_selected_callback): implement
        correctly.
        (completion_match_func): Allow surpressing popdowns.
        (maybe_append_seperator_to_path): New function to add a separator
        item to a display_name.  Bad hack.
        (check_completion_callback): Implement select-ahead as an idle.
        (add_completion_idle): new function to handle select-ahead
        (gtk_file_chooser_entry_do_insert_text): starf the select-ahead
        idle.
        (gtk_file_chooser_entry_focus): Override tab for completion.
        (gtk_file_chooser_entry_activate): commit select_ahead when
        activated.

        * gtk/gtkfilechooserdefault.c (location_popup_handler): grab the
        appropriate widget for the mode.
2004-03-15 14:10:45 +00:00
Mark McLoughlin
2d23e05a46 remove the unused "lowest_folder" GtkFileChooserDefault member. Leftover
2004-03-15  Mark McLoughlin  <mark@skynet.ie>

        * gtk/gtkfilechooserdefault.c: remove the unused "lowest_folder"
        GtkFileChooserDefault member. Leftover from my original patch
        for bug #136987.
2004-03-15 09:07:59 +00:00
Federico Mena Quintero
f956e3ae0a Renamed from shortcuts_unselect_all(); now selects the row that
2004-03-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_find_current_folder):
	Renamed from shortcuts_unselect_all(); now selects the row that
	corresponds to the current folder, if any.  Fixes #135916.

	* gtk/gtkpathbar.h: Added prototypes for _gtk_path_bar_up() and
	_gtk_path_bar_down().
2004-03-15 06:51:58 +00:00
Federico Mena Quintero
0abde22904 Surround the drag-outside-to-remove-bookmarks code with "#if 0" blocks;
2004-03-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c: Surround the
	drag-outside-to-remove-bookmarks code with "#if 0" blocks; it's
	too unstable right now.
2004-03-15 06:29:33 +00:00
Owen Taylor
2c9d190c09 Implement local_only by filtering the shortcuts and bookmarks list by
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.
2004-03-15 06:09:40 +00:00
Federico Mena Quintero
084bb2fe39 Allow the path to be NULL, so that people can ask for information about a
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.
2004-03-15 05:42:51 +00:00
Owen Taylor
f8b3e6fe42 Add _gtk_path_bar_up()/ _gtk_path_bar_down().
Sun Mar 14 21:03:15 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkpathbar.[ch]: Add _gtk_path_bar_up()/
        _gtk_path_bar_down().

        * gtk/gtkfilechooserdefault.c: Use _gtk_path_bar_up()/
        _gtk_path_bar_down() as bindings for Alt-Up
        and new Alt-Down. (Partly based on a patch by
        Mark McLoughlin, #136987)
2004-03-15 02:12:08 +00:00
Federico Mena Quintero
dfa36bb4e4 Fixes #136185, patch by Morten Welinder, with some changes.
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.
2004-03-15 02:09:22 +00:00
Morten Welinder
79d73b1349 Damn cvs. 2004-03-14 19:50:11 +00:00
Morten Welinder
df8b419ecf Don't crash on NULL path; don't crash on NULL error.
2004-03-14  Morten Welinder  <terra@gnome.org>

	* gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL
	path; don't crash on NULL error.
2004-03-14 19:47:20 +00:00
Federico Mena Quintero
2de434104e Put the trash icon on the right for LTR locales, or on the left for RTL.
2004-03-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_drag_set_delete_cursor):
	Put the trash icon on the right for LTR locales, or on the left
	for RTL.
	(shortcuts_drag_motion_cb): Cancel the idle handler here as well.
	(shortcuts_drag_leave_cb): Test whether the idle is present.
	(shortcuts_drag_data_received_cb): Ahem, don't assert here.
2004-03-12 00:13:16 +00:00
Federico Mena Quintero
b4a6705a8c Put the trash icon on the right for LTR locales, or on the left for RTL.
2004-03-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_drag_set_delete_cursor):
	Put the trash icon on the right for LTR locales, or on the left
	for RTL.
	(shortcuts_drag_motion_cb): Cancel the idle handler here as well.
	(shortcuts_drag_leave_cb): Test whether the idle is present.
2004-03-12 00:03:48 +00:00
Jonathan Blandford
865d3dd267 revert earlier change to insert_path so that we test that the directory
Thu Mar 11 16:18:51 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): revert
        earlier change to insert_path so that we test that the directory
        exists.

        * gtk/gtkfilechooserdialog.c
        (gtk_file_chooser_dialog_constructor): move focus.
2004-03-11 21:23:16 +00:00
Federico Mena Quintero
df0510a89f New function, copied from gtkpathbar.c.
2004-03-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (remove_settings_signal): New
	function, copied from gtkpathbar.c.
	(gtk_file_chooser_default_dispose): Use remove_settings_signal()
	rather than our own code.
	(gtk_file_chooser_default_screen_changed): Use
	remove_settings_signal(); this should handle per-screen settings
	correctly.
2004-03-11 20:03:38 +00:00
Federico Mena Quintero
b35220fda0 Use a single OK button, not a Close button, as per the HIG.
2004-03-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (error_message_with_parent): Use a
	single OK button, not a Close button, as per the HIG.

	* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Likewise.
2004-03-11 18:48:46 +00:00
Federico Mena Quintero
4cfd0030b6 Oops, initialize "action" before jumping. Fixes #136900.
2004-03-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_drag_motion_cb): Oops,
	initialize "action" before jumping.  Fixes #136900.
2004-03-11 18:13:51 +00:00
Federico Mena Quintero
1135bef0da Fix #135912 and #135913.
2004-03-11  Federico Mena Quintero  <federico@ximian.com>

	Fix #135912 and #135913.

	* gtk/gtkfilechooserdefault.c
	(shortcuts_filter_model_row_draggable): Implement.
	(shortcuts_model_filter_new): New function, create a
	ShortcutsModelFilterClass derived from GtkTreeModelFilter, so that
	we can implement our own DnD interface methods.
	(shortcuts_model_create): Use shortcuts_model_filter_new().
	(shortcuts_list_create): Enable the shortcuts list as a drag
	source.
	(file_list_source_targets): Renamed from shortcuts_targets.
	(shortcuts_list_create): Change the options for
	gtk_drag_dest_set().  Connect to more drag signals so that we can
	implement drops by hand.
	(shortcuts_drag_data_delete_cb): New handler; just stop the emission.
	(shortcuts_drag_motion_cb): New handler; validate the drop.
	(shortcuts_drag_leave_cb): New handler; unset the drag_dest_row.
	(shortcuts_drag_drop_cb): New handler; just stop the emission and
	remove the idle handler for the drag cursor.
	(shortcuts_add_bookmark_from_path): Add a position argument,
	return a boolean success code.
	(shortcuts_drag_data_received_cb): Handle two cases:  1) Insert
	the bookmarks at the proper position, rather than always appending
	them to the list; 2) alternatively, reorder the bookmarks.
	(struct _GtkFileChooserDefault): New field shortcuts_drag_outside.
	(shortcuts_drag_motion_cb): Turn off impl->shortcuts_drag_outside.
	(shortcuts_drag_leave_cb): Turn on impl->shortcuts_drag_outside in
	an idle handler.
	(shortcuts_drag_end_cb): New handler; remove the selected bookmark.
2004-03-11 06:24:15 +00:00
Jonathan Blandford
976647fdd4 up the width of the entry a tad.
Thu Mar 11 01:08:25 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (location_entry_create): up the
        width of the entry a tad.

        * gtk/gtkfilechooserentry.c (gtk_file_chooser_entry_init): use
        gtk_entry_completion_selection_changed.  Also, unref the
        completion as we were leaking a reference to it.
2004-03-11 06:08:28 +00:00
Federico Mena Quintero
6e30693cd9 Use an untranslatable "%x" for dates, rather than a custom format. Fixes
2004-03-10  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): Use an
	untranslatable "%x" for dates, rather than a custom format.  Fixes
	#136357.
2004-03-10 18:35:07 +00:00
Morten Welinder
5babb8607f Add comment. 2004-03-10 17:58:56 +00:00
Morten Welinder
3f5ec9fe02 Test validity of path here. (shortcuts_insert_path): Don't check here.
2004-03-10  Morten Welinder  <terra@gnome.org>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_add_shortcut_folder): Test validity of
	path here.
	(shortcuts_insert_path): Don't check here.
	(get_file_info): Barf if name-only fails.
2004-03-10 17:55:16 +00:00
Jonathan Blandford
5d8863bbac use uri instead of the pathname for UTF-8 safety.
Wed Mar 10 00:24:24 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (error_dialog): use uri instead of
        the pathname for UTF-8 safety.
2004-03-10 05:24:23 +00:00
Jonathan Blandford
382bf3a113 Always check to see if the shortcuts exists. We don't want to put invalid
Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
        check to see if the shortcuts exists.  We don't want to put
        invalid dirs in the shortcuts pane.
2004-03-10 05:19:29 +00:00
Jonathan Blandford
e76bb1c3c7 remove unneeded shortuts_swin;
Tue Mar  9 16:40:34 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
        remove unneeded shortuts_swin;
2004-03-10 03:43:58 +00:00
Federico Mena Quintero
b82008a037 Fix #136533.
2004-03-09  Federico Mena Quintero  <federico@ximian.com>

	Fix #136533.

	* gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): New
	function.
	(check_icon_theme): New helper function, installs a handler for
	changes in the icon theme.
	(gtk_file_chooser_default_style_set): Use check_icon_theme().
	(gtk_file_chooser_default_screen_changed): Use check_icon_theme().
	(gtk_file_chooser_default_dispose): Disconnect from GtkSettings.
	(change_icon_theme): New function, updates impl->icon_size and
	reloads the icons.
	(struct _GtkFileChooserDefault): New field settings_signal_id.
	(struct _GtkFileChooserDefault): New field icon_size.
	(shortcuts_insert_path): Use impl->icon_size.
	(list_icon_data_func): Likewise.
2004-03-09 21:22:42 +00:00
Federico Mena Quintero
22bc71a667 Handle the returned parent_path being NULL. Fixes #136662.
2004-03-09  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (get_file_info): Handle the returned
	parent_path being NULL.  Fixes #136662.
2004-03-09 19:47:09 +00:00
Federico Mena Quintero
ace5e30238 Stop the emission so that GtkTreeView's handler won't try to poke the
2004-03-09  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_drag_data_received_cb):
	Stop the emission so that GtkTreeView's handler won't try to poke
	the filter model.  Fixes #136127.
2004-03-09 19:10:20 +00:00
Federico Mena Quintero
caf66b3ddd Use gtk_tree_view_set_cursor().
2004-03-08  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_initial_focus): Use
	gtk_tree_view_set_cursor().
2004-03-08 23:16:03 +00:00
Federico Mena Quintero
8383c8f7fe Patch "1a" from #136185, by Morten Welinder.
2004-03-08  Federico Mena Quintero  <federico@ximian.com>

	Patch "1a" from #136185, by Morten Welinder.

	* gtk/gtkfilechooserdefault.c (get_file_info): Take in an argument
	that says whether the caller just wants the display name.
	(shortcuts_insert_path): We only want the name in the call to
	get_file_info().

	* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Don't request more
	info than needed from the file_folder.
2004-03-08 22:53:35 +00:00
Federico Mena Quintero
2247fc6659 Fixes #136105.
2004-03-08  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136105.

	* gtk/gtkfilechooserembed.h (struct _GtkFileChooserEmbedIface):
	Added an ::initial_focus() method.

	* gtk/gtkfilechooserembed.c
	(_gtk_file_chooser_embed_delegate_iface_init): Set the
	initial_focus method.
	(delegate_initial_focus): Implement.
	(_gtk_file_chooser_embed_initial_focus): New function.

	* gtk/gtkfilechooserdialog.c
	(gtk_file_chooser_dialog_constructor): Call
	_gtk_file_chooser_embed_initial_focus().

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
	Install the ::initial_focus() handler.
	(gtk_file_chooser_default_initial_focus): Implement.
2004-03-08 22:21:47 +00:00
Federico Mena Quintero
4bab88cda4 Return a boolean success code. (location_popup_handler): Refocus the file
2004-03-08  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
	boolean success code.
	(location_popup_handler): Refocus the file chooser if appropriate.
	Fixes #135905.
	(save_widgets_create): Don't set the text of the save_folder_label
	here.
	(update_appearance): Set the text here as appropriate for the save
	mode.  Also fixes #136387.
	(update_appearance): Don't show the Create Folder button in
	SELECT_FOLDER mode.
	(update_appearance): Show the extra widget in all Save modes
	correctly.
2004-03-08 20:06:50 +00:00
Jonathan Blandford
59938d927c new function to consolidate creating the path_bar.
Mon Mar  8 04:50:12 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (create_path_bar): new function to
        consolidate creating the path_bar.
        (gtk_file_chooser_default_set_current_folder): no longer need to
        pass in the filesystem.

        * gtk/gtkpathbar.h: Removed unused set_pixbuf functions in favor
        of just setting the filesystem.

        * gtk/gtkpathbar.c (gtk_path_bar_finalize): Free root path and
        home_dir.
        (get_button_image): Add images to path_bar.
        (update_button_appearance): use images
        (make_directory_button): Clasify buttons based upon location.
        (_gtk_path_bar_set_path): no longer need a file-system.  Also, add
        rerooting, #135845, #135914

        * tests/testfilechooser.c: Fix reused error handling.
2004-03-08 09:56:34 +00:00
Jonathan Blandford
afec1da061 actually use gtk_button_add.
Sun Mar  7 17:38:03 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkbutton.c (gtk_button_class_init): actually use
        gtk_button_add.

        * gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
        use the uri, not the path, #136317
        (renderer_edited_cb): ditto
        (shortcuts_add_bookmark_from_path): ditto
        (remove_bookmark_button_clicked_cb): ditto
        (gtk_file_chooser_default_remove_shortcut): ditto
        (update_from_entry): ditto
        (up_folder_handler): ditto
2004-03-07 22:49:44 +00:00
Jonathan Blandford
9e379cfd40 set redraw_on_allocate, #135902.
Sun Mar  7 16:07:08 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set
        redraw_on_allocate, #135902.

        * gtk/gtkfilesystemmodel.c (model_refilter_recurse): Patch from
        Damon Chaplin to set a node to be visible before emitting the
        inserted signal, #135555.
2004-03-07 21:26:32 +00:00
Jonathan Blandford
58db7b1f62 stop activate from unselecting rows when pressed in multiple-selection
Sun Mar  7 14:34:04 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (trap_activate_cb): stop activate
        from unselecting rows when pressed in multiple-selection mode.
2004-03-07 19:38:49 +00:00
Jonathan Blandford
eb258fe24c if action is SELECT_FOLDER, then return the currentd folder if none is
Sun Mar  7 03:03:57 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c
        (gtk_file_chooser_default_get_paths): if action is
        SELECT_FOLDER, then return the currentd folder if none is
        selected.
        (gtk_file_chooser_default_should_respond): Allow 'Ok' to be hit if
        no directory is selected in SELECT_FOLDER mode.
2004-03-07 08:15:09 +00:00
Jonathan Blandford
0b231feb1c remove unneeded elements. (tree_selection_changed): removed
Sat Mar  6 23:31:18 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
        remove unneeded elements.
        (tree_selection_changed): removed
        (tree_name_data_func): removed
        (gtk_file_chooser_default_finalize): don't unref dir model
        (create_folder_tree): removed
        (get_selection): no longer need to abstract away the selection
        function.
        (create_file_list): We now create a tree for all actions.
        (file_pane_create): Make one tree.
        (update_appearance) We really change the mode only, now.
2004-03-07 04:41:36 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Jonathan Blandford
48bfdd5174 scroll to the new path.
Fri Mar  5 18:00:36 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): scroll
        to the new path.

        * gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update the
        allocation when scrolling instead of cancelling editing.
2004-03-05 23:02:01 +00:00
Federico Mena Quintero
385bd6a54e Add gboolean return values and GError arguments to ::set_current_folder()
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserIface): Add
	gboolean return values and GError arguments to
	::set_current_folder() and ::select_path().

	* gtk/gtkfilechooser.c (gtk_file_chooser_set_current_folder):
	Return a boolean value for success/failure.
	(gtk_file_chooser_set_current_folder_uri): Likewise.
	(gtk_file_chooser_select_filename): Likewise.
	(gtk_file_chooser_select_uri): Likewise.
	(gtk_file_chooser_set_filename): Likewise.
	(gtk_file_chooser_set_uri): Likewise.
	(_gtk_file_chooser_set_current_folder_path): Likewise, plus take
	in a GError.
	(_gtk_file_chooser_select_path): Likewise.

	* gtk/gtkfilechooserutils.c (delegate_set_current_folder):
	Likewise.
	(delegate_select_path): Likewise.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_select_path): Likewise.
	(gtk_file_chooser_default_set_current_folder): Likewise.
	(error_changing_folder_dialog): New helper function.
	(change_folder_and_display_error): New helper function.
	(switch_to_selected_folder): Use change_folder_and_display_error().
	(tree_selection_changed): Likewise.
	(shortcuts_activate_volume): Likewise.
	(shortcuts_activate_item): Likewise.
	(list_row_activated): Likewise.
	(path_bar_clicked): Likewise.
	(update_from_entry): Likewise.
	(up_folder_handler): Likewise.
	(home_folder_handler): Get the home path from the shortcuts model,
	and use change_folder_and_display_error().

	* tests/testfilechooser.c (set_current_folder): New helper
	function; pops up a simple error dialog if necessary.
	(set_filename): Likewise.
	(set_folder_nonexistent_cb): Use set_current_folder().
	(set_folder_existing_nonexistent_cb): Likewise.
	(set_filename_nonexistent_cb): Use set_filename().
	(set_filename_existing_nonexistent_cb): Likewise.
2004-03-05 20:47:05 +00:00
Michael Natterer
800f0e6197 s/object/widget/. Makes it compile again.
2004-03-05  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_show_all):
	s/object/widget/. Makes it compile again.
2004-03-05 09:49:00 +00:00
Jonathan Blandford
5d50d3d16f chain to the extra_widget.
Fri Mar  5 03:37:14 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_show_all):
        chain to the extra_widget.
2004-03-05 08:37:11 +00:00
Jonathan Blandford
233b7b8be6 Patch from Damon Chaplin to free models when we're finalized, #134053
Fri Mar  5 02:53:41 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
        Patch from Damon Chaplin to free models when we're finalized,
        #134053
2004-03-05 07:58:36 +00:00
Alexander Larsson
8a8798bdbc Document the fact that there might not be a volume for all paths.
2004-03-05  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
	Document the fact that there might not be a volume for all
	paths.

	* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
	Don't assume there is a volume for all paths.
2004-03-05 07:46:06 +00:00
Jonathan Blandford
8bb74888d6 insert in the correct place instead of naïvely appending.
Fri Mar  5 01:45:04 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
        the correct place instead of naïvely appending.
        (shortcuts_add_volumes): refilter the model
        (shortcuts_add_bookmarks): refilter the model
        (gtk_file_chooser_default_add_shortcut_folder): refilter the model
2004-03-05 06:51:22 +00:00
Federico Mena Quintero
d64c7c08a8 New handler. Ask the GtkFileChooser widget if it wants to do something
2004-03-04  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdialog.c (response_cb):  New handler.  Ask the
	GtkFileChooser widget if it wants to do something special rather
	than letting us terminate the dialog.
	(gtk_file_chooser_dialog_init): Connect to "response"; see the
	comment in the sources to see why we don't override the method in
	class_init.

	* gtk/gtkfilechooserembed.h (struct _GtkFileChooserEmbedIface):
	Added a ::should_respond() method.

	* gtk/gtkfilechooserembed.c
	(_gtk_file_chooser_embed_delegate_iface_init): Add a delegate for ::should_respond().
	(delegate_should_respond): New delegate.
	(_gtk_file_chooser_embed_should_respond): New function.

	* gtk/gtkfilechooserdefault.c (set_list_model, create_file_list):
	Use dashes in signal names rather than underscores.
	(gtk_file_chooser_default_init): Hook up our ::should_respond() implementation.
	(gtk_file_chooser_default_should_respond): Implement.  go into a
	folder rather than responding if we are in File mode and the
	selected file is a folder.
	(get_selection): New helper function.
	(add_bookmark_button_clicked_cb): Use get_selection().
	(bookmarks_check_add_sensitivity): Likewise.
	(gtk_file_chooser_default_get_paths): Likewise.
	(check_save_entry): New helper function.
	(gtk_file_chooser_default_get_paths): Use check_save_entry().
	(selection_check): Renamed from selection_is_folders().  Now
	checks whether the selection is empty, all files, all folders.
	(bookmarks_check_add_sensitivity): Use selection_check().
2004-03-05 00:10:59 +00:00
Jonathan Blandford
b1ac4367f5 show the 'New Folder' button in SAVE mode again.
Thu Mar  4 15:20:55 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (update_appearance): show the 'New
        Folder' button in SAVE mode again.
2004-03-04 21:29:51 +00:00
Jonathan Blandford
778d6904c4 Modified patch from muppet <scott@asofyet.org> to keep child directories
Thu Mar  4 01:32:19 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkpathbar.c (gtk_path_bar_set_path): Modified patch from
        muppet <scott@asofyet.org> to keep child directories around if we
        change to a child.

        * gtk/gtkpathbar.c (_gtk_path_bar_set_home_icon): Start of
        icon-setting functions.  Not used yet.
        (_gtk_path_bar_set_root_icon): Ditto.
2004-03-04 06:47:54 +00:00
Jonathan Blandford
e47f7d5827 Don't activate the combo if we're in the midst of changing folders.
Wed Mar  3 16:06:03 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (save_folder_combo_changed_cb):
        Don't activate the combo if we're in the midst of changing
        folders.
2004-03-03 21:09:46 +00:00
Jonathan Blandford
bb5a499944 Split function into realized and unrealized variants, and consolidate the
Tue Mar  2 23:39:55 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdialog.c
        (file_chooser_widget_default_realized_size_changed): Split
        function into realized and unrealized variants, and consolidate
        the handling fo size-changing and default changing.

        * gtk/gtkfilechooserembed.[ch] (gtk_file_chooser_embed_class_init):
        remove resizable-hints-changed, as it just complicated things.

        * gtk/gtkfilechooserdefault.c (update_appearance): Don't emit
        resizable-hints-changed.
2004-03-03 04:52:01 +00:00
Federico Mena Quintero
e50fb68763 Handle errors in setting the path bar's path. Fixes #136000, based on a
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.
2004-03-03 00:38:19 +00:00
Jonathan Blandford
e8c5b64836 set the default value, spotted by Morten Welinder.
Tue Mar  2 15:19:52 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserdefault.c
        (gtk_file_chooser_default_get_resizable_hints): set the default
        value, spotted by Morten Welinder.
2004-03-02 20:24:27 +00:00
Jonathan Blandford
87a6680f33 get the logic correct. This will fix sizing on save dialogs.
Tue Mar  2 15:03:15 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserdefault.c
        (gtk_file_chooser_default_get_resizable_hints): get the logic
        correct.  This will fix sizing on save dialogs.

        (save_widgets_create): set_mnemonic_widget.
2004-03-02 20:09:20 +00:00
Federico Mena Quintero
9133c58b8d Don't update the save folder combo if we are already switching folders;
2004-03-02  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_current_folder): Don't update the
	save folder combo if we are already switching folders; based on a
	patch by Jonathan Blandford.

	* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
	Handle failure to insert the path.  Based on a patch by Morten
	Welinder attached to bug #135380.

	* tests/testfilechooser.c (extra_widget_create): Add a bunch of
	buttons to test various things.
2004-03-02 20:05:08 +00:00
Morten Welinder
c0b55fe0d8 Major thinko, trivial patch. /me chances a commit.
2004-03-02  Morten Welinder  <terra@gnome.org>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_resizable_hints): Test the
	resize_horizontally pointer, not the deferenced pointer.
2004-03-02 16:14:53 +00:00
Federico Mena Quintero
af409998b8 New flag shortcuts_current_folder_is_volume.
2004-03-01  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault): New
	flag shortcuts_current_folder_is_volume.
	(shortcuts_add_current_folder): Set
	impl->shortcuts_current_folder_is_volume as appropriate.
	(remove_current_folder_cb): Handle the flag.
	(shortcuts_activate_item): Likewise.
	(shortcuts_update_current_folder): Handle the
	impl->shortcuts_current_folder_active flag; only add the folder if
	it doesn't already exist in the list.
	(shortcuts_model_create): Don't insert the current folder
	separator here.
	(shortcuts_add_current_folder): Insert the separator here.
	(shortcut_find_position): Renamed from shortcut_exists(); now
	returns an index.
	(shortcuts_add_current_folder): Set the active item in the combo.
2004-03-02 05:27:51 +00:00
Federico Mena Quintero
4e08da819d Eep, use gtk_tree_model_filter_convert_iter_to_child_iter(), not the
2004-03-01  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_row_activated_cb): Eep,
	use gtk_tree_model_filter_convert_iter_to_child_iter(), not the reverse.
2004-03-02 03:06:07 +00:00
Federico Mena Quintero
7233e912e2 Don't unref an old model; there isn't one. This was a leftover from when
2004-03-01  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_model_create): Don't
	unref an old model; there isn't one.  This was a leftover from
	when we recreated the model on every change.
	(save_widgets_create): Create the save folder combo.
	(shortcuts_model_create): Don't set the model on the tree view
	here.
	(gtk_file_chooser_default_constructor): Create the shortcuts model
	here, before the rest of the widgets.
	(shortcuts_list_create): Don't call shortcuts_model_create() here;
	just set the model on the tree.
	(save_folder_combo_create): New function, provided by Jonathan
	Blandford.
	(update_appearance): Set the sensitivity of the folder combo.
	(shortcuts_activate_iter): New helper function; code moved from
	shortcuts_row_activated_cb().
	(shortcuts_activate_item): New helper function.
	(shortcuts_row_activated_cb): Use shortcuts_activate_iter().
	(ShortcutsIndex): Renamed SHORTCUTS_SEPARATOR to
	SHORTCUTS_BOOKMARKS_SEPARATOR.
	(struct _GtkFileChooserDefault): New field shortcuts_current_folder_active.
	(shortcuts_insert_separator): Add a position argument.
	(shortcuts_get_index): Handle the SHORTCUTS_CURRENT_FOLDER_SEPARATOR
	and SHORTCUTS_CURRENT_FOLDER positions.
	(shortcut_exists): Ignore the current folder row.
	(struct _GtkFileChooserDefault): New field shortcuts_filter_model.
	(shortcuts_model_create): Create a filter model for the shortcuts list.
	(shortcuts_list_create): Set the model to the shortcuts_filter_model.
	(remove_bookmark_button_clicked_cb): Use the shortcuts_filter_model.
	(bookmarks_check_remove_sensitivity): Likewise.
	(shortcuts_row_activated_cb): Likewise.
	(gtk_file_chooser_default_set_current_folder): New function.
	(gtk_file_chooser_default_set_current_folder): Update the current
	folder row in the shortcuts list.

	* gtk/gtkfilechooserwidget.c
	(gtk_file_chooser_widget_constructor): Cast correctly for
	_gtk_file_chooser_embed_set_delegate().
2004-03-02 02:59:02 +00:00
Jonathan Blandford
a11c1bd6f3 only store the size if we can resize in that direction.
Mon Mar  1 16:51:21 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserdialog.c
        (file_chooser_widget_default_size_changed): only store the size if
        we can resize in that direction.
2004-03-01 21:52:04 +00:00
Owen Taylor
945e6c4ecb Based on patch by Alex Larsson
Mon Mar  1 14:16:52 2004  Owen Taylor  <otaylor@redhat.com>

        Based on patch by Alex Larsson

        * gtk/gtkfilechooserdefault.c: Use gtk-file-chooser-backend
        GtkSetting to set the backend if the app doesn't specify one.

        * gdk/x11/gdkevents-x11.c gtk/gtksettings.c:
        Add Gtk/FileChooserBackend.
2004-03-01 19:40:47 +00:00
Federico Mena Quintero
0775cd28a3 Test for filter_info.uri correctly. Fixes #135379, pointed out by Damon
2004-03-01  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (list_model_filter_func): Test for
	filter_info.uri correctly.  Fixes #135379, pointed out by Damon
	Chaplin.
	(shortcuts_get_index): Compute the bookmarks index correctly.
	Fixes #135714, pointed out by Damon Chaplin.
	(gtk_file_chooser_default_list_shortcut_folders): Handle the case
	with no shortcuts, and don't run off the end of the list if there
	are no bookmarks and their separator.  Fixes #135572, patch by
	Damon Chaplin.
2004-03-01 18:24:06 +00:00
Jonathan Blandford
8f190fbf2f Handle shrinking/growing.
Mon Mar  1 12:05:54 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserdialog.c
        (file_chooser_widget_resizable_hints_changed): Handle
        shrinking/growing.
2004-03-01 17:08:19 +00:00
Jonathan Blandford
7359903ef0 Add g_return_if_fail() (_gtk_file_chooser_embed_get_resizable_hints): Add
Sun Feb 29 01:51:27 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserembed.c
        (_gtk_file_chooser_embed_get_default_size):  Add g_return_if_fail()
        (_gtk_file_chooser_embed_get_resizable_hints): Add g_return_if_fail()

        * gtk/gtkfilechooserdialog.c
        (file_chooser_widget_default_size_changed): Get the correct
        initial size for the dialog.  Also, don't bother with
        gtk_window_set_default_size().  It's not really meaningful.

        * gtk/gtkfilechooserdefault.c
        (gtk_file_chooser_default_get_default_size): Get the correct
        spacing for the preview_widget
        (update_preview_widget_visibility): Clear widget field after we
        destroy it.
2004-02-29 07:55:24 +00:00
Federico Mena Quintero
17e840f79c Handle GTK_FILE_CHOOSER_PROP_USE_PREVIEW_LABEL.
2004-02-29  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_property): Handle
	GTK_FILE_CHOOSER_PROP_USE_PREVIEW_LABEL.
	(gtk_file_chooser_default_get_property): Likewise.
	(struct _GtkFileChooserDefault): Added fields for preview_label,
	use_preview_label, preview_display_name, preview_box.  Removed
	preview_frame.
	(set_preview_widget): Reorder the widget in relation to the label.
	(update_preview_widget_visibility): Create or destroy the preview
	label.
	(check_preview_change): Update impl->preview_display_name and the
	label.
	(find_good_size_from_style): Use the preview_box.
	(gtk_file_chooser_default_finalize): Free
	impl->preview_display_name.
	(gtk_file_chooser_default_init): Initialize
	impl->use_preview_label.

	* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Add a
	"use-preview-label" property.
	(gtk_file_chooser_set_use_preview_label): New function.  This sets
	whether one wants the file chooser to display a stock label with
	the previewed filename.  Apps that do really fancy previews can
	turn this off and draw the name themselves.
	(gtk_file_chooser_get_use_preview_label): New function.
	(gtk_file_chooser_get_preview_widget_active): Documentation fix.

	* gtk/gtkfilechooserutils.h (GtkFileChooserProp): Add a
	GTK_FILE_CHOOSER_PROP_USE_PREVIEW_LABEL value.

	* gtk/gtkfilechooserutils.c
	(_gtk_file_chooser_install_properties): Override the
	"use-preview-label" property.
2004-02-29 06:35:15 +00:00
Federico Mena Quintero
e403f769d5 Use "Name" for the title of the filename column. (create_file_list):
2004-02-28  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (create_folder_tree): Use "Name" for
	the title of the filename column.
	(create_file_list): Likewise.
2004-02-29 02:59:05 +00:00
Federico Mena Quintero
8a7f716aa4 Removed. (list_name_data_func): Don't call the function above.
2004-02-28  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (set_cell_text_bold_if_folder):
	Removed.
	(list_name_data_func): Don't call the function above.
	(list_mtime_data_func): Likewise.
2004-02-29 02:16:58 +00:00
Jonathan Blandford
0cfdc7fb2b New private interface to help negotiate the default size of the widget.
Fri Feb 27 18:46:27 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserembed.h: New private interface to help
        negotiate the default size of the widget.  Still a bit buggy, but
        better than the old behavior.

        * gtk/gtkfilechooserdefault.c: Implement the embed interface.

        * gtk/gtkfilechooserwidget.c: Proxy the embed interface.

        * gtk/gtkfilechooserdialog.c: Use the embed interface.
2004-02-27 23:51:16 +00:00
Federico Mena Quintero
c9e88e4e67 Added a "position" argument.
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.
2004-02-27 20:48:22 +00:00
Jonathan Blandford
d40eda7e87 Add two more folder modes to the enum.
Thu Feb 26 18:25:57 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
        modes to the enum.

        * gtk/gtkfilechooser.c (gtk_file_chooser_set_folder_mode): Remove.
        (gtk_file_chooser_get_folder_mode): Remove
2004-02-26 23:35:05 +00:00
Jonathan Blandford
4d5baf9f63 move the expander code.
Wed Feb 25 16:00:40 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (update_appearance): move the
        expander code.
2004-02-25 21:05:30 +00:00
Jonathan Blandford
2ef8bbc976 use gtk_widget_push/pop_composite_child around internal buttons.
Wed Feb 25 03:52:58 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkpathbar.c: use gtk_widget_push/pop_composite_child around
        internal buttons.

        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
        rename some widgets to make it clear where they are packed.
        (update_appearance): New function to handle all the 'logic' of
        layout in one place.  We aren't trying to keep all our properties
        in sync.
        (gtk_file_chooser_default_set_property): use update_appearance()
2004-02-25 08:55:48 +00:00
Federico Mena Quintero
903e2de0c3 Renamed from create_shortcuts_model(). (struct _GtkFileChooserDefault):
2004-02-24  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_model_create): Renamed
	from create_shortcuts_model().
	(struct _GtkFileChooserDefault): Renamed the shortcuts_tree field
	to shortcuts_list.
	(shortcuts_list_create): Renamed from shortcuts_tree_create().
	(create_file_list): Enable the tree view as a model drag source.
	(create_folder_tree): Likewise.

	* gtk/gtkfilesystemmodel.c (_gtk_file_system_model_get_type):
	Register the drag source interface.
	(drag_source_iface_init): New function.
	(drag_source_row_draggable): New function.
	(drag_source_drag_data_get): New function.
2004-02-25 03:03:11 +00:00
Federico Mena Quintero
359748bd27 Use a plain GtkEntry for the filename, not a GtkFileChooserEntry.
2004-02-24  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (save_widgets_create): Use a plain
	GtkEntry for the filename, not a GtkFileChooserEntry.
	(update_chooser_entry): Use gtk_entry_set_text() rather than
	_gtk_file_chooser_entry_set_file_part().
	(gtk_file_chooser_default_set_current_name): Likewise.
	(gtk_file_chooser_default_set_current_folder): Don't set the base
	folder of the entry, and don't call update_chooser_entry().
	(gtk_file_chooser_default_get_paths): Use the plain entry.
	(save_widgets_create): Store the "Save in Folder" label in the
	impl structure.
	(expander_activate_cb): Set the sensitivity of the label and
	combo.
	(save_widgets_create): Connect to "notify::expanded" rather than
	"activate" on the expander.
	(expander_changed_cb): Renamed from expander_activate_cb().  Flip
	the conditions again...
2004-02-24 20:30:54 +00:00
Anders Carlsson
0cc7bb4f20 Fix compilation (#135278, Padraig O'Briain).
2004-02-24  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkfilechooserdefault.c: (shortcuts_insert_separator):
	Fix compilation (#135278, Padraig O'Briain).
2004-02-24 11:48:13 +00:00
Anders Carlsson
4ce7278ecf Translate the desktop label.
2004-02-24  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkfilechooserdefault.c: (shortcuts_append_desktop):
	Translate the desktop label.

	(shortcuts_get_index), (shortcuts_add_bookmarks),
	(shortcuts_insert_separator), (create_shortcuts_model):
	Don't show the bookmark separator if there are no bookmarks.
2004-02-24 10:11:47 +00:00
Jonathan Blandford
6f75d838e8 Make the dialog look like the nautilus dialog. (expander_activate_cb): get
Tue Feb 24 01:41:30 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (location_popup_handler): Make the
        dialog look like the nautilus dialog.
        (expander_activate_cb): get the order correct.
2004-02-24 06:47:51 +00:00
Federico Mena Quintero
e4e9e08caf Call bookmarks_check_add_sensitivity(). (shortcut_exists): New helper
2004-02-23  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (list_selection_changed): Call
	bookmarks_check_add_sensitivity().
	(shortcut_exists): New helper function; moved the testing code
	over from bookmarks_check_add_sensitivity().
	(bookmarks_check_add_sensitivity): Check the contents of the
	selection in the file/folder list.  Use shortcut_exists().
	(shortcuts_add_bookmark_from_path): Don't insert the bookmark if
	the path is already in the shortcuts list.
	(add_bookmark_button_clicked_cb): Add the bookmarks from the list
	selection or from the current folder, as appropriate.
2004-02-24 03:37:32 +00:00
Jonathan Blandford
93732fb225 Add mnemonics. Sorry translators.
Mon Feb 23 21:09:06 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (shortcuts_pane_create): Add
        mnemonics.  Sorry translators.
2004-02-24 02:09:20 +00:00
Anders Carlsson
d6286bc3c4 Improve bookmark list rendering by controlling the visibility of the
2004-02-24  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkfilechooserdefault.c: (shortcuts_insert_path),
	(shortcuts_remove_rows), (shortcuts_append_bookmarks),
	(create_shortcuts_model), (shortcuts_tree_create),
	(gtk_file_chooser_default_remove_shortcut_folder):
	Improve bookmark list rendering by controlling the visibility
	of the pixbuf cell so that it will be invisible for the separator
	row, also use a list store instead of a tree store for the model
	so we won't get unnecessary space for an expander.
2004-02-24 00:15:23 +00:00
Jonathan Blandford
95e7d61e6b use a size group when allocating space for the buttons at the bottom just
Mon Feb 23 17:52:43 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (main_paned_create): use a size
        group when allocating space for the buttons at the bottom just in
        case.  Also, move the filter to below the file list.
2004-02-23 22:56:55 +00:00
Jonathan Blandford
6b5ba8d25d Seth was confused by keybindings. They should be Alt, not Ctl. Also,
Mon Feb 23 16:52:12 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c
        (gtk_file_chooser_default_class_init): Seth was confused by
        keybindings.  They should be Alt, not Ctl.  Also, A-Home should go
        home, not up.
2004-02-23 22:07:55 +00:00
Jonathan Blandford
4b041f8241 Display the root a bit more cleanly.
Mon Feb 23 15:23:23 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkpathbar.c (gtk_path_bar_set_path): Display the root a bit
        more cleanly.

        * gtk/gtkpathbar.h (struct _GtkPathBarClass): fix the signal.
2004-02-23 20:24:01 +00:00
Federico Mena Quintero
fa72f157ac Rework the user interface of the file chooser, as per Seth Nickell's
2004-02-23  Federico Mena Quintero  <federico@ximian.com>

	Rework the user interface of the file chooser, as per
	Seth Nickell's design.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_class_init): Add binding signals and bindings:
		"location-popup" - C-l
		"up-folder"      - C-Up
		"home-folder"    - C-Home
	(up_folder_handler): New function; moved the code from up_button_clicked().
	(up_button_clicked_cb): Call up_folder_handler().
	(home_folder_handler): New function.
	(location_popup_handler): New function.
	(struct _GtkFileChooserDefault): Add an hpaned field.
	(gtk_file_chooser_default_set_current_name): Check that we are in
	Save mode.
	(save_widgets_create): New function, create the widgets specific
	to Save mode.
	(main_paned_create): New function, create the hpaned's widgets here.
	(gtk_file_chooser_default_constructor): Create the open and save
	widgets, and show only one set.
	(gtk_file_chooser_default_set_property): Show/hide the save widgets.
	(gtk_file_chooser_default_get_paths): Only pay attention to the
	entry in Save mode.
	(update_chooser_entry): Update the entry only in Save mode.
	(entry_activate): Removed.
2004-02-23 19:55:49 +00:00
Jonathan Blandford
decffc9d95 Use the GtkPathBar by default now.
Mon Feb 23 02:08:42 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (file_pane_create): Use the
        GtkPathBar by default now.

        * gtk/gtkpathbar.c (gtk_path_bar_set_path): Correctly set the
        current path from the path.
        (gtk_path_bar_class_init): new signal
        (button_clicked_cb): emit the signal when we're selected.
        (gtk_path_bar_clear_buttons): Fix a crasher when we weren't
        clearing thr first_scrolled_button.
2004-02-23 07:11:31 +00:00
Jonathan Blandford
b379bc580e conditional compile for GtkPathBar
Fri Feb 20 18:20:22 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c: conditional compile for GtkPathBar

        * gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Clean up
        allocation code.  Works fully in RTL languages, I think.
        (gtk_path_bar_scroll_up): Scroll up.
        (gtk_path_bar_scroll_down): Scroll down.
2004-02-20 23:21:01 +00:00
Alexander Larsson
0300bfdc32 Desktop directory is not translated. (set_tree_model): There might not be
2004-02-20  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkfilechooserdefault.c: (shortcuts_append_desktop):
	Desktop directory is not translated.
	(set_tree_model):
	There might not be volumes for all paths.
	* gtk/gtkfilechooserwidget.c:
	(gtk_file_chooser_widget_constructor):
	Use gtk_file_chooser_set_current_folder to set cwd.
2004-02-20 07:52:56 +00:00
Alexander Larsson
824548f1e4 Remove old file-system property. Add new file-system-backend string
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.
2004-02-19 07:43:39 +00:00
Federico Mena Quintero
4c35b74301 Renamed from create_shortcuts_tree(). (shortcuts_pane_create): New
2004-02-18  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_tree_create): Renamed
	from create_shortcuts_tree().
	(shortcuts_pane_create): New function.
	(button_new): Renamed from toolbar_button_new().
	(shortcuts_pane_create): New function, create the whole shortcuts
	pane here.
	(current_folder_create): Renamed from toolbar_create().  Don't
	create the bookmarks buttons here.
	(file_pane_create): New function.
	(gtk_file_chooser_default_constructor): Use the new helper
	functions, and don't use an extra vbox as GtkFileChooserDefault is
	already a vbox.
2004-02-19 03:22:22 +00:00
Federico Mena Quintero
e27a88458f Free the filters. Fixes #133547, patch by Morten Welinder
2004-02-10  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
	Free the filters.  Fixes #133547, patch by Morten Welinder
	<mortenw@gnome.org>.
2004-02-10 19:48:38 +00:00
Federico Mena Quintero
87c45c73b1 Fixes the entry-related part of #133852.
2004-02-10  Federico Mena Quintero  <federico@ximian.com>

	Fixes the entry-related part of #133852.

	* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't change
	the file part of the entry if the selected item is a folder.
2004-02-10 18:29:11 +00:00
Federico Mena Quintero
76108bc3da Request GTK_FILE_INFO_ALL from the file system model, so that arbitrary
2004-02-09  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (set_list_model): Request
	GTK_FILE_INFO_ALL from the file system model, so that arbitrary
	filtering will work.  Perhaps we should have a way of aggregating
	info types to the model as filters get installed.
2004-02-09 21:58:26 +00:00
Federico Mena Quintero
11ad0f9d65 Fix #132256.
2004-02-09  Federico Mena Quintero  <federico@ximian.com>

	Fix #132256.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_paths): Read the contents of the
	filename entry in both OPEN and SAVE mode.  In multiple-selection
	mode, add this to the selection from the file/folder list.
	(struct get_paths_closure): Add a path_from_entry field.
	(get_paths_foreach): Only add the iterated path if it is not the
	same as the path from the entry.
2004-02-09 20:31:38 +00:00
Jonathan Blandford
0180cce7f9 clean up the packing of the file selector.
Fri Feb  6 23:40:24 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (create_file_list): clean up the
        packing of the file selector.
2004-02-07 17:28:36 +00:00
Federico Mena Quintero
fd05813a0f Free the list. Fixes #133546.
2004-02-06  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free the
	list.  Fixes #133546.
2004-02-06 16:21:39 +00:00
Federico Mena Quintero
07de591757 Fix #132247.
2004-01-23  Federico Mena Quintero  <federico@ximian.com>

	Fix #132247.

	* gtk/gtkfilechooserdefault.c (set_select_multiple): Handle folder
	mode.
	(set_select_multiple): Optionally notify about changes to the
	select-multiple property.
	(list_selection_changed): Change the condition for the editable row to
	test for save mode; this is more clear than testing for not being
	in multiple selection mode.
	(gtk_file_chooser_default_get_paths): Get impl->action directly
	rather than calling gtk_file_chooser_get_action().
	(entry_activate): Likewise.
	(set_select_multiple): Annotate about #133255.
	(update_chooser_entry): Likewise.
	(check_preview_change): Likewise.
	(tree_selection_changed): Likewise.
2004-01-23 20:15:05 +00:00
Federico Mena Quintero
56913b4b3b Free the path fields.
2004-01-21  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
	Free the path fields.

	* gtk/gtkfilesystemmodel.c (gtk_file_system_model_finalize): Free
	the root_path, reported by <scott@asofyet.org>
	(gtk_file_system_model_finalize): Unref the file system.

	* gtk/gtkfilefilter.c (filter_rule_free): default:
	g_assert_not_reached().
	(gtk_file_filter_finalize): Free the filter->name, reported by
	<scott@asofyet.org>
	(gtk_file_filter_finalize): Free the rules list.
2004-01-22 02:39:31 +00:00
Federico Mena Quintero
45e6ab2d84 Fix #131418.
2004-01-19  Federico Mena Quintero  <federico@ximian.com>

	Fix #131418.

	* gtk/gtkfilechooserdefault.c (set_select_multiple): New helper
	function.
	(gtk_file_chooser_default_set_property): Use
	set_select_multiple().  Also, re-set this mode to single if the
	file chooser is set to Save mode.
	(entry_activate): Handle the case where the entry is completely
	empty *and* its current folder does exist.  Also, there is need to
	test for select_multiple here now that we ensure that it won't
	happen during Save mode.
2004-01-20 02:44:58 +00:00
Federico Mena Quintero
02cb455471 Added a has_editable field. (_gtk_file_system_model_add_editable): New
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.
2004-01-17 04:34:49 +00:00
Federico Mena Quintero
c6860c111b Do not allow setting select_multiple when in Save mode. (set_list_model):
2004-01-16  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_property): Do not allow setting
	select_multiple when in Save mode.
	(set_list_model): No need to nullify the list_model and
	sort_model.
	(gtk_file_chooser_default_get_paths): Handle folder mode as well.
	(get_paths_foreach): Likewise.

	* gtk/gtkfilechooser.c (gtk_file_chooser_get_filename): Clarify
	documentation about folder mode.
	(gtk_file_chooser_get_uri): Likewise.
2004-01-16 05:12:21 +00:00
Federico Mena Quintero
f2f12b9aae New get_volume_for_path() method. (struct _GtkFileSystemIface): Finally
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.
2004-01-16 03:35:33 +00:00
Jan Arne Petersen
77cbf47adf add REMOVABLE column to the shortcuts_model.
2004-01-07  Jan Arne Petersen  <jpetersen@uni-bonn.de>

        * gtk/gtkfilechooserdefault.c: (shortcuts_insert_path),
        (shortcuts_append_home), (shortcuts_append_desktop),
        (shortcuts_append_paths), (shortcuts_add_volumes),
        (shortcuts_append_bookmarks), (create_shortcuts_model),
        (gtk_file_chooser_default_add_shortcut_folder): add REMOVABLE column
        to the shortcuts_model.

        (remove_bookmark_button_clicked_cb),
        (bookmarks_check_remove_sensitivity): use REMOVABLE column to check if
        bookmarks can be removed. Fixes #129873
2004-01-07 17:07:18 +00:00
Federico Mena Quintero
96b8f1c176 Oops, call shortcuts_add_bookmarks() here.
2004-01-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_append_bookmarks): Oops,
	call shortcuts_add_bookmarks() here.
	(remove_bookmark_button_clicked_cb): Ahem, fetch the selected
	iter.
	(shortcuts_append_paths): Don't display error dialogs here.
	(create_file_list): Remove the @#$% rules hint.
2004-01-06 05:13:31 +00:00
Federico Mena Quintero
50e38e513a New helper function. (toolbar_create): Do not use a toolbar widget, just
2004-01-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (toolbar_button_new): New helper
	function.
	(toolbar_create): Do not use a toolbar widget, just an hbox
	instead.  Add the bookmarks buttons and the current folder label
	here.
	(create_filename_entry_and_filter_combo): Create the filter combo
	here.
	(filter_create): Don't show the filter combo initially.
	(up_button_cb): Renamed from toolbar_up_cb().
	(create_shortcuts_buttons): Removed.
2004-01-06 04:18:42 +00:00
Christian Neumair
0e08ebc7d4 Use ngettext for plurals (#123847). 2003-12-31 16:02:22 +00:00
Federico Mena Quintero
700335123a Make show_all() work for the extra and preview widgets; reported by Paolo
2003-12-29  Federico Mena Quintero  <federico@ximian.com>

	Make show_all() work for the extra and preview widgets; reported
	by Paolo Maggi.

	* gtk/gtkfilechooserdefault.c (set_preview_widget): show_all() the
	preview widget.
	(set_extra_widget): show_all() the extra widget.
2003-12-29 20:55:01 +00:00
Federico Mena Quintero
f615072cde Use g_date_strftime() for UTF-8 correctness; use Julian dates to simplify
2003-12-19  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): Use
	g_date_strftime() for UTF-8 correctness; use Julian dates to
	simplify the function.
2003-12-19 17:38:54 +00:00
Federico Mena Quintero
8baf8571b5 Added a "volumes-changed" signal. Added the following methods:
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().
2003-12-17 05:55:16 +00:00
Federico Mena Quintero
c9c99b3f1b Added toolbar items for the filter separator and the filter item.
2003-12-10  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
	Added toolbar items for the filter separator and the filter item.
	(toolbar_create): Add the filter widgets here.
	(filter_create): Renamed from create_filter().  Don't store the
	alignment in the impl structure, just return it.
	(toolbar_show_filters): New function.
	(gtk_file_chooser_default_add_filter): Use toolbar_show_filters().
	(gtk_file_chooser_default_remove_filter): Likewise.
	(gtk_file_chooser_default_constructor): Don't create the filter
	widget here.
	(struct _GtkFileChooserDefault): Added a field for a current
	folder label.
	(gtk_file_chooser_default_constructor): Create the folder label.
	(gtk_file_chooser_default_set_current_folder): Set the current
	folder label.

	* tests/testfilechooser.c (main): Dramatically improved the
	usability of the extra widget through careful word choice.
2003-12-10 20:49:44 +00:00
Federico Mena Quintero
6a97a16921 Use "Home" rather than "Username's Home" (#125964).
2003-12-09  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_append_home): Use "Home"
	rather than "Username's Home" (#125964).
	(shortcuts_selection_changed_cb): New callback, check the
	sensitivity of the Remove Bookmark button at the right time.
	(shortcuts_row_activated_cb): It is not necessary to check the
	sensitivity here.
2003-12-10 03:46:30 +00:00
Jan Arne Petersen
dd03351616 Use the behavior of the GtkFileSelection to determine selected paths in
2003-12-08  Jan Arne Petersen  <jpetersen@uni-bonn.de>

	* gtk/gtkfilechooserdefault.c:
	(gtk_file_chooser_default_get_paths), (entry_activate): Use the
	behavior of the GtkFileSelection to determine selected paths in
	single selected, GTK_FILE_CHOOSER_ACTION_SAVE mode.

2003-12-08  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_paths): Don't declare the closure
	struct twice.
	(get_paths_foreach): Likewise.
2003-12-08 23:38:57 +00:00
Federico Mena Quintero
bfa64d0cde Decouple impl->current_folder from the selection in the folder tree. This
2003-12-01  Federico Mena Quintero  <federico@ximian.com>

	Decouple impl->current_folder from the selection in the folder
	tree.  This is so that going to /home/federico/.foo (e.g. from a
	bookmark) will work even if show_hidden == FALSE.  The folder tree
	needs to be fixed in this case to show such folders explicitly.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_current_folder): When changing
	folders, do the entry and list model work here, instead of
	tree_selection_changed().
	(struct _GtkFileChooserDefault): Added a changing_folder flag
	again, dum de dum.
	(tree_selection_changed): Use _gtk_file_chooser_set_current_folder_path().
2003-12-02 04:23:06 +00:00
Federico Mena Quintero
c5dc8cf660 Patch from Hans-Petter Jansson <hpj@ximian.com> to align the bookmarks
2003-12-01  Federico Mena Quintero  <federico@ximian.com>

	Patch from Hans-Petter Jansson <hpj@ximian.com> to align the
	bookmarks buttons with the location entry.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_constructor): Use a GtkSizeGroup for the
	bookmarks buttons and the location entry.
2003-12-01 18:57:17 +00:00
Federico Mena Quintero
3efec0d69e Set the shortcuts tree as a drag destination.
2003-12-01  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (create_shortcuts_tree): Set the
	shortcuts tree as a drag destination.
	(shortcuts_drag_data_received_cb): New callback.
	(get_file_info): Also fetch information on whether the file is a folder.
	(add_bookmark_button_clicked_cb): Use error_could_not_add_bookmark_dialog().
	(error_could_not_add_bookmark_dialog): New function.
	(shortcuts_add_bookmark_from_path): New helper function.
	(add_bookmark_button_clicked_cb): Use shortcuts_add_bookmark_from_path().
	(shortcuts_row_activated): We no longer need the changing_folder flag.
	(struct _GtkFileChooserDefault): Likewise.
2003-12-01 15:33:37 +00:00
Federico Mena Quintero
e2240850e8 Fixes to problems reported by Iain Holmes:
2003-11-19  Federico Mena Quintero  <federico@ximian.com>

	Fixes to problems reported by Iain Holmes:

	* gtk/gtkfilechooserdefault.c (shortcuts_append_desktop): Do not
	throw up an error dialog if the desktop doesn't exist.
	(error_message): Handle the case where there is no real toplevel
	yet.
	(list_model_filter_func): Always let folders pass through (patch
	by Dave Malcolm).
2003-11-19 22:38:31 +00:00
Federico Mena Quintero
a4cc4cd1da Turn off the dialog's separator (thanks to Iain Holmes).
2003-11-19  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_init): Turn
	off the dialog's separator (thanks to Iain Holmes).
2003-11-19 20:45:17 +00:00
Federico Mena Quintero
a3976b68b6 Added a render_icon virtual method.
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.
2003-11-19 17:03:32 +00:00
Federico Mena Quintero
b550a979d0 Take in a path as well. Use a helper function. (shortcuts_append_home):
2003-11-03  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (error_dialog): Take in a path as
	well.  Use a helper function.
	(shortcuts_append_home): Display an error box if necessary.
	(shortcuts_append_desktop): Likewise.
	(add_bookmark_button_clicked_cb): Likewise.
	(gtk_file_chooser_default_select_path): Likewise.
	(entry_activate): Likewise.
	(shortcuts_append_paths): New helper function.
	(shortcuts_append_file_system_roots): Use
	shortcuts_append_paths().
	(shortcuts_append_bookmarks): Likewise.
2003-11-04 01:56:56 +00:00
Federico Mena Quintero
3dbad630ac Add a stock icon to the "Add bookmark" button.
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>
2003-11-03 20:24:04 +00:00
Federico Mena Quintero
f8e51f984b Removed. (create_shortcuts_tree): Don't call the above.
2003-11-03  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_select_folder): Removed.
	(create_shortcuts_tree): Don't call the above.
	(bookmarks_changed_cb): Likewise.
	(tree_selection_changed): Unselect everything from the shortcuts
	list.  This is the behavior that Mac OS has.
	(toolbar_add_item): Return the item.
	(toolbar_create): Store the up_button in the impl structure.
	(toolbar_check_sensitivity): New function to set the sensitivity
	of the "Up" button in the toolbar.
	(tree_selection_changed): Call toolbar_check_sensitivity().
2003-11-03 18:46:18 +00:00