summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooser.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix whitespace in a blurb. (#319499, Francisco Javier F. Serrador)Matthias Clasen2005-10-251-2/+2
| | | | | | | 2005-10-25 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Fix whitespace in a blurb. (#319499, Francisco Javier F. Serrador)
* Fixes bug #317999:Federico Mena Quintero2005-10-071-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-10-07 Federico Mena Quintero <federico@ximian.com> Fixes bug #317999: * tests/autotestfilechooser.c (test_reload_sequence): Ensure that the the result of gtk_file_chooser_get_folder() is NULL or non-NULL at the right times. Log the tests. (test_button_folder_states): New test for the initial states of the current folder in GtkFileChooserButton. (main): Test that the number of warnings/errors/critical errors is zero. * gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder): Clarify the documentation on when this can return NULL. (gtk_file_chooser_get_current_folder_uri): Likewise. * gtk/gtkfilechooserbutton.c (struct _GtkFileChooserButtonPrivate): Added a folder_has_been_set flag; we use it to keep track of whether a folder has been set. (gtk_file_chooser_button_map): Implement. If no folder has been loaded before, we at least try to load $cwd here. (gtk_file_chooser_button_constructor): If the construct-time dialog already has a folder set, turn on our folder_has_been_set flag. (dialog_current_folder_changed_cb): Turn on our folder_has_been_set flag.
* Add some docs. (#316001, Guillaume Cottenceau)Matthias Clasen2005-09-131-3/+12
| | | | | | | 2005-09-13 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Add some docs. (#316001, Guillaume Cottenceau)
* Intern some more strings.Matthias Clasen2005-09-011-6/+6
| | | | | | | | | 2005-09-01 Matthias Clasen <mclasen@redhat.com> * gdk/*.c: Intern some more strings. * gtk/gtkintl.h: * gtk/*.c: Define an I_() macro and use it instead of the bulky g_intern_static_string().
* Intern type names in code generated by glib-mkenums, too.Matthias Clasen2005-08-311-1/+1
| | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * gdk/Makefile.am: * gtk/Makefile.am: Intern type names in code generated by glib-mkenums, too. * gtk/*.c: * gdk/x11/*.c: * gdk/*.c: Intern type names before registering the type to avoid unnecessary copies.
* Clarify the usage of this function. (gtk_file_chooser_set_uri): Likewise.Federico Mena Quintero2005-07-221-19/+68
| | | | | | | | | | | | | | 2005-07-21 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilechooser.c (gtk_file_chooser_set_filename): Clarify the usage of this function. (gtk_file_chooser_set_uri): Likewise. (gtk_file_chooser_set_current_name): Likewise. * gtk/gtkfilechooserdefault.c (set_file_system_backend): Instrument this function for profiling as well. (gtk_file_chooser_default_init): Likewise; just to have a marker of where instance initialization begins.
* Add the new functions.Federico Mena Quintero2005-07-151-6/+5
| | | | | | 2005-07-15 Federico Mena Quintero <federico@ximian.com> * gtk/gtk.symbols: Add the new functions.
* Add overwrite confirmation for SAVE mode. Fixes bug #152850:Federico Mena Quintero2005-07-151-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-07-14 Federico Mena Quintero <federico@ximian.com> Add overwrite confirmation for SAVE mode. Fixes bug #152850: * gtk/gtkfilechooser.h: Add prototypes for gtk_file_chooser_set/get_do_overwrite_confirmation(). (GtkFileChooserConfirmation): New enum for the result of the "confirm-overwrite" signal. * gtk/gtkmarshalers.list: Add ENUM:VOID. * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Add a "do-overwrite-confirmation" boolean property. (gtk_file_chooser_set_do_overwrite_confirmation): Implement. (gtk_file_chooser_get_do_overwrite_confirmation): Implement. (confirm_overwrite_accumulator): New accumulator for the signal. * gtk/gtkfilechooserutils.h (GtkFileChooserProp): Add GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION. * gtk/gtkfilechooserutils.c (_gtk_file_chooser_install_properties): Override the do-overwrite-confirmation property. * gtk/gtkfilechooserprivate.h (struct _GtkFileChooserIface): Add a confirm_overwrite signal to the vtable. * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): Handle the new property. (gtk_file_chooser_default_get_property): Likewise. (get_selected_file_info_from_file_list): New helper function; code taken from list_selection_changed(). (list_selection_changed): Use get_selected_file_info_from_file_list(). (should_respond_after_confirm_overwrite): New function. (gtk_file_chooser_default_should_respond): Confirm when necessary.
* Use the correct function to conver the uri to a path. (#304565, IsmaelMatthias Clasen2005-05-181-1/+1
| | | | | | | | 2005-05-18 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooser.c (gtk_file_chooser_remove_shortcut_folder_uri): Use the correct function to conver the uri to a path. (#304565, Ismael Juma)
* Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITEMatthias Clasen2005-03-221-10/+11
| | | | | | | | | | | | 2005-03-21 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like their G_ counterparts, but also mark the name, nick and blurb as static. * gtk/*.c: Mark param spec strings as static, using the new macros.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-1/+4
| | | | | | | | | | | | | | | | | | 2005-03-20 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdkalias.h: * gtk/grk.symbols: Group symbols by header and source file. * gtk/makegtkalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegtkalias.pl -def * gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate this file. * gtk/*.c: Include gtkalias.h after the other headers, include gtkaliasdef.c at the bottom. * gtk/*.h: Small cleanups.
* Document ownership of filters. (#169101, Sebastian Rittau)Matthias Clasen2005-03-071-1/+4
| | | | | | | 2005-03-07 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooser.c (gtk_file_chooser_add_filter): Document ownership of filters. (#169101, Sebastian Rittau)
* Fix many instances of "the the" in docs and comments. (#165815, MasaoMatthias Clasen2005-02-011-2/+2
| | | | | | | 2005-02-01 Matthias Clasen <mclasen@redhat.com> * */*.c: Fix many instances of "the the" in docs and comments. (#165815, Masao Mutoh)
* Typo fix. (#162219, Masao Mutoh)Matthias Clasen2004-12-261-1/+1
| | | | | | | | | 2004-12-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooser.c (gtk_file_chooser_set_action): Typo fix. (#162219, Masao Mutoh) (gtk_file_chooser_set_preview_widget_active): Another typo. (#162218, Masao Mutoh)
* Typo fix. (#162219, Masao Mutoh)Matthias Clasen2004-12-261-1/+1
| | | | | | | 2004-12-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooser.c (gtk_file_chooser_set_action): Typo fix. (#162219, Masao Mutoh)
* gtk/gtkaccelmap.[ch] gtk/gtkfilechooser.[ch] gtk/gtkfilesel.cTor Lillqvist2004-12-121-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-12-12 Tor Lillqvist <tml@iki.fi> * gtk/gtkaccelmap.[ch] * gtk/gtkfilechooser.[ch] * gtk/gtkfilesel.c * gtk/gtkfilesystemwin32.c * gtk/gtkiconfactory.[ch] * gtk/gtkicontheme.[ch] * gtk/gtkimage.[ch] * gtk/gtkimmodule.c * gtk/gtkmodules.c * gtk/gtkrc.[ch] * gtk/gtkuimanager.[ch] * gtk/gtkwindow.[ch] * gtk/updateiconcache.c * gtk/gtk.symbols: Use gstdio wrappers. On Windows, convert environment variables referring to pathnames from locale encoding to UTF-8. As in GLib, in order to preserve Windows DLL ABI stability, add binary compatibility versions of functions that take file names as arguments, or return file names. Add a _utf8 suffix to the "real" such functions on Windows. The ABI compatibility versions keep the old name. * gtk/Makefile.am: Strip PRIVATE symbols from the GNU import library. * gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Implement file mapping on Win32. * gtk/updateiconcache.c: Don't crash if invoked without argument. Use binary mode when opening file. * modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am: Install gtkrc in correct place, in <datadir>/themes/MS-Windows/gtk-2.0.
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gtk/Makefile.am: Add rules to generate gtk.def and from gtk.symbols, and make make check check the abi with abicheck.sh. (gtk_private_h_sources): Add gtkinternals.h (gtk_built_private_headers): Add gtkalias.h (gtk_extra_sources): Add gtk.symbols (EXTRA_DIST): Add makegtkalias.pl and abicheck.sh * gtk/gtk.symbols: New file. Definition of the GTK+ ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gtk/abicheck.sh: New file. Script to check the actually symbols exported from libgtk-x11.2.0.so against the symbols found in gtk.symbols. * gtk/makegtkalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * gtk/gtkinternals.h: New file. An uninstalled header listing symbols which must be exported for some reason and do not appear in any other header. * gtk/*.c: Include gtkalias.h
* Fix up previous commit.Matthias Clasen2004-08-041-2/+2
|
* Add setter and getter for the ::show-hidden property. (#145610, JeffMatthias Clasen2004-08-041-0/+42
| | | | | | | 2004-08-04 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooser.[hc]: Add setter and getter for the ::show-hidden property. (#145610, Jeff Franks)
* Fixes #144110, patch by Bastien Nocera <hadess@hadess.net>.Federico Mena Quintero2004-06-111-2/+2
| | | | | | | | | | | 2004-06-10 Federico Mena Quintero <federico@ximian.com> Fixes #144110, patch by Bastien Nocera <hadess@hadess.net>. * gtk/gtkfilechooser.c (gtk_file_chooser_list_shortcut_folders): Refer to gtk_file_chooser_add_shortcut_folder(). (gtk_file_chooser_list_shortcut_folder_uris): Refer to gtk_file_chooser_add_shortcut_folder_uri().
* Fix a typo.Matthias Clasen2004-05-311-1/+1
| | | | | | | | | | | | Mon May 31 00:27:33 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkfilechooserutils.c (_gtk_file_chooser_set_delegate): Fix a typo. Mon May 31 00:23:55 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkfilechooser.c (gtk_file_chooser_set_preview_widget): Refer to ::update-preview, not ::selection-changed.
* Added documentation to all the signals.Federico Mena Quintero2004-04-131-0/+82
| | | | | | | 2004-04-12 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Added documentation to all the signals.
* Fixes #136082 and #135265, patch by Morten Welinder.Federico Mena Quintero2004-03-061-0/+1
| | | | | | | | | | 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>
* Add gboolean return values and GError arguments to ::set_current_folder()Federico Mena Quintero2004-03-051-31/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Handle GTK_FILE_CHOOSER_PROP_USE_PREVIEW_LABEL.Federico Mena Quintero2004-02-291-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* remove folder-mode property.Jonathan Blandford2004-02-271-6/+0
| | | | | | | | | | Fri Feb 27 15:06:00 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): remove folder-mode property. * gtk/gtkfilechooserutils.c (_gtk_file_chooser_install_properties): remove FOLDER_MODE property.
* Add two more folder modes to the enum.Jonathan Blandford2004-02-261-51/+4
| | | | | | | | | | 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
* Remove old file-system property. Add new file-system-backend stringAlexander Larsson2004-02-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog andMatthias Clasen2004-01-161-20/+20
| | | | | | | | | | | | | | | | | | | | Fri Jan 16 23:59:01 2004 Matthias Clasen <maclas@gmx.de> The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and po/ChangeLog): * gtk/gtkintl.h: * gdk-pixbuf/gdk-pixbuf-i18n.h: * gdk/gdkintl.h: Define P_() for property blurbs and nicks. * gdk/gdkdisplaymanager.c: * gdk-pixbuf/gdk-pixbuf.c: * modules/input/gtkimcontextxim.c: * gtk/*.c: Mark property blurbs and nicks with P_(). * po/Makefile.in.in: Add --keyword=P_ to the xgettext invocation, since property blurbs and nicks are now marked with P_().
* Do not allow setting select_multiple when in Save mode. (set_list_model):Federico Mena Quintero2004-01-161-0/+6
| | | | | | | | | | | | | | | | 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.
* Added a render_icon virtual method.Federico Mena Quintero2003-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Fix parameter name mismatches which confuse gtk-doc.Matthias Clasen2003-11-151-1/+1
| | | | | | | | | | | | | | | | | | Sun Nov 16 00:35:29 2003 Matthias Clasen <maclas@gmx.de> * gtk/gtkfilechooser.[hc]: * gtk/gtkentrycompletion.h: Fix parameter name mismatches which confuse gtk-doc. Sun Nov 16 00:41:48 2003 Matthias Clasen <maclas@gmx.de> * gtk/gtk-sections.txt: Remove gtk_tool_item_[sg]et_pack_end. Sun Nov 16 00:32:18 2003 Matthias Clasen <maclas@gmx.de> * gtk/gtk-sections.txt: Move GtkFileChooser out of the private section, in order to get the autogenerated docs on hierarchy, signals, properties, etc.
* Mark as 2.4 additions.Matthias Clasen2003-11-081-0/+4
| | | | | | | | | | Sat Nov 8 01:50:17 2003 Matthias Clasen <maclas@gmx.de> * gtk/gtkicontheme.c: * gtk/gtkfilechooserwidget.c (gtk_file_chooser_widget_new): * gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_new): * gtk/gtkfilechooser.c (gtk_file_chooser_[un]select_all): Mark as 2.4 additions.
* Add a stock icon to the "Add bookmark" button.Federico Mena Quintero2003-11-031-6/+5
| | | | | | | | | | | | | | 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>
* Fixed docs. (gtk_file_chooser_remove_filter): Likewise.Federico Mena Quintero2003-10-231-4/+16
| | | | | | | | | | | | | 2003-10-23 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilechooser.c (gtk_file_chooser_get_preview_uri): Fixed docs. (gtk_file_chooser_remove_filter): Likewise. (gtk_file_chooser_select_all): Added docs. (gtk_file_chooser_unselect_all): Likewise. * gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_new): Added docs. * gtk/gtkfilechooserwidget.c (gtk_file_chooser_widget_new): Added docs.
* Add "Since: 2.4" to all API doc comments.Matthias Clasen2003-10-231-14/+118
| | | | | | | Thu Oct 23 23:22:15 2003 Matthias Clasen <maclas@gmx.de> * gtk/gtkfilefilter.c: * gtk/gtkfilechooser.c: Add "Since: 2.4" to all API doc comments.
* gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: Basic frameworkOwen Taylor2003-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Removed. (gtk_file_system_gnome_vfs_set_bookmarks): Removed.Federico Mena Quintero2003-10-181-38/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added methods for ::get_supports_bookmarks(), ::set_bookmarks(),Federico Mena Quintero2003-10-081-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-07 Federico Mena Quintero <federico@ximian.com> * gtkfilesystem.h (struct _GtkFileSystemIface): Added methods for ::get_supports_bookmarks(), ::set_bookmarks(), ::list_bookmarks(). Added a ::bookmarks_changed() signal. * gtkfilesystem.c (gtk_file_system_get_supports_bookmarks): New function. (gtk_file_system_set_bookmarks): New function. (gtk_file_system_list_bookmarks): New function. (gtk_file_system_base_init): Create the "bookmarks-changed" signal. (gtk_file_paths_copy): New function. * gtkfilesystemunix.c (gtk_file_system_unix_get_supports_bookmarks): Implement. (gtk_file_system_unix_set_bookmarks): Implement. (gtk_file_system_unix_get_bookmarks): Implement. * gtkfilesystemgnomevfs.c (struct _GtkFileSystemGnomeVFS): Added fields for the bookmarks and the GConfClient. (gtk_file_system_gnome_vfs_set_bookmarks): Implement. (gtk_file_system_gnome_vfs_list_bookmarks): Implement. * gtkfilechooserprivate.h (struct _GtkFileChooserIface): Added methods for ::set_shortcut_folders(), ::list_shortcut_folders(). * gtkfilechooser.c (gtk_file_chooser_set_shortcut_folders): New function. (gtk_file_chooser_list_shortcut_folders): New function. * gtkfilechooserimpldefault.c (create_shortcuts_model): Unref the old shortcuts model if it exists. Create the nodes for the app-specific shortcut folders. (struct _GtkFileChooserImplDefault): Added a field for the shortcut_folders. (gtk_file_chooser_impl_default_set_shortcut_folders): Implement. (select_shortcuts_folder): New helper function. (gtk_file_chooser_impl_default_set_current_folder): Use select_shortcuts_folder(). (shortcuts_append_path): Get the file info here, instead of the caller. (shortcuts_append_home): Use shortcuts_append_path(). (shortcuts_append_file_system_roots): Likewise. (create_shortcuts_model): Add the app-specific shortcut folders and the bookmarks. (gtk_file_chooser_impl_default_list_shortcut_folders): Implement. (create_shortcuts_tree): Added a button to let the user add the current folder to the bookmarks. (gtk_file_chooser_impl_default_set_property): Connect to "bookmarks-changed" on the file system. (shortcuts_append_bookmarks): New function. * configure.ac: Depend on GConf.
* Added an API point about needing a way to fetch the hpaned position so weFederico Mena Quintero2003-09-111-16/+15
| | | | | | | | | | | | | | | | | 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.
* Connect to "row_activated" on the file list. (list_row_activated): NewFederico Mena Quintero2003-09-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 2003-09-10 Federico Mena Quintero <federico@ximian.com> * gtkfilechooserimpldefault.c (create_file_list): Connect to "row_activated" on the file list. (list_row_activated): New function. Changes to folders or emits the "file-activated" signal depending on what type of row was activated. (create_folder_tree): Renamed from create_directory_tree(), since "folder" is the new politically-correct name. * gtkfilechooserprivate.h (struct _GtkFileChooserIface): Added a file-activated signal. * gtkfilechooser.c (gtk_file_chooser_class_init): Register the signal. * gtkfilechooserutils.c (_gtk_file_chooser_set_delegate): Connect to "file-activated" on the delegate. (delegate_file_activated): New function. * TODO: Added an API item about Clipart-like folders provided by applications.
* Small doc fixOwen Taylor2003-09-091-3/+4
|
* Remove excess check that was breaking with current GObject.Owen Taylor2003-09-031-94/+89
| | | | | | | | | | | | Wed Sep 3 16:38:59 2003 Owen Taylor <otaylor@redhat.com> * glib-interface-propreties-0.5.patch: Remove excess check that was breaking with current GObject. * gtkfilechooser.c (gtk_file_chooser_class_init): use the new ability to have a class_init function for interfaces to avoid the ugly static gboolean initialized hack.
* Removed the "extra widget" bit, implemented with the following:Federico Mena Quintero2003-09-031-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add over-big test case for preview (much of size from a modified copy ofOwen Taylor2003-07-231-14/+30
| | | | | | | | | | | | | | | | 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.
* File filter objects.Owen Taylor2003-07-231-0/+117
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Add gtk_file_chooser_set_current_name() to set the current entry contents.Owen Taylor2003-07-111-44/+384
| | | | | | | | | | | | | | 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.
* - Disconnect signal connections when appropriate. - Listen toOwen Taylor2003-04-091-10/+87
| | | | | | | | | | | | | | | | | | | | | Wed Apr 9 12:28:04 2003 Owen Taylor <otaylor@redhat.com> * gtkfilesystemmodel.c: - Disconnect signal connections when appropriate. - Listen to ::roots-changed on the file system - When the last reference count on a child is removed, queue an idle to unload the parent. * gtkfilesystemgnomevfs.c - When URI's outside of file:/// are acessed, add toplevel URI's to the list of roots. - Improve display name computations * gtkfilechooserentry.c: Don't complete on empty file parts; free stored folder when base directory changes. * gtkfilechooser.c: Fill in some docs.
* Move interface definition into a private header so it can refer toOwen Taylor2003-04-041-27/+230
| | | | | | | | | | | | | | Fri Apr 4 17:30:27 2003 Owen Taylor <otaylor@redhat.com> * gtkfilechooserprivate.h gtkfilechooser.h: Move interface definition into a private header so it can refer to GtkFileSystem. * *.[ch]: Switch over from using gchar *uri internally to using GtkFilePath * internally, and add conversion routines to GtkFileSystem. * TODO README: Updates.
* Add a construct-only 'file_system' property, split test case into ↵Owen Taylor2003-03-261-0/+9
| | | | testfilechooser, testfilechooser-vfs