Commit Graph

17 Commits

Author SHA1 Message Date
Federico Mena Quintero
863252b654 Don't set a default size for the dialog - Federico 2004-02-14 02:11:47 +00:00
Hans Breuer
2d19ee19be new GTK_STOCK_NETWORK ... gtk/gtkstock.[hc] : ... define ...
2004-01-28  Hans Breuer  <hans@breuer.org>

	* gtk/stock-icons/stock_network_(16|24).png : new GTK_STOCK_NETWORK ...
	  gtk/gtkstock.[hc] : ... define ...
	  gtk/gtkiconfactory.c : ... register ...
	  gtk/stock-icons/Makefile.am gtk/stock-icons/makefile.msc : ... compile ...
	* gtk/gtkfilesystemwin32.c : ... and use. Also adapt to recent
	IFace changes.

	* gtk/gtk.def : added a bunch of new exported symbols

	* tests/testfilechooser.c (no_backup_files_filter) : don't crash
	on filter_info->display_name being NULL

	* tests/testgtk.c : make testgtk --bench=all work again
2004-01-28 21:46:02 +00:00
Hans Breuer
4acd98a836 handle GTK_DATADIR similar as the other filesystem placement 'constants'
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-14 19:03:02 +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
Hans Breuer
947b32b7dc updated added all the new tests
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
2003-11-15 20:35:55 +00:00
Owen Taylor
b3bae3b40a gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: Basic framework
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-23 04:22:32 +00:00
Federico Mena Quintero
b49a5ec5b4 Removed. (gtk_file_system_gnome_vfs_set_bookmarks): Removed.
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-10-18 04:29:40 +00:00
Federico Mena Quintero
9044d774bb Added an API point about needing a way to fetch the hpaned position so we
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-11 00:56:46 +00:00
Federico Mena Quintero
613b441b5b Free the display_key.
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-09 15:18:29 +00:00
Federico Mena Quintero
36dfea8ece Removed the "extra widget" bit, implemented with the following:
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.
2003-09-03 05:52:35 +00:00
Owen Taylor
d97d7df947 Add over-big test case for preview (much of size from a modified copy of
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.
2003-07-23 22:30:32 +00:00
Owen Taylor
733f4489ad File filter objects.
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.
2003-07-23 15:31:10 +00:00
Owen Taylor
7e54248bc3 auto-ize.
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.
2003-07-16 21:07:38 +00:00
Owen Taylor
7f8ae32c1d Add gtk_file_chooser_set_current_name() to set the current entry contents.
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.
2003-07-11 19:18:36 +00:00
Owen Taylor
79491c1d25 Add a construct-only 'file_system' property, split test case into testfilechooser, testfilechooser-vfs 2003-03-26 17:09:26 +00:00
Owen Taylor
bb320fcb5b Add GtkFileSystem::parse, and a chooser entry with completion 2003-03-25 00:11:06 +00:00
Owen Taylor
e3849905a9 Initial revision 2003-03-21 20:34:02 +00:00