Check if the completion is the same one as the old one.

2004-01-23  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkentry.c: (gtk_entry_set_completion):
	Check if the completion is the same one as the old one.

	* gtk/gtkentrycompletion.c:
	* gtk/gtkentrycompletion.h:
	Move GET_PRIVATE macro into .c file, fix a trivial spelling
	error.
This commit is contained in:
Anders Carlsson 2004-01-23 08:38:47 +00:00 committed by Anders Carlsson
parent 79ab6d9b4e
commit 42f1406dbf
3 changed files with 5 additions and 2 deletions

View File

@ -4716,6 +4716,9 @@ gtk_entry_set_completion (GtkEntry *entry,
old = gtk_entry_get_completion (entry);
if (old == completion)
return;
if (old)
{
if (old->priv->completion_timeout)

View File

@ -52,6 +52,7 @@ enum
PROP_MINIMUM_KEY_LENGTH
};
#define GTK_ENTRY_COMPLETION_GET_PRIVATE(obj)(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ENTRY_COMPLETION, GtkEntryCompletionPrivate))
static void gtk_entry_completion_class_init (GtkEntryCompletionClass *klass);
static void gtk_entry_completion_cell_layout_init (GtkCellLayoutIface *iface);
@ -989,7 +990,7 @@ gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
* @completion: A #GtkEntryCompletion.
* @column: The column in the model of @completion to get strings from.
*
* Conviencefunction for setting up the most used case of this code: a
* Convience function for setting up the most used case of this code: a
* completion list with just strings. This function will set up @completion
* to have a list displaying all (and just) strings in the completion list,
* and to get those strings from @column in the model of @completion.

View File

@ -35,7 +35,6 @@ G_BEGIN_DECLS
#define GTK_IS_ENTRY_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ENTRY_COMPLETION))
#define GTK_IS_ENTRY_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY_COMPLETION))
#define GTK_ENTRY_COMPLETION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ENTRY_COMPLETION, GtkEntryCompletionClass))
#define GTK_ENTRY_COMPLETION_GET_PRIVATE(obj)(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ENTRY_COMPLETION, GtkEntryCompletionPrivate))
typedef struct _GtkEntryCompletion GtkEntryCompletion;
typedef struct _GtkEntryCompletionClass GtkEntryCompletionClass;