From b195275c53fe3aaf50dee383f1aa5e329f9e22cb Mon Sep 17 00:00:00 2001 From: nedko Date: Fri, 18 Feb 2005 02:16:42 +0000 Subject: [PATCH] Setup path module used to access project specific data files. --- gtk/main.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/gtk/main.c b/gtk/main.c index 4888ba2..be66353 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1,7 +1,7 @@ /* -*- Mode: C ; c-basic-offset: 2 -*- */ /***************************************************************************** * - * $Id: main.c,v 1.3 2004/05/21 23:43:38 nedko Exp $ + * $Id: main.c,v 1.4 2005/02/18 02:16:42 nedko Exp $ * * DESCRIPTION: * @@ -12,7 +12,6 @@ *****************************************************************************/ #include -#include #include #include @@ -23,8 +22,8 @@ #include "../libfrontend/disk.h" #include "../libfrontend/error.h" #include "medias.h" +#include "path.h" -const char *pszPathToExecutable; GtkWidget *pMainWindow = NULL; void @@ -67,24 +66,9 @@ main( char ** argv ) { - char *pszExecutable; - gtk_init(&argc, &argv); - /* FIXME: pszPathToExecutable calculation is ugly workaround */ - pszExecutable = strrchr(argv[0], '/'); - - if (pszExecutable == NULL) - { - pszExecutable = argv[0]; - pszPathToExecutable = ""; - } - else - { - *pszExecutable = 0; - pszExecutable++; - pszPathToExecutable = argv[0]; - } + path_init(argv[0]); /* Look into configuration file */ @@ -102,6 +86,8 @@ main( db_uninit(); + path_uninit(); + return 0; } @@ -112,6 +98,9 @@ main( * !!! WARNING !!! Following lines are automatically updated by the CVS system. * * $Log: main.c,v $ + * Revision 1.4 2005/02/18 02:16:42 nedko + * Setup path module used to access project specific data files. + * * Revision 1.3 2004/05/21 23:43:38 nedko * Implement media window. * -- 2.11.4.GIT