anjuta r4170 - in trunk: . plugins/message-view plugins/sourceview plugins/symbol-db



Author: jhs
Date: Thu Aug 21 11:15:54 2008
New Revision: 4170
URL: http://svn.gnome.org/viewvc/anjuta?rev=4170&view=rev

Log:
2008-08-21  Johannes Schmid  <jhs gnome org>

	* plugins/message-view/plugin.c (activate_plugin),
	(deactivate_plugin), (ianjuta_msgman_add_view):
	* plugins/message-view/plugin.h:
	Fixed critical on plugin deactivation

	* plugins/symbol-db/symbol-db-engine.c (sdb_engine_finalize):
	Do not free mutex because that crashes 50% of the time.


Modified:
   trunk/ChangeLog
   trunk/plugins/message-view/plugin.c
   trunk/plugins/message-view/plugin.h
   trunk/plugins/sourceview/sourceview-io.c
   trunk/plugins/symbol-db/symbol-db-engine.c

Modified: trunk/plugins/message-view/plugin.c
==============================================================================
--- trunk/plugins/message-view/plugin.c	(original)
+++ trunk/plugins/message-view/plugin.c	Thu Aug 21 11:15:54 2008
@@ -219,6 +219,7 @@
 					  G_CALLBACK (on_session_load), plugin);
 #endif
 	initialized = TRUE;
+	mv_plugin->widget_shown = FALSE;
 	return TRUE;
 }
 
@@ -241,7 +242,8 @@
 										  plugin);
 #endif
 	/* Widget is destroyed as soon as it is removed */
-	anjuta_shell_remove_widget (plugin->shell, mplugin->msgman, NULL);
+	if (mplugin->widget_shown)
+		anjuta_shell_remove_widget (plugin->shell, mplugin->msgman, NULL);
 	anjuta_ui_unmerge (ui, mplugin->uiid);
 	anjuta_ui_remove_action_group (ui, mplugin->action_group);
 	
@@ -305,6 +307,7 @@
 							 "AnjutaMessageView", _("Messages"),
 							 "message-manager-plugin-icon",
 							 ANJUTA_SHELL_PLACEMENT_BOTTOM, NULL);
+		ANJUTA_PLUGIN_MESSAGE_VIEW (plugin)->widget_shown = TRUE;
 	}
 	anjuta_shell_present_widget(shell, msgman, NULL);
 	message_view = anjuta_msgman_add_view (ANJUTA_MSGMAN (msgman), file, icon);

Modified: trunk/plugins/message-view/plugin.h
==============================================================================
--- trunk/plugins/message-view/plugin.h	(original)
+++ trunk/plugins/message-view/plugin.h	Thu Aug 21 11:15:54 2008
@@ -36,6 +36,8 @@
 	GtkWidget* msgman;
 	GtkActionGroup *action_group;
 	gint uiid;
+	
+	gboolean widget_shown;
 };
 
 struct _MessageViewPluginClass {

Modified: trunk/plugins/sourceview/sourceview-io.c
==============================================================================
--- trunk/plugins/sourceview/sourceview-io.c	(original)
+++ trunk/plugins/sourceview/sourceview-io.c	Thu Aug 21 11:15:54 2008
@@ -363,7 +363,7 @@
 												 &conv_error);
 		if  (converted_text == NULL)	
 		{
-			/* Last change, let's try 8859-15 */
+			/* Last chance, let's try 8859-15 */
 			enc = anjuta_encoding_get_from_charset( "ISO-8859-15");
 			
 			converted_text = anjuta_convert_to_utf8 (sio->read_buffer,

Modified: trunk/plugins/symbol-db/symbol-db-engine.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-engine.c	(original)
+++ trunk/plugins/symbol-db/symbol-db-engine.c	Thu Aug 21 11:15:54 2008
@@ -2323,19 +2323,22 @@
 		g_object_unref (priv->ctags_launcher);
 		priv->ctags_launcher = NULL;
 	}	
-
-	if (priv->timeout_trigger_handler > 0)
-		g_source_remove (priv->timeout_trigger_handler);
-	
-	if (priv->thread_monitor_handler > 0)
-		g_source_remove (priv->thread_monitor_handler);
 	
 	if (priv->mutex)
 	{
+		while (priv->concurrent_threads > 0)
+			;
 		g_mutex_free (priv->mutex);
 		priv->mutex = NULL;
 	}
+
 	
+	if (priv->timeout_trigger_handler > 0)
+		g_source_remove (priv->timeout_trigger_handler);
+	
+	if (priv->thread_monitor_handler > 0)
+		g_source_remove (priv->thread_monitor_handler);
+		
 	if (priv->thread_list_data != NULL)
 		g_queue_free  (priv->thread_list_data);
 	



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