anjuta r3481 - in trunk: . plugins/document-manager



Author: sgranjoux
Date: Wed Jan 16 18:52:18 2008
New Revision: 3481
URL: http://svn.gnome.org/viewvc/anjuta?rev=3481&view=rev

Log:
	* plugins/document-manager/anjuta-docman.c:
	Fix #507627 memory tab stay active on debugger stop
	Remove two unused variables due to the previous patch


Modified:
   trunk/ChangeLog
   trunk/plugins/document-manager/anjuta-docman.c

Modified: trunk/plugins/document-manager/anjuta-docman.c
==============================================================================
--- trunk/plugins/document-manager/anjuta-docman.c	(original)
+++ trunk/plugins/document-manager/anjuta-docman.c	Wed Jan 16 18:52:18 2008
@@ -1100,7 +1100,6 @@
 	GList *node;
 	const gchar *linenum;
 	gint lineno;
-	gboolean is_local_uri;
 	gchar *normalized_path = NULL;
 	gchar *local_path;
 	
@@ -1127,9 +1126,9 @@
 	/* Get the normalized file path for comparision */
 	local_path = gnome_vfs_get_local_path_from_uri (uri);
 	normalized_path = anjuta_util_get_real_path (local_path);
+	g_free (local_path);
 	if (normalized_path == NULL)
 		normalized_path = g_strdup (uri);
-	g_free (local_path);
 	
 	/* first, try to use a document that's already open */
 	for (node = docman->priv->pages; node != NULL; node = g_list_next (node))
@@ -1144,15 +1143,14 @@
 		te_uri = ianjuta_file_get_uri (IANJUTA_FILE (doc), NULL);
 		if (te_uri)
 		{
-			gboolean te_is_local_uri;
 			gchar *te_normalized_path;
 		
 			/* Get the normalized file path for comparision */
 			local_path = gnome_vfs_get_local_path_from_uri (te_uri);
 			te_normalized_path = anjuta_util_get_real_path (local_path);
+			g_free (local_path);
 			if (te_normalized_path == NULL)
 				te_normalized_path = g_strdup (te_uri);
-			g_free (local_path);
 
 			if (normalized_path && te_normalized_path)
 			{
@@ -1279,14 +1277,14 @@
 		{
 			gint curindx;
 			curindx = gtk_notebook_page_num (GTK_NOTEBOOK (docman), page->widget);
-			if (!(curindx == -1 || curindx == gtk_notebook_get_current_page (GTK_NOTEBOOK (docman))))
-				gtk_notebook_set_current_page (GTK_NOTEBOOK (docman), curindx);
-/* this is done by the page-switch cb
-			if (!page->is_current)
+			if (curindx != -1)
 			{
-				anjuta_docman_set_current_document (docman, doc);
+				if (curindx != gtk_notebook_get_current_page (GTK_NOTEBOOK (docman)))
+					gtk_notebook_set_current_page (GTK_NOTEBOOK (docman), curindx);
+				else
+					/* Make sure current page is visible */
+					anjuta_docman_grab_text_focus (docman);
 			}
-*/
 			break;
 		}
 		node = g_list_next (node);



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