Commit b6aa6f0f authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Use g_signal_connect_object() to prevent premature finalization of the

2004-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_start_editing): Use
	g_signal_connect_object() to prevent premature finalization
	of the cell_editable while the key_press_event signal is
	handled.  (#156325, Olivier Andrieu)
parent d5f92150
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_start_editing): Use
g_signal_connect_object() to prevent premature finalization
of the cell_editable while the key_press_event signal is
handled. (#156325, Olivier Andrieu)
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
......
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_start_editing): Use
g_signal_connect_object() to prevent premature finalization
of the cell_editable while the key_press_event signal is
handled. (#156325, Olivier Andrieu)
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
......
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_start_editing): Use
g_signal_connect_object() to prevent premature finalization
of the cell_editable while the key_press_event signal is
handled. (#156325, Olivier Andrieu)
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
......
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_start_editing): Use
g_signal_connect_object() to prevent premature finalization
of the cell_editable while the key_press_event signal is
handled. (#156325, Olivier Andrieu)
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
......
......@@ -4714,10 +4714,8 @@ gtk_cell_editable_key_press (GtkWidget *widget,
}
else if (event->keyval == GDK_Return)
{
if (GTK_IS_CELL_EDITABLE (combo_box))
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
if (GTK_IS_CELL_EDITABLE (combo_box))
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
return TRUE;
}
......@@ -4785,17 +4783,17 @@ gtk_combo_box_start_editing (GtkCellEditable *cell_editable,
if (combo_box->priv->cell_view)
{
g_signal_connect (combo_box->priv->button, "key_press_event",
G_CALLBACK (gtk_cell_editable_key_press),
cell_editable);
g_signal_connect_object (combo_box->priv->button, "key_press_event",
G_CALLBACK (gtk_cell_editable_key_press),
cell_editable, 0);
gtk_widget_grab_focus (combo_box->priv->button);
}
else
{
g_signal_connect (GTK_BIN (combo_box)->child, "key_press_event",
G_CALLBACK (gtk_cell_editable_key_press),
cell_editable);
g_signal_connect_object (GTK_BIN (combo_box)->child, "key_press_event",
G_CALLBACK (gtk_cell_editable_key_press),
cell_editable, 0);
gtk_widget_grab_focus (GTK_WIDGET (GTK_BIN (combo_box)->child));
GTK_WIDGET_UNSET_FLAGS (combo_box->priv->button, GTK_CAN_FOCUS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment