diff --git a/main/postmarketos-demos/Makefile b/main/postmarketos-demos/Makefile deleted file mode 100755 index 63f85ef82..000000000 --- a/main/postmarketos-demos/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -postmarketos-demos: main.c - $(CC) `pkg-config --cflags gtk+-3.0` -o postmarketos-demos \ - main.c `pkg-config --libs gtk+-3.0` -Werror diff --git a/main/postmarketos-demos/main.c b/main/postmarketos-demos/main.c deleted file mode 100644 index a875bad85..000000000 --- a/main/postmarketos-demos/main.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include - -static void onclick(GtkWidget *widget, gpointer command) -{ - system((const char *)command); -} - -static void activate(GtkApplication *app, gpointer user_data) -{ - GtkWidget *window = gtk_application_window_new(app); - gtk_window_set_title(GTK_WINDOW(window), "postmarketOS demos"); - - GtkWidget *button_box = gtk_button_box_new( - GTK_ORIENTATION_VERTICAL); - gtk_container_add(GTK_CONTAINER(window), button_box); - - const char *programs[] = { - "GTK3 Demo", - "gtk3-demo &", - "Firefox (XWayland, needs to be installed)", - "firefox &", - "weston-presentation-shm (Animation)", - "weston-presentation-shm &", - "weston-simple-damage (Animation)", - "weston-simple-damage &", - "weston-smoke (Touch)", - "weston-smoke &", - "weston-editor (Touch)", - "weston-editor &", - "htop (Terminal)", - "weston-terminal -f --shell=/usr/bin/htop &", - "Restart Weston", - "killall weston &", - }; - - for (int i = 0; i < (sizeof(programs) / sizeof(const char *)); i += 2) { - const char *title = programs[i]; - const char *command = programs[i + 1]; - - GtkWidget *button = gtk_button_new_with_label(title); - gtk_widget_set_size_request(button, 200, 70); - g_signal_connect(button, "clicked", G_CALLBACK(onclick), - (void *)command); - gtk_container_add(GTK_CONTAINER(button_box), button); - } - gtk_widget_show_all(window); -} - -int main(int argc, char **argv) -{ - GtkApplication *app = gtk_application_new("org.postmarketos.demos", - G_APPLICATION_FLAGS_NONE); - 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; -}