added arguments support

This commit is contained in:
arturius453
2022-05-23 02:18:36 +03:00
committed by Miha Korenjak
parent d03f5b44d7
commit 2e8716dc7b

View File

@@ -65,8 +65,8 @@ int main(int argc, char **argv)
}
struct config conf;
conf.title = "Activate Linux";
conf.subtitle = "Go to Settings to activate Linux.";
conf.title = argc>1 ? argv[1] : "Activate Linux";
conf.subtitle = argc>2 ? argv[2] : "Go to Settings to activate Linux.";
GtkApplication *app = gtk_application_new(NULL, G_APPLICATION_FLAGS_NONE);
g_signal_connect(app, "activate", G_CALLBACK(activate), (void *) &conf);
int status = g_application_run(G_APPLICATION(app), 0, NULL);