From ae408194717f18ccb8a152d0b2d9044223d62f2c Mon Sep 17 00:00:00 2001 From: Ben Iofel Date: Wed, 6 Sep 2017 11:29:17 -0500 Subject: [PATCH] postmarketos-demos: Add shutdown button (#516) --- main/postmarketos-demos/APKBUILD | 4 ++-- main/postmarketos-demos/main.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main/postmarketos-demos/APKBUILD b/main/postmarketos-demos/APKBUILD index cc7575f77..09fe89288 100644 --- a/main/postmarketos-demos/APKBUILD +++ b/main/postmarketos-demos/APKBUILD @@ -1,6 +1,6 @@ pkgname=postmarketos-demos pkgver=4 -pkgrel=3 +pkgrel=4 pkgdesc="Simple touch menu for a few demo programs" url="https://github.com/postmarketOS" arch="all" @@ -20,5 +20,5 @@ package() { install -D -m755 "$srcdir"/postmarketos-demos \ "$pkgdir"/usr/bin/postmarketos-demos || return 1 } -sha512sums="7cb25e4d6a0224800703d0ee138edbf1b4ab71120190445d1fa57bec0835a9ab0b37fb343a4f6e01de3e3c7ffc2fc5c0c9bbcb15f9e867a9f9014ed682a10275 main.c +sha512sums="ae51469e6105dfd07e1ffb2ab3b6e2261239ca80b6e897951e7223cc8dd8fcb7c98f06f2e3870203a2f840ce4b5d425b4943ae0091631bbf48ae283d3cf1f86a main.c 83d8a95e9e1e95dffa8661e547444e83e72e572dcd0c637376f678bbd20a351c4b971a315311edefeb58a4cca14fd3e586fb581a262b2d217e25092459539b98 Makefile" diff --git a/main/postmarketos-demos/main.c b/main/postmarketos-demos/main.c index b296c0326..0bcd941f3 100644 --- a/main/postmarketos-demos/main.c +++ b/main/postmarketos-demos/main.c @@ -31,7 +31,9 @@ static void activate(GtkApplication *app, gpointer user_data) "GTK3 Demo", "gtk3-demo &", "Restart Weston", - "killall weston &" + "killall weston &", + "Shutdown", + "poweroff &" }; for(int i=0;i<(sizeof(programs) / sizeof(const char*));i+=2) @@ -40,7 +42,7 @@ static void activate(GtkApplication *app, gpointer user_data) const char *command = programs[i+1]; GtkWidget *button = gtk_button_new_with_label(title); - gtk_widget_set_size_request(button, 200, 80); + 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);