From 0849664209839adf6fe85608e1303ab44de26d63 Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Wed, 14 Oct 1998 09:07:18 +0000 Subject: [PATCH] Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro * gtk/gtkcombo.c: try completion on MOD1-TAB. Handle case when the combo->list is empty. --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkcombo.c | 5 ++++- 8 files changed, 39 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0ab1dcab2..c11edc544 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro + + * gtk/gtkcombo.c: try completion on MOD1-TAB. + Handle case when the combo->list is empty. + Mon Oct 12 07:51:34 1998 Tim Janik * gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 0ab1dcab2..c11edc544 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro + + * gtk/gtkcombo.c: try completion on MOD1-TAB. + Handle case when the combo->list is empty. + Mon Oct 12 07:51:34 1998 Tim Janik * gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0ab1dcab2..c11edc544 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro + + * gtk/gtkcombo.c: try completion on MOD1-TAB. + Handle case when the combo->list is empty. + Mon Oct 12 07:51:34 1998 Tim Janik * gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0ab1dcab2..c11edc544 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro + + * gtk/gtkcombo.c: try completion on MOD1-TAB. + Handle case when the combo->list is empty. + Mon Oct 12 07:51:34 1998 Tim Janik * gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0ab1dcab2..c11edc544 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro + + * gtk/gtkcombo.c: try completion on MOD1-TAB. + Handle case when the combo->list is empty. + Mon Oct 12 07:51:34 1998 Tim Janik * gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0ab1dcab2..c11edc544 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro + + * gtk/gtkcombo.c: try completion on MOD1-TAB. + Handle case when the combo->list is empty. + Mon Oct 12 07:51:34 1998 Tim Janik * gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0ab1dcab2..c11edc544 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Wed, 14 Oct 1998 10:17:13 +0200 Paolo Molaro + + * gtk/gtkcombo.c: try completion on MOD1-TAB. + Handle case when the combo->list is empty. + Mon Oct 12 07:51:34 1998 Tim Janik * gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c index a392df963..8da37ca15 100644 --- a/gtk/gtkcombo.c +++ b/gtk/gtkcombo.c @@ -118,12 +118,15 @@ gtk_combo_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkCombo * com GList *li; /* completion */ - if (event->keyval == GDK_Tab) + if ((event->keyval == GDK_Tab) && (event->state & GDK_MOD1_MASK)) { GCompletion * cmpl; gchar* prefix; gchar* nprefix = NULL; gint pos; + + if ( !GTK_LIST(combo->list)->children ) + return FALSE; gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event"); cmpl = g_completion_new((GCompletionFunc)gtk_combo_func);