Kaydet (Commit) 0f74a881 authored tarafından Enrico Tröger's avatar Enrico Tröger

Don't create tagmanager status file, seems to be unnecessary (needs testing).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2033 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 31e13db9
......@@ -3,6 +3,9 @@
* src/vte.c: Apply patch from Simone Denei to add a "Restart" item to
the VTE popup menu in case running application hangs.
* src/utils.c: Fix bug when creating configuration directory on Unix.
* tagmanager/tm_work_object.c, tagmanager/tm_workspace.c:
Don't create tagmanager status file, seems to be unnecessary
(needs testing).
2007-11-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -91,6 +91,8 @@ gboolean tm_work_object_init(TMWorkObject *work_object, guint type, const char *
struct stat s;
int status;
if (file_name != NULL)
{
if (0 != (status = g_stat(file_name, &s)))
{
if (create)
......@@ -115,13 +117,19 @@ gboolean tm_work_object_init(TMWorkObject *work_object, guint type, const char *
g_warning("%s: Not a regular file", file_name);
return FALSE;
}
work_object->type = type;
work_object->file_name = tm_get_real_path(file_name);
work_object->short_name = strrchr(work_object->file_name, '/');
if (work_object->short_name)
++ work_object->short_name;
else
work_object->short_name = work_object->file_name;
}
else
{
work_object->file_name = NULL;
work_object->short_name = NULL;
}
work_object->type = type;
work_object->parent = NULL;
work_object->analyze_time = 0;
work_object->tags_array = NULL;
......
......@@ -31,24 +31,18 @@ guint workspace_class_id = 0;
static gboolean tm_create_workspace(const gchar *config_dir)
{
/// TODO check whether the created file is really necessary at all
gchar *file_name = g_strdup_printf("%s%ctagmanager_%ld.%d",
config_dir, G_DIR_SEPARATOR, time(NULL), getpid());
workspace_class_id = tm_work_object_register(tm_workspace_free, tm_workspace_update
, tm_workspace_find_object);
theWorkspace = g_new(TMWorkspace, 1);
if (FALSE == tm_work_object_init(TM_WORK_OBJECT(theWorkspace),
workspace_class_id, file_name, TRUE))
workspace_class_id, NULL, TRUE))
{
g_free(file_name);
g_free(theWorkspace);
theWorkspace = NULL;
g_warning("Failed to initialize workspace");
return FALSE;
}
g_free(file_name);
theWorkspace->global_tags = NULL;
theWorkspace->work_objects = NULL;
return TRUE;
......
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