summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-03-15 11:58:58 +0100
committerAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-03-15 11:58:58 +0100
commit0be4f86dcd85f6a91bfaa7b600da4b916ad4f432 (patch)
treef1d3b5cc629ad8baa62ed887e634fa2db2b72d67
parentd4c5a35005f4e1d69bbe0a8fc013e94e8122093b (diff)
work
-rwxr-xr-xbuild-linux.sh2
-rw-r--r--release-linux.sh2
-rw-r--r--src/mo_edit.c2
-rw-r--r--src/save.c3
4 files changed, 6 insertions, 3 deletions
diff --git a/build-linux.sh b/build-linux.sh
index 536cc17..545a940 100755
--- a/build-linux.sh
+++ b/build-linux.sh
@@ -36,7 +36,7 @@ cd src
ld -r -b binary -o ../bin/data.o ../data/imgs/en.png ../data/imgs/nl.png ../data/imgs/logo_64.png ../data/fonts/mono.ttf ../data/translations/en-English.mo ../data/translations/nl-Dutch.mo ../data/imgs/list.png ../data/imgs/delete.png ../data/imgs/exclaim.png ../data/imgs/add.png ../data/imgs/set.png
-gcc -Wall -g -m64 -DMODE_DEVELOPER -Wno-unused-label -rdynamic -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl -lcurl
+gcc -Wall -g -m64 -DMODE_DEVELOPER -Wno-unused-label -rdynamic -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl
rm -f ../bin/data.o
diff --git a/release-linux.sh b/release-linux.sh
index efc84ff..7eba327 100644
--- a/release-linux.sh
+++ b/release-linux.sh
@@ -10,7 +10,7 @@ cd src
ld -r -b binary -o ../bin/data.o ../data/imgs/en.png ../data/imgs/nl.png ../data/imgs/logo_64.png ../data/fonts/mono.ttf ../data/translations/en-English.mo ../data/translations/nl-Dutch.mo ../data/imgs/list.png ../data/imgs/delete.png ../data/imgs/exclaim.png ../data/imgs/add.png ../data/imgs/set.png
-gcc -Wall -O3 -m64 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl -lcurl
+gcc -Wall -O3 -m64 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl
rm -f ../bin/data.o
cp --remove-destination ../bin/mo-edit ../release/linux/mo-edit
diff --git a/src/mo_edit.c b/src/mo_edit.c
index 9b954b4..d0215d7 100644
--- a/src/mo_edit.c
+++ b/src/mo_edit.c
@@ -10,6 +10,8 @@
s32 global_language_id = 1;
char project_path[MAX_INPUT_LENGTH];
+// TODO(Aldrik): show current loaded project path somewhere (maybe title?)
+
typedef struct t_language
{
char *name;
diff --git a/src/save.c b/src/save.c
index 35eac85..4de31a8 100644
--- a/src/save.c
+++ b/src/save.c
@@ -193,6 +193,8 @@ bool read_mo_file(char *buffer, s32 buffer_size, s32 language_id)
void load_project_from_folder(char *path_buf)
{
+ string_copyn(project_path, path_buf, MAX_INPUT_LENGTH);
+
if (!platform_directory_exists(path_buf))
{
platform_show_message(main_window, localize("error_loading_project"), localize("project_directory_does_not_exist"));
@@ -277,7 +279,6 @@ static void* load_project_d(void *arg)
if (string_equals(path_buf, "")) return 0;
if (!platform_directory_exists(path_buf)) return 0;
- string_copyn(project_path, path_buf, MAX_INPUT_LENGTH);
load_project_from_folder(path_buf);
return 0;
}