Remove unused config_dir argument for tm_get_workspace().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2079 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-11-30 17:34:01 +00:00
parent e2112fac0c
commit d1534b9c1d
5 changed files with 13 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2007-11-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/main.c, tagmanager/tm_project.c, tagmanager/tm_workspace.c,
tagmanager/include/tm_workspace.h:
Remove unused config_dir argument for tm_get_workspace().
2007-11-29 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> 2007-11-29 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* geany.glade, doc/geany.html, geany.txt, src/editor.c, * geany.glade, doc/geany.html, geany.txt, src/editor.c,

View File

@ -283,7 +283,7 @@ static void main_init(void)
prefs.tab_order_ltr = FALSE; prefs.tab_order_ltr = FALSE;
main_status.quitting = FALSE; main_status.quitting = FALSE;
app->ignore_callback = FALSE; app->ignore_callback = FALSE;
app->tm_workspace = tm_get_workspace(app->configdir); app->tm_workspace = tm_get_workspace();
ui_prefs.recent_queue = g_queue_new(); ui_prefs.recent_queue = g_queue_new();
main_status.opening_session_files = FALSE; main_status.opening_session_files = FALSE;

View File

@ -56,7 +56,7 @@ typedef struct _TMWorkspace
a workspace is created. Subsequent calls to the function will return the a workspace is created. Subsequent calls to the function will return the
created workspace. created workspace.
*/ */
const TMWorkspace *tm_get_workspace(const gchar *config_dir); const TMWorkspace *tm_get_workspace();
/*! Adds a work object (source file or project) to the workspace. /*! Adds a work object (source file or project) to the workspace.
\param work_object The work object to add to the project. \param work_object The work object to add to the project.

View File

@ -157,8 +157,7 @@ gboolean tm_project_add_file(TMProject *project, const char *file_name
,gboolean update) ,gboolean update)
{ {
TMWorkObject *source_file; TMWorkObject *source_file;
/// TODO if this will be ever used, pass app->config_dir instead of NULL const TMWorkObject *workspace = TM_WORK_OBJECT(tm_get_workspace());
const TMWorkObject *workspace = TM_WORK_OBJECT(tm_get_workspace(NULL));
char *path; char *path;
gboolean exists = FALSE; gboolean exists = FALSE;

View File

@ -29,7 +29,7 @@
static TMWorkspace *theWorkspace = NULL; static TMWorkspace *theWorkspace = NULL;
guint workspace_class_id = 0; guint workspace_class_id = 0;
static gboolean tm_create_workspace(const gchar *config_dir) static gboolean tm_create_workspace()
{ {
workspace_class_id = tm_work_object_register(tm_workspace_free, tm_workspace_update workspace_class_id = tm_work_object_register(tm_workspace_free, tm_workspace_update
, tm_workspace_find_object); , tm_workspace_find_object);
@ -79,12 +79,10 @@ void tm_workspace_free(gpointer workspace)
} }
} }
const TMWorkspace *tm_get_workspace(const gchar *config_dir) const TMWorkspace *tm_get_workspace()
{ {
if (NULL == config_dir)
return NULL;
if (NULL == theWorkspace) if (NULL == theWorkspace)
tm_create_workspace(config_dir); tm_create_workspace();
return theWorkspace; return theWorkspace;
} }