[Goodies-dev] [Goodies-commits] r1753 - in verve-plugin/trunk: . panel-plugin

Jannis Pohlmann jannis at xfce.org
Tue Jul 11 21:15:23 CEST 2006


On Tue, 11 Jul 2006 20:04:18 +0200, Benedikt Meurer wrote:

> Jannis Pohlmann wrote:
> > Modified: verve-plugin/trunk/panel-plugin/verve-plugin.c
> > ===================================================================
> > --- verve-plugin/trunk/panel-plugin/verve-plugin.c
> > 2006-07-11 14:37:30 UTC (rev 1752) +++
> > verve-plugin/trunk/panel-plugin/verve-plugin.c	2006-07-11
> > 15:17:52 UTC (rev 1753) @@ -79,10 +79,10 @@ void
> >  verve_plugin_load_completion (VerveEnv* env, gpointer user_data)
> >  {
> > +  gdk_threads_enter ();
> > +
> >    VervePlugin *verve = (VervePlugin*) user_data;
> >  
> > -  g_debug ("Receiving load-binaries signal\n");
> > -
> >    verve->completion = g_completion_new (NULL);
> >  
> >    /* Load command history */
> > @@ -91,6 +91,8 @@
> >    /* Load linux binaries from PATH */
> >    GList *binaries = verve_env_get_path_binaries (env);
> >  
> > +  g_debug ("Receiving load-binaries signal\n");
> > +
> >    /* Add command history to completion */
> >    if (G_LIKELY (history != NULL)) 
> >      g_completion_add_items (verve->completion, history);
> > @@ -98,6 +100,8 @@
> >    /* Add binaries to completion list */
> >    if (G_LIKELY (binaries != NULL))
> >      g_completion_add_items (verve->completion, binaries);
> > +
> > +  gdk_threads_leave ();
> >  }
> 
> Err, no, that doesn't change anything. Please read the GDK threads
> documentation.

In your code (thunar-vfs-job.c) I fond a GDK_THREADS_ENTER/LEAVE around
the signal_emit call. Would something like this work?

Inside of the thread:

    gdk_threads_enter ();

    /* Emit 'load-binaries' signal */
    g_signal_emit_by_name (env, "load-binaries");

    gdk_threads_leave ();

- Jannis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/goodies-dev/attachments/20060711/73aa19c8/attachment.pgp>


More information about the Goodies-dev mailing list