From 0157900ccb8d03bf8532d7e9c04b926f7ea63853 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Fri, 12 May 2023 15:37:26 +0200 Subject: Initial commit --- src/main.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main.c (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..d8e8285 --- /dev/null +++ b/src/main.c @@ -0,0 +1,28 @@ +/* See LICENSE file for copyright and license details. */ + +#include +#include + +static void +activate (GtkApplication *app, gpointer user_data) +{ + GtkWidget *window = gtk_application_window_new(app); + gtk_window_set_title(GTK_WINDOW(window), APPNAME); + gtk_window_set_default_size(GTK_WINDOW(window), 200, 200); + gtk_widget_set_visible(window, TRUE); +} + +int +main(int argc, char **argv) +{ + GtkApplication *app = + gtk_application_new("it.alessandroiezzi.timelog", + G_APPLICATION_DEFAULT_FLAGS); + + g_signal_connect(app, "activate", G_CALLBACK (activate), NULL); + int status = g_application_run (G_APPLICATION (app), argc, argv); + + g_object_unref (app); + + return status; +} -- cgit v1.2.3