diff options
author | 2023-05-12 15:37:26 +0200 | |
---|---|---|
committer | 2023-05-12 15:37:26 +0200 | |
commit | 0157900ccb8d03bf8532d7e9c04b926f7ea63853 (patch) | |
tree | 08d9cf85769f7fcbaa6c0bdb25fed8ad273cfa9f /src/main.c | |
download | timelog-master.tar.gz timelog-master.zip |
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 28 |
1 files changed, 28 insertions, 0 deletions
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 <stdlib.h> +#include <gtk/gtk.h> + +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; +} |