diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-06-26 10:25:14 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-06-26 10:25:14 +0000 |
commit | f0b7224fdefa936b06ff5d092f109f0bd30377da (patch) | |
tree | 520c680dc83c0d94da531d314685cbe2cac2320d /gtk | |
parent | 041c9d59e11ed03705ddc827abc87a3a58c5ec25 (diff) | |
download | gtk+-f0b7224fdefa936b06ff5d092f109f0bd30377da.tar.gz |
Avoid a refcounting leak in the python bindings. (#344876, Phil Dumont)
2006-06-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_cell_view_menu_item_new): Avoid
a refcounting leak in the python bindings. (#344876, Phil Dumont)
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcombobox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index af4738dbb9..99ed8d0f43 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2565,6 +2565,9 @@ gtk_cell_view_menu_item_new (GtkComboBox *combo_box, GtkRequisition req; cell_view = gtk_cell_view_new (); + item = gtk_menu_item_new (); + gtk_container_add (GTK_CONTAINER (item), cell_view); + gtk_cell_view_set_model (GTK_CELL_VIEW (cell_view), model); path = gtk_tree_model_get_path (model, iter); gtk_cell_view_set_displayed_row (GTK_CELL_VIEW (cell_view), path); @@ -2573,9 +2576,6 @@ gtk_cell_view_menu_item_new (GtkComboBox *combo_box, gtk_combo_box_sync_cells (combo_box, GTK_CELL_LAYOUT (cell_view)); gtk_widget_size_request (cell_view, &req); gtk_widget_show (cell_view); - - item = gtk_menu_item_new (); - gtk_container_add (GTK_CONTAINER (item), cell_view); return item; } |