aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-11-29 10:39:22 +0200
committerMarius Vlad <marius.vlad@collabora.com>2024-11-29 10:56:48 +0200
commit81e1e631c495b8e8ab1fe479c0ddcd7744d81eda (patch)
treeed6328e3ac86fe309bea52c1e767d68af9b188b1
parent404f7128b1589fa3bfbb5ea55c0a51a5fef91bb0 (diff)
app: Replace AGL.conf with getenvHEADmaster
This replaces configuration file with a OUTPUT_NAME env variable to use for placing tbnativ on other outputs. Bug-AGL: SPEC-5310 Change-Id: I4d1eef228384d061b917c2976714eb4500c17d97 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-rw-r--r--app/main.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 41773f0..71e2d13 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -15,34 +15,19 @@
#include "qcheapruler.hpp"
#include "file_operation.h"
+#include <cstdlib>
#include "AglShellGrpcClient.h"
std::string
read_config_and_get_output(void)
{
- GKeyFile *conf_file;
- gchar *value;
- GError *err = NULL;
+ char *ret;
- bool ret;
- int n;
- unsigned width, height, x, y;
-
- // Load settings from configuration file if it exists
- conf_file = g_key_file_new();
-
- ret = g_key_file_load_from_dirs(conf_file, "AGL.conf",
- (const gchar**) g_get_system_config_dirs(),
- NULL, G_KEY_FILE_KEEP_COMMENTS, NULL);
+ ret = getenv("OUTPUT_NAME");
if (!ret)
return std::string("");
- value = g_key_file_get_string(conf_file, "tbtnavi", "output", &err);
- if (!value) {
- return std::string("");
- }
-
- return std::string(value);
+ return std::string(ret);
}
int main(int argc, char *argv[])