libmbca r12 - trunk/src



Author: kaijanma
Date: Tue Aug 12 11:34:25 2008
New Revision: 12
URL: http://svn.gnome.org/viewvc/libmbca?rev=12&view=rev

Log:
mark properly the remaining thread "feature"

Modified:
   trunk/src/common.h
   trunk/src/mbca_assistant.c
   trunk/src/provider_page.c
   trunk/src/provider_thread.c

Modified: trunk/src/common.h
==============================================================================
--- trunk/src/common.h	(original)
+++ trunk/src/common.h	Tue Aug 12 11:34:25 2008
@@ -174,7 +174,8 @@
 						   *   comments at the end of assistant_init()
 						   */ 
 						   
-	GMutex* trigger_mutex;
+	GMutex* trigger_mutex; /**< this is only a workaround of a thread problem 
+					    */
 	
 	
 	GSList* database;			   /**< service provider database    */
@@ -233,7 +234,11 @@
 							 *   sorted.				    */ 
 
 
-	MBCAAssistantClassPrivate* kpriv;
+	MBCAAssistantClassPrivate* kpriv; /**< this is only a workaround of a 
+								*   thread problem */
+								/** @todo fixme */
+	gboolean resources_attached;  /**< part of the workaround... */
+							/** @todo fixme */
 };
 
 

Modified: trunk/src/mbca_assistant.c
==============================================================================
--- trunk/src/mbca_assistant.c	(original)
+++ trunk/src/mbca_assistant.c	Tue Aug 12 11:34:25 2008
@@ -1078,8 +1078,16 @@
 	connect_signals (self);
 
 	
-	priv->kpriv = klass->priv;
+	priv->kpriv = klass->priv;	/** @todo fixme */
 	
+	/** @todo fixme 
+	 *
+	 * if provider thread attaches the resources to assistants, it breaks
+	 * the signaling system or something like that. Sometimes provider page
+	 * accepts input, but is drawn as insensitive, and sometimes country
+	 * expander appears as empty, and sometimes assistant buttons act all
+	 * wierd. 
+	 */
 #if 0	
 	/*
 	 * waiting_instances is a GSList of MBCAAssistantPrivate structs for

Modified: trunk/src/provider_page.c
==============================================================================
--- trunk/src/provider_page.c	(original)
+++ trunk/src/provider_page.c	Tue Aug 12 11:34:25 2008
@@ -36,10 +36,16 @@
 {
 	MBCAAssistant* assistant = user_data;
 	MBCAAssistantPrivate* priv = assistant->priv;
-	
-	g_mutex_lock (priv->kpriv->trigger_mutex);
-	mbca_provider_attach_resources (priv->kpriv, priv);
-	g_mutex_unlock (priv->kpriv->trigger_mutex);
+
+	/*this is only a workaround of a thread problem..
+	 *//** @todo fixme */
+	if (!priv->resources_attached)
+	{
+		g_mutex_lock (priv->kpriv->trigger_mutex);
+		mbca_provider_attach_resources (priv->kpriv, priv);
+		g_mutex_unlock (priv->kpriv->trigger_mutex);
+		priv->resources_attached = TRUE;
+	}
 }
 
 void

Modified: trunk/src/provider_thread.c
==============================================================================
--- trunk/src/provider_thread.c	(original)
+++ trunk/src/provider_thread.c	Tue Aug 12 11:34:25 2008
@@ -455,6 +455,7 @@
 	g_debug ("provider resources loaded");
 	
 
+	/** @todo fixme */
 #if 0
 	/* time for some attaching */
 	g_debug ("attaching resources to waiting instances");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]