2008-03-11 Tor Lillqvist <tml@novell.com>
Bug 469868 - Filenames with colon ":" are not saved correctly
* gtk/gtkfilechooserentry.c (insert_text_callback)
(delete_text_callback) [Win32]: New functions to make sure that
colons used otherwise than as a separator after a drive letter, or
characters that are always illegal in file names, are rejected on
input. This means that the GTK+ file chooser can't be used to
input full names of alternate data streams, but oh well. There are
still more checks that could be done on the file names, see the
bug report. But this will do for now.
(_gtk_file_chooser_entry_init) [Win32]: Connect above functions.
svn path=/trunk/; revision=19753
2008-02-12 Matthias Clasen <mclasen@redhat.com>
Skip exensions when selecting filenames in the save-as dialog.
(#362516, Carlos Garnacho)
* gtk/gtkfilechooserentry.h:
* gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_select_filename):
New function to skip the extension part when selecting a filename.
(_gtk_file_chooser_entry_set_base_folder): Use it here.
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_entry_grab_focus):
...and here.
svn path=/trunk/; revision=19540
2006-09-10 Matthias Clasen <mclasen@redhat.com>
* Commit a patch by Behdad to fix typos, omissions and other
errors in the symbol aliasing, and add checks for local PLT
entries. (#354687, Behdad Esfahbod)
2006-08-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Don't
store GSource pointers, but ids.
(gtk_file_chooser_entry_dispose): Remove idles.
(idle_add, idle_add): Factor this out.
(gtk_file_chooser_entry_maybe_update_directory):
(add_completion_idle): And use it here. (#350039, Chris Wilson)
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().
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.
2005-06-10 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-6:
Fixes#162358:
* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't return
immediately if we are in CREATE_FOLDER mode, so that we can fill
the entry with the newly-selected folder.
(gtk_file_chooser_default_set_property): Warn against turning on
multiple selection for CREATE_FOLDER mode, or about setting that
action while multiple selection is on.
(update_chooser_entry): Change the entry's contents as well if we
are in CREATE_FOLDER mode. If nothing is selected, clear the
chooser entry.
(trap_activate_cb): Don't trap enter/space if modifiers are
pressed. This lets one use Ctrl-space to toggle rows in multiple
selection mode.
(gtk_file_chooser_default_should_respond): Clean up the if-chain
mess of special cases by using an array to determine what to do.
Also, for the save-entry case in CREATE_FOLDER mode, actually fix
the bug where the file chooser would switch to an existing folder
rather than confirming with it, and create the folder ourselves.
(error_creating_folder_over_existing_file_dialog): New function.
* gtk/gtkfilechooserentry.c (check_completion_callback): Only
insert the common prefix if we are in an "open" mode. Use a
helper function.
(append_common_prefix): New helper function; code moved over from
check_completion_callback().
(find_common_prefix): New helper function.
(gtk_file_chooser_entry_focus): Append the common prefix if the
user requests it explicitly.
2005-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkentrycompletion.c: Add a property to suppress the
popup for single matches. (#154711)
* gtk/gtkentry.c (gtk_entry_completion_timeout): Respect it here.
* gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_set_action):
Use it here.
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.
2004-10-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserentry.c (gtk_file_chooser_entry_focus): Pop up
the completions again after tab. (#147700, Jens Bech Madsen)
2004-09-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render): Remove
leftover debug code.
Improve the behaviour of the file chooser in save mode. Fixes bugs
#151031, #151608, #151994 reported by Owen Taylor and Alexander
Larsson.
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property):
(location_entry_create): Propagate the action to the file
chooser entries.
(gtk_file_chooser_default_should_respond): Switch folders if
the user enters a directory name in the entry and clear the entry
after switching folders.
(gtk_file_chooser_default_should_respond, shortcuts_row_activated_cb):
Move focus to the file list when activating a shortcut.
(gtk_file_chooser_default_should_respond): Handle the case where the
user clicks on "Save" after selecting a folder in the file list.
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property):
Propagate the action to the file chooser entries.
* gtk/gtkfilechooserentry.h:
* gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_set_action):
(_gtk_file_chooser_entry_get_action): New functions to propagate
the GtkFileChooserAction of the file chooser to the file chooser
entry.
(check_completion_callback): If we are in save mode, only do
inline completion for directories.
2004-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.[hc]: New widget to go along with
GtkFontButton and GtkColorButton for use in preference dialogs.
Replaces GnomeFileEntry. (#148108, James M. Cape)
* gtk/gtk.h: Include gtkfilechooserbutton.h
* gtk/Makefile.am (gtk_public_h_sources): Add gtkfilechooserbutton.h
(gtk_c_sources): Add gtkfilechooserbutton.c
* gtk/gtk.symbols: Add the GtkFileChooserButton symbols.
* gtk/gtkfilechooserutils.[hc]: Make the delegate quark available.
* gtk/gtkfilechooserentry.[hc] (_gtk_file_chooser_entry_new): Allow
to suppress tab-eating using the new eat_tabs argument. Adjust all
callers.
* tests/testfilechooserbutton.c: Test for GtkFileChooserButton.
* tests/Makefile.am (noinst_PROGRAMS): Add testfilechooserbutton
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
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-04-22 Tor Lillqvist <tml@iki.fi>
Fix the file chooser on Windows. I can't make it misbehave or
crash any more now. But presumably there are still corner cases
not handled. I haven't really checked behaviour of UNC paths, for
instance.
* gtk/gtkfilesystemwin32.c: Accept both backslash and slash in
several places. Use G_IS_DIR_SEPARATOR macro (which could be added
to GLib in 2.6).
(gtk_file_system_win32_get_parent): Like the Unix version, assert
filename is absolute, and avoid one unnecessary string allocation
and freeing.
(canonicalize_filename,gtk_file_system_win32_parse): Handle drive
letters more correctly.
(gtk_file_system_win32_render_icon): Assure correct syntax is used
for root folder of a drive. (#137962, Morten Welinder)
(filename_is_some_root): New function that accepts also root
without any drive specified.
(filename_is_drive_root): Rename from filename_is_root.
* gtk/gtkfilechooserentry.c (completion_match_func): Casefold on
Windows.
2004-04-07 Federico Mena Quintero <federico@ximian.com>
Fix#132500.
* gtk/gtkfilesystem.c (gtk_file_system_parse): Ensure that the
passed-in 'str' is not NULL.
* gtk/gtkfilesystemunix.c (expand_tilde): New helper function;
expands "~/" or "~foo/" at the beginning of a filename.
(gtk_file_system_unix_parse): Use expand_tilde() before doing
anything else.
* gtk/gtkfilechooserentry.c
(gtk_file_chooser_entry_maybe_update_directory): Take in a
force_reload argument.
(gtk_file_chooser_entry_changed): If gtk_file_system_parse()
returns an error, set the file_part_pos to -1.
(load_directory_callback): Only populate the model if the
file_part_pos is not -1.
Tue Mar 16 00:56:11 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (gtk_entry_completion_list_button_press):
Block the ::changed handler during the emission of ::match-selected.
Partial fix for #137226.
* gtk/gtkfilechooserentry.c: Remove the no longer needed
no_pop_down flag.
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.
Mon Mar 15 11:40:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilechooserentry.c: Store the position of the
file part and use that in check_completion_callback()
and match_selected_callback() to figure out where
to operate on the text, rather than recomputing the
information.
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.
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.
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-08 Anders Carlsson <andersca@gnome.org>
* gtk/gtkfilechooserentry.c:
(_gtk_file_chooser_entry_set_base_folder):
Set the base folder path in the entry.
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>
2003-12-03 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Removed
the in_change flag.
(completion_idle_callback): Use a temporary list store and re-set
it on the completion rather than modifying the old one. We are
re-reading the folder anyway, and this gets rid of non-atomicity
problems.
2003-11-07 Federico Mena Quintero <federico@ximian.com>
Changing GtkFileChooserEntry to use GtkEntryCompletion.
* gtk/gtkfilechooserentry.c (gtk_file_chooser_entry_init): Create
a GtkListStore for the completion list. Create a
GtkEntryCompletion and attach it to the chooser entry.
(gtk_file_chooser_entry_finalize): Unref the completion store.
(completion_match_func): New callback for the GtkEntryCompletion.
(completion_idle_callback): Fill the completion store with filenames.
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.
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.
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.
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.