Commit 06af9624 authored by Morten Welinder's avatar Morten Welinder

GUI: Plug leaks.

parent 824b0bd1
2014-03-18 Morten Welinder <terra@gnome.org>
* src/gui-util.c (kill_popup_menu): One more try at really killing
the context menu after we're done with it.
* src/item-grid.c (item_grid_realize): Plug leak.
2014-03-18 Morten Welinder <terra@gnome.org>
* configure.ac: Post-release bump.
......
Gnumeric 1.12.14
Morten:
* Plug leaks.
--------------------------------------------------------------------------
Gnumeric 1.12.13
......
......@@ -446,16 +446,17 @@ gnm_gui_group_value (gpointer gui, char const * const group[])
static gboolean
cb_delayed_destroy (gpointer w)
{
gtk_widget_destroy (gtk_widget_get_toplevel (w));
gtk_widget_destroy (w);
g_object_unref (w);
return FALSE;
}
static void
kill_popup_menu (GtkWidget *widget, G_GNUC_UNUSED GtkMenu *menu)
kill_popup_menu (GtkWidget *widget, G_GNUC_UNUSED gpointer user)
{
/* gtk+ currently gets unhappy if we destroy here, see bug 725142 */
g_idle_add (cb_delayed_destroy,
gtk_widget_get_toplevel (widget));
g_idle_add (cb_delayed_destroy, widget);
}
/**
......@@ -475,9 +476,10 @@ gnumeric_popup_menu (GtkMenu *menu, GdkEvent *event)
if (event)
gtk_menu_set_screen (menu, gdk_event_get_screen (event));
g_object_ref_sink (menu);
g_signal_connect (G_OBJECT (menu),
"hide",
G_CALLBACK (kill_popup_menu), menu);
"hide",
G_CALLBACK (kill_popup_menu), NULL);
/* Do NOT pass the button used to create the menu.
* instead pass 0. Otherwise bringing up a menu with
......
......@@ -198,7 +198,8 @@ static void
item_grid_realize (GocItem *item)
{
GdkDisplay *display;
GnmItemGrid *ig;
GnmItemGrid *ig;
GdkPixbuf *cursor_cross_pixbuf;
parent_class->realize (item);
......@@ -207,9 +208,14 @@ item_grid_realize (GocItem *item)
display = gtk_widget_get_display (GTK_WIDGET (item->canvas));
ig->cursor_link = gdk_cursor_new_for_display (display, GDK_HAND2);
ig->cursor_cross = gdk_cursor_new_from_pixbuf (display,
gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), "cursor_cross", 32, 0, NULL),
17, 17);
cursor_cross_pixbuf =
gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
"cursor_cross", 32, 0, NULL);
ig->cursor_cross =
gdk_cursor_new_from_pixbuf (display,
cursor_cross_pixbuf,
17, 17);
g_object_unref (cursor_cross_pixbuf);
cb_cursor_motion (ig);
}
......
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