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

Jannis Pohlmann jannis at xfce.org
Tue Jan 16 11:32:26 CET 2007


Author: jannis
Date: 2007-01-16 10:32:25 +0000 (Tue, 16 Jan 2007)
New Revision: 2373

Modified:
   verve-plugin/trunk/ChangeLog
   verve-plugin/trunk/panel-plugin/verve-plugin.c
Log:
	* panel-plugin/verve-plugin.c: Add some more G_LOCK/G_UNLOCK
	  calls to protect the command completion. This fixes some
	  serious issues I had with Verve crashing when a command was
	  entered but the completion had not been loaded completely.

Modified: verve-plugin/trunk/ChangeLog
===================================================================
--- verve-plugin/trunk/ChangeLog	2007-01-16 04:30:57 UTC (rev 2372)
+++ verve-plugin/trunk/ChangeLog	2007-01-16 10:32:25 UTC (rev 2373)
@@ -1,3 +1,10 @@
+2007-01-16	Jannis Pohlmann <jannis at xfce.org>
+
+	* panel-plugin/verve-plugin.c: Add some more G_LOCK/G_UNLOCK
+	  calls to protect the command completion. This fixes some
+	  serious issues I had with Verve crashing when a command was
+	  entered but the completion had not been loaded completely.
+
 2006-11-27	Jannis Pohlmann <jannis at xfce.org>
 
 	* panel-plugin/verve-plugin.c: Properly modify the foreground 

Modified: verve-plugin/trunk/panel-plugin/verve-plugin.c
===================================================================
--- verve-plugin/trunk/panel-plugin/verve-plugin.c	2007-01-16 04:30:57 UTC (rev 2372)
+++ verve-plugin/trunk/panel-plugin/verve-plugin.c	2007-01-16 10:32:25 UTC (rev 2373)
@@ -394,8 +394,12 @@
                 /* Add command to history */
                 verve_history_add (g_strdup (command));
 
+                G_LOCK (plugin_completion_mutex);
+
                 /* Add command to completion */
                 verve->completion->items = g_list_insert_sorted (verve->completion->items, g_strdup (command), (GCompareFunc) g_utf8_collate);
+
+                G_UNLOCK (plugin_completion_mutex);
               }
       
             /* Reset current history entry */
@@ -451,9 +455,13 @@
             prefix = command;
           }
 
+        G_LOCK (plugin_completion_mutex);
+
         /* Get all completion results */
         similar = g_completion_complete (completion, prefix, NULL);
 
+        G_UNLOCK (plugin_completion_mutex);
+
         /* Check if there are any results */
         if (G_LIKELY (similar != NULL))
           {




More information about the Goodies-commits mailing list