Commit Graph

188 Commits

Author SHA1 Message Date
Stefan Kost
0e1eee26b9 [filechooserentry] don't show misplaced completion popup
Override the key-press-event instead of overriding the focus method.
Fixes #627139
2010-08-19 09:37:53 +03:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Javier Jardón
1919f55647 Fix compilation warning: initialize variable to NO_MATCH 2009-11-09 09:41:51 +01:00
Stefan Walter
de60fd8cfd Use gtk_entry_xxx functions rather than using GtkEntry structure directly.
See bug #576801

svn path=/trunk/; revision=22589
2009-03-27 05:22:23 +00:00
Federico Mena Quintero
ba54644c38 GtkFileChooserEntry: handle slow folders by not autocompleting when the cursor is not at the end of the text
2009-01-22  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserentry.c (autocomplete): Relax the assertion;
	just do nothing if the folder is not loaded or if the cursor position
	is not at the end of the text.  A very slow-to-load folder can get
	us into the latter state if the user starts typing first.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22186
2009-01-23 01:52:36 +00:00
Federico Mena Quintero
7fde4a8542 GtkFileChooserEntry: fix the computation of 'complete but not unique' and appending a '/' to unique directory names
2009-01-22  Federico Mena Quintero  <federico@novell.com>

	Fix the computation of "complete but unique" in
	GtkFileChooserEntry.  Fix the case where "/" was not appended to a
	unique directory name during explicit Tab completion.

	* gtk/gtkfilechooserentry.c (maybe_append_separator_to_file):
	Return whether anything was appended as well as the new string
	itself.
	(find_common_prefix): Oops, only turn on
	is_complete_not_unique_ret if we had a unique match!
	(append_common_prefix): If we appended a directory separator, we
	*did* expand the common prefix, so we are not in the "nothing
	inserted" case.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22184
2009-01-23 00:55:07 +00:00
Federico Mena Quintero
a8b06ad561 Comments for translators on the file chooser entry's completion feedback
(start_explicit_completion): Add comments for translators, to
	explain the purpose of the various feedback messages used during
	completion.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22183
2009-01-23 00:54:52 +00:00
Federico Mena Quintero
cabc9f7f5c Pass refresh errors from the very bottom of the loading sequence up to the top
(start_loading_current_folder): Check if the folder to be loaded
	is non-native for the local_only=TRUE case; if so, return an error
	as we are configured to load only local folders.
	(reload_current_folder): Pass on errors from
	start_loading_current_folder().  Tighten the preconditions, as we
	are sure that we can only receive non-NULL folder-files to load.
	(refresh_current_folder_and_file_part): Pass on errors from
	reload_current_folder().  At the very end, assert the invariant
	described above.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22182
2009-01-23 00:54:37 +00:00
Federico Mena Quintero
7ba4268d6b Factor out function to discard the loading process and the current folder file
(discard_loading_and_current_folder_file): Factor out function to
	cancel the cancellable and discard the current_folder_file,
	i.e. to reset the invariant to the "nothing valid is loaded" case.
	(gtk_file_chooser_entry_dispose): Use
	discard_loading_and_current_folder_file().
	(reload_current_folder): Likewise.
	(refresh_current_folder_and_file_part): Likewise, and ensure that
	the error cases result in the invariant being held.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22181
2009-01-23 00:54:22 +00:00
Federico Mena Quintero
fe636e4be2 Process the result of refreshing the folder during autocompletion
(start_autocompletion): Process the result from refresh...().  We
	only do completion in the REFRESH_OK case.  For the error cases,
	we don't do anything, as this is autocompletion and must not
	result in non-asked-for errors popping up.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22180
2009-01-23 00:54:08 +00:00
Federico Mena Quintero
c1205bbbb9 Don't handle errors when committing the completion
(commit_completion_and_refresh): Don't do anything with the result
	of refresh...(), since this function doesn't get called during
	completion-related interaction.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22179
2009-01-23 00:53:53 +00:00
Federico Mena Quintero
65cd4f8df4 Process the result of refreshing the folder during explicit completion
(start_explicit_completion): Process the result from
	refresh...().  Here we present the actual feedback about only
	being able to display local folders for local_only=TRUE.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22178
2009-01-23 00:53:38 +00:00
Federico Mena Quintero
2dd7cf4926 Return an error code when refreshing the entry from the user's input
2009-01-22  Federico Mena Quintero  <federico@novell.com>

	Return an error code when refreshing the entry from the user's
	input.  We use this in the completion code to know when completion
	can't happen due to (for example) having a non-local URI in a file
	chooser that is local_only=TRUE.

	Also, we start maintaining an invariant that
	chooser_entry->current_folder_file != NULL implies that:

		* what the user entered is valid

		* we are loading that folder (chooser_entry->load_folder_cancellable != NULL)

		* or we are done loading that folder, or we have a handle
		to it at least (chooser_entry->current_folder != NULL)

	The invariant also says that all of the above are NULL (and
	chooser_entry->current_folder_file == NULL) implies that the user
	typed something invalid.  This makes
	_gtk_file_chooser_entry_get_current_folder() not able to return
	an invalid folder.

	* gtk/gtkfilechooserentry.c (RefreshStatus): New enum.
	(refresh_current_folder_and_file_part): Return a RefreshStatus.
	We filter out incomplete hostnames here (typing
	"sftp://incompl[tab]" will error out), as well as completely
	unparsable input.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22177
2009-01-23 00:53:23 +00:00
Federico Mena Quintero
e4bc68ba04 Don't do completion in the middle of an incomplete hostname
Fix completion so it doesn't pop up for every character in a URI
	hostname:

	* gtk/gtkfilechooser.h (GtkFileChooserError): Add a
	GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME.

	* gtk/gtkfilesystem.c (_gtk_file_system_parse): Return an
	"incomplete hostname" error if the user has not typed a full
	hostname yet in an URI.

	* gtk/gtkfilechooserentry.c (append_common_prefix): If we get an
	incomplete hostname, just don't pop up an error, since that is a
	transient state and the user doesn't need to be notified about it.
	(refresh_current_folder_and_file_part): Don't revert to showing
	the base folder if we have an incomplete hostname.
	(reload_current_folder): Handle the passed folder being NULL, even
	if we must force a reload.  Also, reload the folder if we didn't
	have a cancellable for it (i.e. we hadn't started to load it
	before).

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22157
2009-01-21 03:17:01 +00:00
Federico Mena Quintero
2c07a59e54 Add a local_only property to GtkFileChooserEntry
Patch by Carlos Garnacho <carlos@imendio.com> - add a local_only
	property to GtkFileChooserEntry:

	* gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Add a
	local_only field.
	(_gtk_file_chooser_entry_init): Default to local_only being true.
	(start_explicit_completion): Don't allow completion of non-native
	files if local_only is turned on.
	(start_loading_current_folder): Don't start loading non-native
	folders if local_only is turned on.
	(_gtk_file_chooser_entry_set_local_only): New function.
	(_gtk_file_chooser_entry_get_local_only): New function.

	* gtk/gtkfilechooserentry.h (_gtk_file_chooser_entry_set_local_only,
	_gtk_file_chooser_entry_get_local_only): New prototypes.

	* gtk/gtkfilechooserdefault.c (set_local_only): Set the local_only
	property on the entry.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22156
2009-01-21 03:16:46 +00:00
Federico Mena Quintero
92ec0276fc Factor out code to discard the current_folder
Patch by Carlos Garnacho <carlos@imendio.com>:

* gtk/gtkfilechooserentry.c (discard_current_folder): New
function, factored out for when we need to get rid of the
current_folder.
(gtk_file_chooser_entry_dispose): Use discard_current_folder().
(finished_loading_cb): Fix prototype.
(load_directory_get_folder_callback): Discard the completion
store, as well as clearing the completion feedback, if we find an
error while loading the folder.  Also, use
discard_current_folder().
(reload_current_folder): Use discard_current_folder().

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22155
2009-01-21 03:16:28 +00:00
Matthias Clasen
b6b5237663 Replace several implementation of blank cursor setting by
* gtk/gtkentry.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtktextview.c: Replace several implementation of
        blank cursor setting by GDK_BLANK_CURSOR.


svn path=/trunk/; revision=22148
2009-01-20 02:45:19 +00:00
Matthias Clasen
50329fa7c0 Privately export this method. It classifies directories and mountables the
* gtk/gtkfilesystem.[hc] (_gtk_file_info_consider_as_directory):
        Privately export this method. It classifies directories and mountables
        the same.

        * gtk/gtkfilesystem.c (enclosing_volume_mount_cb): Silently drop
        G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible
        mounts.

        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtkfilechooserdefault.c: Use the new function instead of
        direct checks for G_FILE_TYPE_DIRECTORY throughout.


svn path=/trunk/; revision=21898
2008-12-14 02:14:19 +00:00
Paolo Borelli
5e667ea561 use gdk_threads_add_idle so that the handler acquires the lock since it
2008-09-08  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtkfilechooserentry.c (install_start_autocompletion_idle):
	use gdk_threads_add_idle so that the handler acquires the lock
	since it calls gtk functions.


svn path=/trunk/; revision=21321
2008-09-08 14:29:26 +00:00
Sven Neumann
2a95978506 gtk/gtkaboutdialog.c gtk/gtkcellrendereraccel.c gtk/gtkcellrenderercombo.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaboutdialog.c
	* gtk/gtkcellrendereraccel.c
	* gtk/gtkcellrenderercombo.c
	* gtk/gtkcellrendererspin.c
	* gtk/gtkcellrenderertext.c
	* gtk/gtkclipboard.c
	* gtk/gtkcolorsel.c
	* gtk/gtkcombo.c
	* gtk/gtkcombobox.c
	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilechooserentry.c
	* gtk/gtkfontsel.c
	* gtk/gtkinputdialog.c
	* gtk/gtkmenutoolbutton.c
	* gtk/gtkpathbar.c
	* gtk/gtktooltip.c: use canonical signal names in 
g_signal_connect().


svn path=/trunk/; revision=21060
2008-08-11 09:17:49 +00:00
Matthias Clasen
7e39f9285a Add translator hints
svn path=/trunk/; revision=20902
2008-07-24 04:02:37 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Matthias Clasen
f9c7a4bbd0 Really make GtkFileSystem private by _-prefixing all functions.
* gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtkfilesystem.c:
        * gtk/gtkfilesystem.h:
        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkpathbar.c: Really make GtkFileSystem private
        by _-prefixing all functions.


svn path=/trunk/; revision=20378
2008-06-13 16:47:41 +00:00
Carlos Garnacho
640d68778a Bug 520874 - Should use gio directly.
2008-06-10  Carlos Garnacho  <carlos@imendio.com>

        Bug 520874 - Should use gio directly.

        * gtk/gtkfilesystem.[ch]: Turn into a private object, which mostly
        provides helper functions for asynchronous calls, folder abstraction
        and uniform handling of volumes/drives/mounts.

        * gtk/gtkfilesystemwin32.[ch]:
        * gtk/gtkfilesystemunix.[ch]: Removed, these are no longer required.

        * gtk/gtkfilechooser.c:
        * gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkfilechooserentry.[ch]:
        * gtk/gtkfilechooserprivate.h:
        * gtk/gtkfilechooserutils.c:
        * gtk/gtkfilesystemmodel.[ch]:
        * gtk/gtkpathbar.[ch]: Use GIO internally. Adapt to GtkFileSystem API.
        Do not load filesystem implementation modules.

        * gtk/Makefile.am:
        * gtk/gtk.symbols: the gtkfilesystem.h private header isn't installed
        anymore, nor the unix/win32 implementations.

        * README.in: Add blurb about these changes.

svn path=/trunk/; revision=20342
2008-06-10 00:39:35 +00:00
Federico Mena Quintero
cf62c83b0e bnc355225 - File chooser crash in Tab completion
2008-06-03  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserentry.c (install_completion_feedback_timer):
	If the user presses Tab while the completion feedback window is
	active, then we'll assert.  Remove the assertion and just re-set
	the timer.  Fixes https://bugzilla.novell.com/show_bug.cgi?id=355225

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=20305
2008-06-03 18:08:48 +00:00
Federico Mena Quintero
dec88cb285 Ahem, fix compilation
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19938
2008-03-26 20:34:22 +00:00
Federico Mena Quintero
00b34c0b3d Make 'Ok' work for the file chooser entry
2008-03-26  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserentry.c (commit_completion_and_refresh): New
	helper function; factored out from the functions that commit the
	current suggested autocompletion and that refresh the entry's paths.
	(gtk_file_chooser_entry_activate): Use commit_completion_and_refresh().
	(_gtk_file_chooser_entry_get_file_part): Likewise.
	(_gtk_file_chooser_entry_get_current_folder): Likewise.  This
	makes the entry have the correct paths when *not* using any form
	of completion (and makes the file chooser work when clicking the
	OK button).

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19937
2008-03-26 20:22:50 +00:00
Federico Mena Quintero
5ed9d8099c Hide the mouse cursor in the completion feedback window
2008-03-13  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserentry.c (create_completion_feedback_window):
	Set the mouse cursor of the feedback window to invisible, so that
	we respect GtkEntry's invisible cursor while typing.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19870
2008-03-14 02:45:44 +00:00
Federico Mena Quintero
d31b7a0dd8 Use rough font-based spacing for the completion entry's suggestion window
2008-03-13  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserentry.c (show_completion_feedback_window): Put
	the feedback window at entry_height/2 pixels to the right of the
	cursor, for a cheap "M-width / 2" spacing.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19869
2008-03-14 02:13:54 +00:00
Federico Mena Quintero
c2d5bcb7f7 Beep with gtk_widget_error_bell()
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19859
2008-03-13 00:48:10 +00:00
Federico Mena Quintero
cec81cbfdf Better feedback for sole completions
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19858
2008-03-13 00:47:54 +00:00
Federico Mena Quintero
1e60639143 Don't complete the directory separator if it would result in double separators
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19857
2008-03-13 00:47:38 +00:00
Federico Mena Quintero
b7e32c8dcb Remove obsolete FIXMEs
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19856
2008-03-13 00:47:21 +00:00
Federico Mena Quintero
74f3d16c26 Remove debug printfs
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19855
2008-03-13 00:47:05 +00:00
Federico Mena Quintero
bb4c73e81b Add some FIXMEs
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19854
2008-03-13 00:46:48 +00:00
Federico Mena Quintero
b0e2c417cb On error when loading a folder, use the raw error message instead of commenting it up
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19853
2008-03-13 00:46:31 +00:00
Federico Mena Quintero
c406ebcc44 Clear the current_folder_path if loading yields an error
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19852
2008-03-13 00:46:14 +00:00
Federico Mena Quintero
7efced5687 Present an error if we can't load the folder during explicit completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19851
2008-03-13 00:45:58 +00:00
Federico Mena Quintero
d5df63cc1c Detect when Tab would generate no new completions
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19850
2008-03-13 00:45:41 +00:00
Federico Mena Quintero
801553bee6 Debug printfs for deleting/inserting the completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19849
2008-03-13 00:45:23 +00:00
Federico Mena Quintero
857c561ffe If explicitly completing and we have a completion, just unselect it
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19848
2008-03-13 00:45:05 +00:00
Federico Mena Quintero
bcb36780ed Another FIXME
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19847
2008-03-13 00:44:48 +00:00
Federico Mena Quintero
e33260acf3 Add completion feedback in other places
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19846
2008-03-13 00:44:30 +00:00
Federico Mena Quintero
932e20e9df Find the cursor position from GtkEntry for the completion feedback
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19845
2008-03-13 00:44:12 +00:00
Federico Mena Quintero
197ab5dee8 Use a timer for the completion feedback window
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19844
2008-03-13 00:43:54 +00:00
Federico Mena Quintero
2465beb901 Destroy the completion feedback window
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19843
2008-03-13 00:43:36 +00:00
Federico Mena Quintero
53b09108df Use an alignment for the label like in GtkTooltip
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19842
2008-03-13 00:43:18 +00:00
Federico Mena Quintero
547069a38e Show the label as well as the feedback window
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19841
2008-03-13 00:42:58 +00:00
Federico Mena Quintero
b17ffff0ff Debug printfs for the completion feedback position
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19840
2008-03-13 00:42:38 +00:00
Federico Mena Quintero
3b5ddd8b55 Create a tooltip-like window to present completion feedback
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19839
2008-03-13 00:42:19 +00:00
Federico Mena Quintero
f47227adde Beep if there are no matches for explicit completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19838
2008-03-13 00:41:58 +00:00
Federico Mena Quintero
a83799a32a Scan the completion store again to look for complete-but-not-unique matches
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19837
2008-03-13 00:41:38 +00:00
Federico Mena Quintero
e5f8a4693e Stubs for all cases of completion feedback
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19836
2008-03-13 00:41:17 +00:00
Federico Mena Quintero
806cca3c9c Update comments on explicit completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19835
2008-03-13 00:40:57 +00:00
Federico Mena Quintero
47ddc0c86f Stubs to give feedback when doing explicit completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19834
2008-03-13 00:40:37 +00:00
Federico Mena Quintero
1510b02c75 Refresh the file part when it gets requested and when activating the entry
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19833
2008-03-13 00:40:16 +00:00
Federico Mena Quintero
8482f9a7de Clear the completion flags before appending the common prefix
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19832
2008-03-13 00:39:56 +00:00
Federico Mena Quintero
6a06c6daee Add FIXMEs for beeping later
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19831
2008-03-13 00:39:35 +00:00
Federico Mena Quintero
d2293cc4f8 Factor out some code
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19830
2008-03-13 00:39:15 +00:00
Federico Mena Quintero
989637296b Implement the basic code path for explicit completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19829
2008-03-13 00:38:53 +00:00
Federico Mena Quintero
11a9457ee1 Clear pending completions thoroughly
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19828
2008-03-13 00:38:31 +00:00
Federico Mena Quintero
e7009432b2 Remove debug printfs from populate_completion_store()
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19827
2008-03-13 00:38:11 +00:00
Federico Mena Quintero
a531c03baf Debug printfs for finishing the folder load
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19826
2008-03-13 00:37:50 +00:00
Federico Mena Quintero
deec573420 More debug printfs for populating the completion store
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19825
2008-03-13 00:37:27 +00:00
Federico Mena Quintero
b2fe9f70d3 Debug printfs for populating the completion store
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19824
2008-03-13 00:37:05 +00:00
Federico Mena Quintero
baeaea3ca8 Turn on in_change while changing the filename in the entry
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19823
2008-03-13 00:36:42 +00:00
Federico Mena Quintero
b25ec8e40e Update some FIXMEs
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19822
2008-03-13 00:36:18 +00:00
Federico Mena Quintero
a6bdc59213 When finding the common prefix, assert that we have the correct folder loaded
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19821
2008-03-13 00:35:54 +00:00
Federico Mena Quintero
073093bde0 Discard the completion store when we change the folder
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19820
2008-03-13 00:35:31 +00:00
Federico Mena Quintero
f5343b9037 Add some more FIXMEs
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19819
2008-03-13 00:35:08 +00:00
Federico Mena Quintero
bdebb1c7fb Remove obsolete comments
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19818
2008-03-13 00:34:44 +00:00
Federico Mena Quintero
69f62828f4 Cancel all forms of completion at the appropriate times, not just in ::changed
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19817
2008-03-13 00:34:21 +00:00
Federico Mena Quintero
9c9b5e6034 Put some more FIXMEs
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19816
2008-03-13 00:33:55 +00:00
Federico Mena Quintero
f96770eb2f Re-create the completion store right before populating it
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19815
2008-03-13 00:33:31 +00:00
Federico Mena Quintero
af7a4e2ecf Populate the completion store when the folder is done loading
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19814
2008-03-13 00:32:58 +00:00
Federico Mena Quintero
756497d142 Remove files_added handler
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19813
2008-03-13 00:32:32 +00:00
Federico Mena Quintero
d254972b7a Remove files_deleted handler
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19812
2008-03-13 00:32:05 +00:00
Federico Mena Quintero
340e9ac350 Handle the folder being completely loaded
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19811
2008-03-13 00:31:38 +00:00
Federico Mena Quintero
f1101e1169 Debug printfs for finding the common prefix
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19810
2008-03-13 00:31:13 +00:00
Federico Mena Quintero
4158110fe8 Debug printfs for the common prefix
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19809
2008-03-13 00:30:47 +00:00
Federico Mena Quintero
f027017d8b Autocomplete by inserting/selecting the common prefix
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19808
2008-03-13 00:30:20 +00:00
Federico Mena Quintero
e7afb62172 Debugging printfs
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19807
2008-03-13 00:29:55 +00:00
Federico Mena Quintero
25b98dca7b Start autocompletion in an idle so GtkEntry updates its cursor position
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19806
2008-03-13 00:29:30 +00:00
Federico Mena Quintero
5f32bf06e0 Rework the way autocompletion is initiated
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19805
2008-03-13 00:29:04 +00:00
Federico Mena Quintero
d64fa89eec For autocompletion, consider only the text up to the cursor
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19804
2008-03-13 00:28:38 +00:00
Federico Mena Quintero
1394858329 Don't overwrite the suffix after the cursor when inserting the completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19803
2008-03-13 00:28:12 +00:00
Federico Mena Quintero
bbb847aef7 Skip the cursor past the autocompleted part when requesting explicit completion
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19802
2008-03-13 00:27:46 +00:00
Federico Mena Quintero
45c87ed009 Move the cursor to the end only if we highlight the completed match
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19801
2008-03-13 00:27:16 +00:00
Federico Mena Quintero
46d0480711 Complete even if not at the end of the text
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19800
2008-03-13 00:26:49 +00:00
Federico Mena Quintero
833e32fa08 Only auto-insert the prefix if we are at the end of the text
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19799
2008-03-13 00:26:20 +00:00
Federico Mena Quintero
795727aad4 Find the common prefix based on the cursor position
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19798
2008-03-13 00:25:50 +00:00
Tor Lillqvist
c8b617382d Bug 469868 - Filenames with colon ":" are not saved correctly
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-03-11 18:43:49 +00:00
Matthias Clasen
4118dd893f Skip exensions when selecting filenames in the save-as dialog. (#362516,
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
2008-02-12 17:34:43 +00:00
Matthias Clasen
069d78ed31 Append a '/' to directory names in the completion popup. (#431323, Maarten
2007-04-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserentry.c: Append a '/' to directory names
        in the completion popup.  (#431323, Maarten Maathuis)



svn path=/trunk/; revision=17658
2007-04-26 17:04:33 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
07e7719441 Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
2006-10-08 05:07:55 +00:00
Matthias Clasen
f45a35921a Commit a patch by Behdad to fix typos, omissions and other errors in the
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-09-10 06:39:16 +00:00