Commit 942f0612 authored by Sebastien Granjoux's avatar Sebastien Granjoux

Fix a regression due to patch for #564377, files were not reopened when

	* plugins/file-loader/plugin.c:
	Fix a regression due to patch for #564377, files were not reopened
	when Anjuta restart

svn path=/trunk/; revision=4448
parent fb20f710
2008-12-14 Sébastien Granjoux <seb.sfo@free.fr>
* plugins/file-loader/plugin.c:
Fix a regression due to patch for #564377, files were not reopened
when Anjuta restart
2008-12-14 Adam Dingle <adam@medovina.org>
reviewed by: Sébastien Granjoux <seb.sfo@free.fr>
......@@ -1132,9 +1132,20 @@ on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase,
strcmp (mime_type, "application/x-anjuta") != 0))
{
/* Then rest of the files */
gchar *fragment = strchr (uri, '#');
if (fragment)
*fragment = '\0';
GFile* file = g_file_new_for_uri (uri);
ianjuta_file_loader_load (IANJUTA_FILE_LOADER (plugin),
GObject *loader = ianjuta_file_loader_load (IANJUTA_FILE_LOADER (plugin),
file, FALSE, NULL);
if (fragment)
{
if (IANJUTA_IS_DOCUMENT_MANAGER (loader))
{
ianjuta_document_manager_goto_file_line (IANJUTA_DOCUMENT_MANAGER (loader), file, atoi(fragment + 1), NULL);
}
}
g_object_unref (file);
}
g_free (filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment