2008-10-13 Cody Russell <cody@jhu.edu>
* test/testfilechooser.c: Fix option parsing so that -a and
--action work correctly.
svn path=/trunk/; revision=21645
2005-01-24 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-6:
Fix#147785 and clean up the loading code:
* gtk/gtkfilechooserdefault.c (LoadState): Make the set of states
be EMPTY, PRELOAD, LOADING, FINISHED.
(gtk_file_chooser_default_init): Start in the LOAD_EMPTY state.
(struct _GtkFileChooserDefault): Added a pending_select_paths
field.
(load_remove_timer): Add the new states.
(load_setup_timer): Likewise.
(load_timeout_cb): Likewise. Switch to the LOAD_LOADING state.
(browse_files_model_finished_loading_cb): Switch to the
LOAD_FINISHED state.
(enum PendingOp): Removed.
(struct _GtkFileChooserDefault): Removed the pending_op and
pending_select_path fields.
(pending_select_paths_free): New utility function.
(pending_select_paths_add): New utility function.
(gtk_file_chooser_default_finalize): Call
pending_select_paths_free().
(pending_op_queue): Removed.
(pending_op_process): Removed.
(pending_select_paths_process): New function.
(browse_files_model_finished_loading_cb): Call
pending_select_paths_process().
(center_selected_row_foreach_cb): Handle multiple selection by
only centering the first row.
(get_is_file_filtered): Constify.
(gtk_file_chooser_default_select_path): Queue into a list of paths
to select if we are not finished loading.
(show_and_select_paths): New utility function.
(up_folder_handler): Use pending_select_paths_add().
(gtk_file_chooser_default_should_respond): Do not call
pending_op_queue(); free the pending_selected_paths instead.
(gtk_file_chooser_default_initial_focus): Don't queue a pending
operation, and don't select the first row unconditionally --- this
will happen when the folder is done loading.
(shortcuts_row_activated_cb): Free the pending_select_paths.
(pending_select_paths_store_selection): New utility function.
(gtk_file_chooser_default_map): Call
pending_select_paths_store_selection() to save the selection
before reloading the folder.
(select_func): Umm? Call gtk_tree_selection_select_iter(). Don't
move the cursor here; it will be done when processing the pending paths.
* tests/testfilechooser.c (main): Add a button to the command
window to unmap and remap the file chooser.
2004-11-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilefilter.h:
* gtk/gtkfilefilter.c (gtk_file_filter_add_pixbuf_formats):
New convenience function to add a filter for image files
which can be loaded by GdkPixbuf. (#145388, Anders Carlsson)
* tests/testfilechooser.c: Test the image filter.
2004-09-14 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Set the cursor
to the first selected row instead of always to the first row if there
is no cursor. (#143270, Jean Bréfort)
* tests/testfilechooser.c (main): Fix a few typos.
Mon Mar 15 01:50:28 2004 Jonathan Blandford <jrb@gnome.org>
* gtkfilechooserentry.c: Rewritten to use the GtkEntryCompletion
API more correctly. Now pops down the dropdown well.
* gtkfilesystem.c (gtk_file_path_get_type): New boxed type for the
FilePath.
* test/testfilechooser.c: disable preview widget temporarily.
It's not representative of a good preview widget.
Wed Mar 10 02:41:05 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c: (gtk_path_bar_init), (gtk_path_bar_class_init),
(remove_settings_signal), (gtk_path_bar_dispose),
(gtk_path_bar_style_set), (gtk_path_bar_screen_changed),
(gtk_path_bar_scroll_up), (reload_icons), (change_icon_theme),
(settings_notify_cb), (gtk_path_bar_check_icon_theme),
(get_button_image), (gtk_path_bar_update_button_appearance),
(make_directory_button), (gtk_path_bar_check_parent_path): Support
changes in icon themes.
* gtk/gtkpathbar.h: add two elements
* tests/testfilechooser.c: (main): use gnome-vfs method again to
get more testing.
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 Tor Lillqvist <tml@iki.fi>
* tests/testfilechooser.c: Correct localtime_r() emulation on Win32.
Remove a couple of unnecessary Win32-only includes.
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>
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.
Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com>
* tests/testfilechooser.c (set_filename_existing_nonexistent_cb):
Move the /nonexistant stuff out of the main window,
keep the main window somewhat normal looking.
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>
* tests/testfilechooser.c (size_prepared_cb): Don't scale images
that are small enough to fit. Avoid using incompatibly typed data
pointer.
2003-12-14 Hans Breuer <hans@breuer.org>
* gtk/gtkprivate.h gtk/gtkmain.c : handle GTK_DATADIR
similar as the other filesystem placement 'constants' (dynamic
resolving on win32)
* gtk/gtkfilechooserwidget.c : handle file system to win32
renaming here as will
* gtk/gtkfilesystemwin32.c : implement render_icon
* gtk/gtk.def gdk/gdk.def : updated externals
* gdk/win32/gdkdisplay-win32.c : make it compile without
<multimon.h> - i.e. even older sdk
* gdk/win32/gdkevents-win32.c : match resize_timer_proc
with TIMERPROC prototype
* gdk/win32/gdkwindow-win32.c : older msvc does not know
BITMAPV5HEADER (from win xp) either
* gtk/gtkimmodule.c : make it compile even if GTK_LOCALEDIR is
not defined
* tests/testfilechooser.c : recent GLib crashes on
g_print ("%s", NULL) so avoid this
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-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch]
gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]:
gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]:
Basic framework for the new file selector widget.
* gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch]
gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]:
Initial implementation of the GtkFileChooser user interface.
* gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation
for Unix files.
* configure.in gtk/Makefile.am gtk/xdgmime: Build code
for freedesktop.org MIME system on Unix.
* tests/testfilechooser.c: Test program for GtkFileChooser
* tests/prop-editor.c: Add support for properties on interfaces.
2003-10-17 Federico Mena Quintero <federico@ximian.com>
* gtkfilesystemgnomevfs.c
(gtk_file_system_gnome_vfs_get_supports_bookmarks): Removed.
(gtk_file_system_gnome_vfs_set_bookmarks): Removed.
(gtk_file_system_gnome_vfs_add_bookmark): Implement.
(gtk_file_system_gnome_vfs_remove_bookmark): Implement.
* gtkfilechooserprivate.h (struct _GtkFileChooserIface): Replaced
the ::set_shortcut_folders() method with :;add_shortcut_folder()
and ::remove_shortcut_folder().
* gtkfilechooserutils.c (delegate_add_shortcut_folder): New function.
(delegate_remove_shortcut_folder): New function.
(delegate_list_shortcut_folders): New function.
* gtkfilechooserimpldefault.c (create_shortcuts_model): Insert the
Desktop directory as well.
(shortcuts_insert_path): Renamed from shortcuts_append_path; now
takes a position index instead of a parent node iter. Also takes
a GError argument.
(struct _GtkFileChooserImplDefault): Removed the shortcuts_folder
list. It is all kept in the model now.
(shortcuts_append_home): Save whether adding a shortcut for the
home directory was successful.
(shortcuts_append_desktop): Likewise for the desktop.
(shortcuts_append_file_system_roots): Count and save the number of
roots added.
(shortcuts_append_shortcut_folders): Removed.
(gtk_file_chooser_impl_default_add_shortcut_folder): Implement.
(shortcuts_append_bookmarks): Now that we don't have a bookmarks
parent node, don't expand the tree.
(add_bookmark_button_clicked_cb): Use gtk_file_system_add_bookmark().
(remove_bookmark_button_clicked_cb): Use gtk_file_system_remove_bookmark().
(gtk_file_chooser_impl_default_list_shortcut_folders): Get the
folders from the shortcuts model; we no longer keep a separate list.
* gtkfilesystem.h (struct _GtkFileSystemIface): Oops, there
shouldn't be shortcuts-related virtual methods here.
* gtkfilechooser.c (file_paths_to_strings): New helper function.
(gtk_file_chooser_get_filenames): Use file_paths_to_strings().
(gtk_file_chooser_get_uris): Likewise.
(gtk_file_chooser_set_shortcut_folders): Removed.
(gtk_file_chooser_list_shortcut_folders): Return a list of
strings, not of GtkFilePath*.
(gtk_file_chooser_list_shortcut_folder_uris): New function.
(gtk_file_chooser_add_shortcut_folder): New function.
(gtk_file_chooser_remove_shortcut_folder): New function.
(gtk_file_chooser_add_shortcut_folder_uri): New function.
(gtk_file_chooser_remove_shortcut_folder_uri): New function.
(_gtk_file_chooser_add_shortcut_folder): New function.
(_gtk_file_chooser_remove_shortcut_folder): New function.
* gtkfilechooser.h: New enum.
* gtkfilechooser.c (gtk_file_chooser_error_quark): New function.
* gtkfilesystem.c (gtk_file_system_get_supports_bookmarks): Removed.
(gtk_file_system_set_bookmarks): Removed.
(gtk_file_system_add_bookmark): New function.
(gtk_file_system_remove_bookmark): New function.
* gtkfilesystemunix.c
(gtk_file_system_unix_get_supports_bookmarks): Removed.
(gtk_file_system_unix_set_bookmarks): Removed.
(gtk_file_system_unix_add_bookmark): Just a stub for now.
(gtk_file_system_unix_remove_bookmark): Likewise.
* testfilechooser.c (main): Add a shortcut for testing purposes.
2003-09-10 Federico Mena Quintero <federico@ximian.com>
* TODO: Added an API point about needing a way to fetch the hpaned
position so we can save it.
* gtkfilechooser.c (_gtk_file_chooser_get_paths): Fixed API docs.
(gtk_file_chooser_get_uris): Likewise.
(gtk_file_chooser_get_filenames): Likewise.
* gtkfilechooserdialog.c (file_chooser_widget_file_activated): New
callback, calls gtk_window_activate_default().
* testfilechooser.c (response_cb): Print the selected files if the
user clicks OK.
2003-09-08 Federico Mena Quintero <federico@ximian.com>
* gtkfilesystem.c (gtk_file_info_free): Free the display_key.
* gtkfilechooserimpldefault.c (list_mtime_data_func): New
function.
(create_file_list): Add a modification time column; remove the
size column.
(mtime_sort_func): New callback.
(tree_selection_changed): Add a sorting function for the mtime
column. Have the model fetch the modification time as well.
(tree_selection_changed): Do allow the file list model to show
directories.
* testfilechooser.c (my_new_from_file_at_size): Do not try to read
non-regular files.
2003-09-03 Federico Mena Quintero <federico@ximian.com>
* TODO: Removed the "extra widget" bit, implemented with the
following:
* gtkfilechooser.h: Added gtk_file_chooser_{set,get}_extra_widget().
* gtkfilechooser.c (gtk_file_chooser_base_init): Install an
"extra-widget" interface property.
(gtk_file_chooser_set_extra_widget): Implemented.
(gtk_file_chooser_get_extra_widget): Implemented.
* gtkfilechooserutils.h (GtkFileChooserProp): Added
GTK_FILE_CHOOSER_PROP_EXTRA_WIDGET.
* gtkfilechooserutils.c (_gtk_file_chooser_install_properties):
Added the "extra-widget" property.
* gtkfilechooserimpldefault.c (struct _GtkFileChooserImplDefault):
Added an extra_widget field.
(gtk_file_chooser_impl_default_set_property): Handle the
"extra-widget" property.
(gtk_file_chooser_impl_default_get_property): Likewise.
(set_preview_widget): Fix the call gtk_container_remove(). Also,
we don't need to ref/sink/unref the preview widget, as that gets
already done by container_add/remove.
(set_extra_widget): New utility function.
* testfilechooser.c (main): Add an extra widget.
Wed Jul 23 17:52:01 2003 Owen Taylor <otaylor@redhat.com>
* testfilechooser.c: Add over-big test case for preview
(much of size from a modified copy of
gdk_pixbuf_new_from_file_at_size())
* gtkfilechooserutils.[ch] gtkfilechooser.c
gtkfilechooserprivate.h gtkfilechooserimpldefault.c:
Add get_preview_path() as a virtual function; implement
update-preview signal that was in the header file.
* gtkfilechooserimpldefault.c: Finish a simple preview
widget implementation.
Wed Jul 23 11:23:43 2003 Owen Taylor <otaylor@redhat.com>
* gtkfilefilter.[ch]: File filter objects.
* gtkfilechooser.[ch] gtkfilechooserutils.[ch]: Add
file filtering to API.
* gtkfilechooserimpldefault.c: Implement file filters.
* testfilechooser.c: Try out the filter functionality.
* gtkfilesystemmodel.c: Add
_gtk_file_system_model_set_filter() to set a callback
function for filtering.
* gtkfilechooserutils.c: Propagate property notification
to the receiver.
* fnmatch.c: Copy this from GTK+ temporarily to get
UTF-8 pattern matching functionality.
Wed Jul 16 16:50:31 2003 Owen Taylor <otaylor@redhat.com>
* configure.ac Makefile.am: auto-ize.
* xdgmime/: Add freedesktop.org MIME spec implementatin
by Jonathan Blandford.
* gtkfilesystem.[ch]: Add gtk_file_info_render_icon()
gtk_file_info_set/get_icon_type to do icon handling
based on MIME type. Add a simple icon caching system.
* gtkfilesystemgnomevfs.c: Implement ensure_types()
so that extending the set of types for a loaded
directory works. Set the MIME type to get the default
icon handling.
* gtkfilesystemunix.c: Look up the MIME type using
xdgmime.
* gtkfilechooserimpldefault.c: Display icons in the list.
Fri Jul 11 14:37:07 2003 Owen Taylor <otaylor@redhat.com>
* gtkfilechooser.[ch] gtkfilechooserprivate.h
gtkfilechooserimpldefault.c: Add
gtk_file_chooser_set_current_name() to set the current
entry contents.
* *.c: Consistently use '-' not '_' in property names and
signal names.
* gtkfilechooser.c: Document all exported functions.