summaryrefslogtreecommitdiff
path: root/linux/main.cpp
diff options
context:
space:
mode:
authorleo2000-08-22 14:14:07 +0000
committerleo2000-08-22 14:14:07 +0000
commita6a43f1b95bd33990a21fd1a52bff8c4a129d4e9 (patch)
tree844bcfb4fcc7812d53828cffd4acff76747f5341 /linux/main.cpp
parent4cb437c64ef4438f381fe95015c8155b789ff4b7 (diff)
Several changes, see docs/CHANGES.txt for a complete list
git-svn-id: http://svn.leocad.org/trunk@103 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'linux/main.cpp')
-rw-r--r--linux/main.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/linux/main.cpp b/linux/main.cpp
index 2655cb7..93b7ba1 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -24,7 +24,8 @@ void create_main_menu (GtkObject *window, GtkWidget *vbox);
GtkWidget *main_window;
GtkWidget *drawing_area;
-static char default_path[PATH_MAX];
+static char app_path[PATH_MAX];
+static char lib_path[] = "/usr/local/share/leocad/";
bool ignore_commands = false;
void init_paths (char *argv0)
@@ -89,10 +90,10 @@ void init_paths (char *argv0)
} while (*last && !found);
}
else
- argv0 = strrchr(argv0, '/')+1;
+ argv0 = strrchr (argv0, '/') + 1;
- if (realpath (temppath, default_path))
- *(strrchr (default_path, '/')) = '\0';
+ if (realpath (temppath, app_path))
+ *(strrchr (app_path, '/') + 1) = '\0';
}
// Functions
@@ -495,12 +496,7 @@ int main(int argc, char* argv[])
gtk_widget_show(GTK_WIDGET(main_window));
- char* path;
- path = getenv("LEOCAD_LIB");
- if (path == NULL)
- path = default_path;
-
- if (project->Initialize(argc, argv, path) == false)
+ if (project->Initialize (argc, argv, app_path, lib_path) == false)
{
delete project;
// return 1;