mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
Remove the idle source in ::finalize...
2006-08-10 Emmanuele Bassi <ebassi@gnome.org> * gtk/gtkrecentchoosermenu.c: (gtk_recent_chooser_menu_finalize): Remove the idle source in ::finalize... (idle_populate_func), (idle_populate_clean_up): ...and reset the idle source id at the end of the idle loop while we hold the GDK mutex lock. (#350605, reported by Wouter Bolsterlee, patch by Chris Wilson)
This commit is contained in:
parent
3f94923850
commit
490bdc1ddd
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2006-08-10 Emmanuele Bassi <ebassi@gnome.org>
|
||||
|
||||
* gtk/gtkrecentchoosermenu.c:
|
||||
(gtk_recent_chooser_menu_finalize): Remove the idle
|
||||
source in ::finalize...
|
||||
|
||||
(idle_populate_func),
|
||||
(idle_populate_clean_up): ...and reset the idle source
|
||||
id at the end of the idle loop while we hold the GDK mutex
|
||||
lock. (#350605, reported by Wouter Bolsterlee, patch by
|
||||
Chris Wilson)
|
||||
|
||||
2006-08-10 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gdk/quartz/gdkwindow-quartz.c
|
||||
|
@ -1,3 +1,15 @@
|
||||
2006-08-10 Emmanuele Bassi <ebassi@gnome.org>
|
||||
|
||||
* gtk/gtkrecentchoosermenu.c:
|
||||
(gtk_recent_chooser_menu_finalize): Remove the idle
|
||||
source in ::finalize...
|
||||
|
||||
(idle_populate_func),
|
||||
(idle_populate_clean_up): ...and reset the idle source
|
||||
id at the end of the idle loop while we hold the GDK mutex
|
||||
lock. (#350605, reported by Wouter Bolsterlee, patch by
|
||||
Chris Wilson)
|
||||
|
||||
2006-08-10 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gdk/quartz/gdkwindow-quartz.c
|
||||
|
@ -250,6 +250,9 @@ gtk_recent_chooser_menu_finalize (GObject *object)
|
||||
g_signal_handler_disconnect (priv->manager, priv->manager_changed_id);
|
||||
priv->manager_changed_id = 0;
|
||||
|
||||
if (priv->populate_id)
|
||||
g_source_remove (priv->populate_id);
|
||||
|
||||
priv->manager = NULL;
|
||||
|
||||
if (priv->sort_data_destroy)
|
||||
@ -952,7 +955,10 @@ idle_populate_func (gpointer data)
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
pdata = (MenuPopulateData *) data;
|
||||
|
||||
priv = pdata->menu->priv;
|
||||
|
||||
priv->populate_id = 0;
|
||||
|
||||
if (!pdata->items)
|
||||
{
|
||||
pdata->items = gtk_recent_chooser_get_items (GTK_RECENT_CHOOSER (pdata->menu));
|
||||
@ -984,7 +990,6 @@ idle_populate_func (gpointer data)
|
||||
}
|
||||
|
||||
info = g_list_nth_data (pdata->items, pdata->loaded_items);
|
||||
priv = pdata->menu->priv;
|
||||
|
||||
/* skip non-local items on request */
|
||||
if (priv->local_only &&
|
||||
@ -1062,11 +1067,7 @@ check_and_return:
|
||||
static void
|
||||
idle_populate_clean_up (gpointer data)
|
||||
{
|
||||
MenuPopulateData *pdata = data;
|
||||
|
||||
pdata->menu->priv->populate_id = 0;
|
||||
|
||||
g_slice_free (MenuPopulateData, pdata);
|
||||
g_slice_free (MenuPopulateData, data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user