forked from AuroraMiddleware/gtk
Add back the monitoring of the selection when the combo isn't popped down;
Wed Dec 4 12:44:50 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcombo.c (gtk_combo_selection_changed): Add back the monitoring of the selection when the combo isn't popped down; apparently people depended upon the side-effect where gtk_combo_set_popdown_strings() would wipe out the contents of the list when browse-mode autoselected the first item in the list. (#100347)
This commit is contained in:
parent
31f6adf535
commit
b295f552ee
@ -1,3 +1,12 @@
|
||||
Wed Dec 4 12:44:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_selection_changed): Add
|
||||
back the monitoring of the selection when the combo
|
||||
isn't popped down; apparently people depended upon
|
||||
the side-effect where gtk_combo_set_popdown_strings()
|
||||
would wipe out the contents of the list when browse-mode
|
||||
autoselected the first item in the list. (#100347)
|
||||
|
||||
Tue Dec 3 17:47:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Dec 4 12:44:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_selection_changed): Add
|
||||
back the monitoring of the selection when the combo
|
||||
isn't popped down; apparently people depended upon
|
||||
the side-effect where gtk_combo_set_popdown_strings()
|
||||
would wipe out the contents of the list when browse-mode
|
||||
autoselected the first item in the list. (#100347)
|
||||
|
||||
Tue Dec 3 17:47:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Dec 4 12:44:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_selection_changed): Add
|
||||
back the monitoring of the selection when the combo
|
||||
isn't popped down; apparently people depended upon
|
||||
the side-effect where gtk_combo_set_popdown_strings()
|
||||
would wipe out the contents of the list when browse-mode
|
||||
autoselected the first item in the list. (#100347)
|
||||
|
||||
Tue Dec 3 17:47:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Dec 4 12:44:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_selection_changed): Add
|
||||
back the monitoring of the selection when the combo
|
||||
isn't popped down; apparently people depended upon
|
||||
the side-effect where gtk_combo_set_popdown_strings()
|
||||
would wipe out the contents of the list when browse-mode
|
||||
autoselected the first item in the list. (#100347)
|
||||
|
||||
Tue Dec 3 17:47:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Dec 4 12:44:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_selection_changed): Add
|
||||
back the monitoring of the selection when the combo
|
||||
isn't popped down; apparently people depended upon
|
||||
the side-effect where gtk_combo_set_popdown_strings()
|
||||
would wipe out the contents of the list when browse-mode
|
||||
autoselected the first item in the list. (#100347)
|
||||
|
||||
Tue Dec 3 17:47:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Dec 4 12:44:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_selection_changed): Add
|
||||
back the monitoring of the selection when the combo
|
||||
isn't popped down; apparently people depended upon
|
||||
the side-effect where gtk_combo_set_popdown_strings()
|
||||
would wipe out the contents of the list when browse-mode
|
||||
autoselected the first item in the list. (#100347)
|
||||
|
||||
Tue Dec 3 17:47:24 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
|
||||
|
@ -671,6 +671,7 @@ gtk_combo_update_entry (GtkCombo * combo)
|
||||
GtkList *list = GTK_LIST (combo->list);
|
||||
char *text;
|
||||
|
||||
g_signal_handler_block (list, combo->list_change_id);
|
||||
if (list->selection)
|
||||
{
|
||||
text = gtk_combo_func (GTK_LIST_ITEM (list->selection->data));
|
||||
@ -678,6 +679,15 @@ gtk_combo_update_entry (GtkCombo * combo)
|
||||
text = "";
|
||||
gtk_entry_set_text (GTK_ENTRY (combo->entry), text);
|
||||
}
|
||||
g_signal_handler_unblock (list, combo->list_change_id);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_combo_selection_changed (GtkList *list,
|
||||
GtkCombo *combo)
|
||||
{
|
||||
if (!GTK_WIDGET_VISIBLE (combo->popwin))
|
||||
gtk_combo_update_entry (combo);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -956,6 +966,9 @@ gtk_combo_init (GtkCombo * combo)
|
||||
gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (combo->popup)));
|
||||
gtk_widget_show (combo->list);
|
||||
|
||||
combo->list_change_id = g_signal_connect (combo->list, "selection_changed",
|
||||
G_CALLBACK (gtk_combo_selection_changed), combo);
|
||||
|
||||
g_signal_connect (combo->popwin, "key_press_event",
|
||||
G_CALLBACK (gtk_combo_list_key_press), combo);
|
||||
g_signal_connect (combo->popwin, "button_press_event",
|
||||
|
Loading…
Reference in New Issue
Block a user