anjuta r4584 - in trunk: . plugins/build-basic-autotools plugins/project-manager
- From: sgranjoux svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4584 - in trunk: . plugins/build-basic-autotools plugins/project-manager
- Date: Tue, 13 Jan 2009 06:22:34 +0000 (UTC)
Author: sgranjoux
Date: Tue Jan 13 06:22:33 2009
New Revision: 4584
URL: http://svn.gnome.org/viewvc/anjuta?rev=4584&view=rev
Log:
* plugins/project-manager/plugin.c:
* plugins/build-basic-autotools/configuration-list.c:
Fix problem that it is not possible to generate a new project
on NFS and subsequent crash in project configuration.
Partial port of project-manager to GIO
Modified:
trunk/ChangeLog
trunk/plugins/build-basic-autotools/configuration-list.c
trunk/plugins/project-manager/plugin.c
Modified: trunk/plugins/build-basic-autotools/configuration-list.c
==============================================================================
--- trunk/plugins/build-basic-autotools/configuration-list.c (original)
+++ trunk/plugins/build-basic-autotools/configuration-list.c Tue Jan 13 06:22:33 2009
@@ -235,9 +235,14 @@
/* Add configuration */
cfg = g_new0 (BuildConfiguration, 1);
cfg->name = g_strdup (name);
- for (prev = build_configuration_list_get_first (list); prev->next != NULL; prev = prev->next) ;
- cfg->prev = prev;
- prev->next = cfg;
+ prev = build_configuration_list_get_first (list);
+ if (prev != NULL)
+ {
+ /* Append configuration if list is not empty */
+ for (;prev->next != NULL; prev = prev->next) ;
+ prev->next = cfg;
+ cfg->prev = prev;
+ }
}
list->selected = cfg;
Modified: trunk/plugins/project-manager/plugin.c
==============================================================================
--- trunk/plugins/project-manager/plugin.c (original)
+++ trunk/plugins/project-manager/plugin.c Tue Jan 13 06:22:33 2009
@@ -108,26 +108,18 @@
static gchar*
get_session_dir (ProjectManagerPlugin *plugin)
{
- GnomeVFSURI *vfs_uri;
gchar *session_dir = NULL;
+ gchar *local_dir;
g_return_val_if_fail (plugin->project_root_uri, NULL);
- vfs_uri = gnome_vfs_uri_new (plugin->project_root_uri);
- if (vfs_uri && gnome_vfs_uri_is_local (vfs_uri))
+ local_dir = anjuta_util_get_local_path_from_uri (plugin->project_root_uri);
+ if (local_dir)
{
- gchar *local_dir;
-
- local_dir = gnome_vfs_get_local_path_from_uri (plugin->project_root_uri);
- if (local_dir)
- {
- session_dir = g_build_filename (local_dir, ".anjuta", "session",
- NULL);
- }
- g_free (local_dir);
+ session_dir = g_build_filename (local_dir, ".anjuta", "session",
+ NULL);
}
- if (vfs_uri)
- gnome_vfs_uri_unref (vfs_uri);
+ g_free (local_dir);
return session_dir;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]