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.
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-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.
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.
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 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 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-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-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-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().
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.
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 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.
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 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-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.
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 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.
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
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-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-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 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.
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-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 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.
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.
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.
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 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.
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.
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 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-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-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-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 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.
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-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-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-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.