├── .gitignore ├── README ├── data ├── meson.build ├── pishutdown.desktop └── pishutdown.ui ├── debian ├── changelog ├── control ├── copyright ├── pishutdown.lintian-overrides ├── pishutdown.preinst ├── rules └── source │ └── format ├── meson.build ├── po ├── Makefile.in.in ├── POTFILES.in ├── de.po ├── en_GB.po ├── fr.po ├── hu.po ├── hy.po ├── it.po ├── ko.po ├── linggen ├── meson.build ├── nb.po ├── pl.po ├── pt_BR.po ├── ru.po ├── sk.po └── zh_CN.po └── src ├── meson.build └── pishutdown.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | *.la 4 | *.a 5 | *.gmo 6 | *.lo 7 | .dirstamp 8 | .DS_Store 9 | lxde-pi-shutdown-helper 10 | config.log 11 | config.h 12 | .deps/ 13 | .libs/ 14 | debian/pishutdown 15 | Makefile 16 | autom4te.cache/* 17 | config.status 18 | libtool 19 | po/Makefile.in 20 | po/POTFILES 21 | po/stamp-it 22 | stamp-h1 23 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | How to build 2 | ------------ 3 | 4 | 1. Install dependencies 5 | 6 | The dependencies of any Debian project are listed in the "Build-Depends" section 7 | of the file named "control" in the "debian" subdirectory of the project. Either 8 | install each of these manually by using "sudo apt install ", or, 9 | if the project has already been released into apt, the build dependencies can all 10 | be automatically installed using the command "sudo apt build-dep ". 11 | 12 | 2. Configure meson 13 | 14 | To configure the meson build system, use the command "meson setup builddir" 15 | in the top directory of the project. This will create a subdirectory "builddir", 16 | and by default set the project for installation in the /usr/local tree, 17 | which will not overwrite a version which has been installed from apt. 18 | 19 | If you wish to overwrite a preinstalled version in the /usr tree, use the command 20 | "meson setup builddir --prefix=/usr --libdir=/usr/lib/". 21 | On a 32-bit system, should be "arm-linux-gnueabihf". 22 | On a 64-bit system, should be "aarch64-linux-gnu". 23 | 24 | 3. Build 25 | 26 | To build the application, change to the "builddir" directory and use the 27 | command "meson compile". 28 | 29 | 4. Install 30 | 31 | To install the application and all required data files, change to the 32 | "builddir" directory and use the command "sudo meson install". 33 | -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | install_data('pishutdown.ui', install_dir: ui_dir) 2 | install_data('pishutdown.desktop', install_dir: desktop_dir) 3 | -------------------------------------------------------------------------------- /data/pishutdown.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=Shutdown 4 | Exec=pishutdown 5 | Icon=system-shutdown 6 | Terminal=false 7 | Type=Application 8 | NoDisplay=true 9 | -------------------------------------------------------------------------------- /data/pishutdown.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 300 7 | False 8 | 10 9 | Shutdown options 10 | False 11 | center 12 | rpi 13 | 14 | 15 | 16 | 17 | 18 | True 19 | False 20 | vertical 21 | 5 22 | 23 | 24 | Shutdown 25 | True 26 | True 27 | True 28 | True 29 | 30 | 31 | False 32 | True 33 | 0 34 | 35 | 36 | 37 | 38 | Reboot 39 | True 40 | True 41 | True 42 | True 43 | 44 | 45 | False 46 | True 47 | 1 48 | 49 | 50 | 51 | 52 | Lock Screen 53 | True 54 | True 55 | True 56 | True 57 | 58 | 59 | False 60 | True 61 | 2 62 | 63 | 64 | 65 | 66 | Logout 67 | True 68 | True 69 | True 70 | True 71 | 72 | 73 | False 74 | True 75 | 3 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | pishutdown (0.32) bookworm; urgency=medium 2 | 3 | * Text change 4 | 5 | -- Simon Long Tue, 18 Mar 2025 14:13:08 +0000 6 | 7 | pishutdown (0.31) bookworm; urgency=medium 8 | 9 | * Add lock screen option 10 | 11 | -- Simon Long Thu, 06 Mar 2025 14:47:55 +0000 12 | 13 | pishutdown (0.30) bookworm; urgency=medium 14 | 15 | * Remove libinput handling 16 | 17 | -- Simon Long Tue, 17 Sep 2024 12:00:33 +0100 18 | 19 | pishutdown (0.29) bookworm; urgency=medium 20 | 21 | * Translation update 22 | 23 | -- Simon Long Tue, 16 Jul 2024 07:45:08 +0100 24 | 25 | pishutdown (0.28) bookworm; urgency=medium 26 | 27 | * Kill processes directly rather than via logind 28 | 29 | -- Simon Long Wed, 08 May 2024 11:25:05 +0100 30 | 31 | pishutdown (0.27) bookworm; urgency=medium 32 | 33 | * Use original process killing mechanism if booted to command line 34 | 35 | -- Simon Long Wed, 14 Feb 2024 14:18:40 +0000 36 | 37 | pishutdown (0.26) bookworm; urgency=medium 38 | 39 | * Use systemd-login D-Bus to logout users 40 | 41 | -- Simon Long Thu, 01 Feb 2024 13:38:19 +0000 42 | 43 | pishutdown (0.25) bookworm; urgency=medium 44 | 45 | * Use libinput to detect power key presses 46 | 47 | -- Simon Long Wed, 31 Jan 2024 14:29:59 +0000 48 | 49 | pishutdown (0.24) bookworm; urgency=medium 50 | 51 | * Add labwc compatibility 52 | 53 | -- Simon Long Thu, 11 Jan 2024 14:11:58 +0000 54 | 55 | pishutdown (0.23) bookworm; urgency=medium 56 | 57 | * More efficient wayfire test 58 | 59 | -- Simon Long Mon, 10 Jul 2023 10:05:33 +0100 60 | 61 | pishutdown (0.22) bookworm; urgency=medium 62 | 63 | * Added Korean translation 64 | 65 | -- Simon Long Wed, 05 Apr 2023 11:48:28 +0100 66 | 67 | pishutdown (0.21) bullseye; urgency=medium 68 | 69 | * Use systemctl is-active to check lightdm status 70 | 71 | -- Simon Long Tue, 07 Feb 2023 14:10:36 +0000 72 | 73 | pishutdown (0.20) bullseye; urgency=medium 74 | 75 | * Just kill wayfire process to logout 76 | 77 | -- Simon Long Tue, 31 Jan 2023 07:26:49 +0000 78 | 79 | pishutdown (0.19) bullseye; urgency=medium 80 | 81 | * Add Wayland compatibility 82 | 83 | -- Simon Long Tue, 06 Dec 2022 17:33:47 +0000 84 | 85 | pishutdown (0.18) bullseye; urgency=medium 86 | 87 | * Add French translation 88 | 89 | -- Simon Long Thu, 18 Nov 2021 11:24:08 +0000 90 | 91 | pishutdown (0.17) bullseye; urgency=medium 92 | 93 | * Fix translation bug 94 | 95 | -- Simon Long Fri, 08 Oct 2021 09:48:27 +0100 96 | 97 | pishutdown (0.16) bullseye; urgency=medium 98 | 99 | * GTK+3 version 100 | 101 | -- Simon Long Fri, 26 Mar 2021 14:09:55 +0000 102 | 103 | pishutdown (0.15) buster; urgency=medium 104 | 105 | * Added Slovak translation 106 | 107 | -- Simon Long Mon, 07 Dec 2020 08:03:06 +0000 108 | 109 | pishutdown (0.14) buster; urgency=medium 110 | 111 | * Add Russian translation 112 | 113 | -- Simon Long Fri, 30 Oct 2020 10:56:09 +0000 114 | 115 | pishutdown (0.13) buster; urgency=medium 116 | 117 | * Kill Orca before reboot or shutdown 118 | 119 | -- Simon Long Tue, 13 Oct 2020 16:39:18 +0100 120 | 121 | pishutdown (0.12) buster; urgency=medium 122 | 123 | * Add Italian translation 124 | 125 | -- Simon Long Fri, 24 Apr 2020 10:46:22 +0100 126 | 127 | pishutdown (0.11) buster; urgency=medium 128 | 129 | * Add Polish translation 130 | 131 | -- Simon Long Wed, 04 Sep 2019 10:12:32 +0100 132 | 133 | pishutdown (0.10) buster; urgency=medium 134 | 135 | * Added Norwegian translation 136 | 137 | -- Simon Long Wed, 21 Aug 2019 09:55:28 +0100 138 | 139 | pishutdown (0.9) stretch; urgency=medium 140 | 141 | * Resize properly when system font size changes 142 | 143 | -- Simon Long Thu, 11 Jan 2018 13:35:53 +0000 144 | 145 | pishutdown (0.8) jessie; urgency=medium 146 | 147 | * Allow escape key to close application 148 | 149 | -- Simon Long Fri, 12 May 2017 16:23:42 +0100 150 | 151 | pishutdown (0.7) jessie; urgency=medium 152 | 153 | * Corrected path for service system function 154 | 155 | -- Simon Long Thu, 13 Oct 2016 14:21:46 +0100 156 | 157 | pishutdown (0.6) jessie; urgency=medium 158 | 159 | * Absolute paths used for all system functions 160 | 161 | -- Simon Long Fri, 07 Oct 2016 16:33:59 +0100 162 | 163 | pishutdown (0.5) jessie; urgency=medium 164 | 165 | * Exit option now closes current xsession, rather than killing all sessions 166 | 167 | -- Simon Long Tue, 04 Oct 2016 13:41:21 +0100 168 | 169 | pishutdown (0.4) jessie; urgency=medium 170 | 171 | * Window width increased 172 | 173 | -- Simon Long Mon, 18 Jul 2016 15:30:00 +0100 174 | 175 | pishutdown (0.3) jessie; urgency=medium 176 | 177 | * pclose added 178 | * German translation added 179 | * Remove sudo prefix from commands 180 | 181 | -- Serge Schneider Fri, 27 May 2016 11:05:54 +0100 182 | 183 | pishutdown (0.2) jessie; urgency=medium 184 | 185 | * Accelerators added 186 | * Text tweaks 187 | 188 | -- Serge Schneider Thu, 21 Apr 2016 17:44:39 +0100 189 | 190 | pishutdown (0.1) unstable; urgency=low 191 | 192 | * Initial release 193 | 194 | -- Simon Long Mon, 14 Mar 2016 13:00:00 +0000 195 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: pishutdown 2 | Section: utils 3 | Priority: optional 4 | Maintainer: Simon Long 5 | Build-Depends: debhelper-compat (= 13), meson, libgtk-3-dev (>= 3.24), intltool (>= 0.40.0) 6 | Standards-Version: 4.5.1 7 | Homepage: http://raspberrypi.com/ 8 | 9 | Package: pishutdown 10 | Architecture: any 11 | Depends: ${shlibs:Depends}, ${misc:Depends}, libgtk-3-0 (>= 3.24), procps 12 | Description: Desktop shutdown helper for Raspberry Pi 13 | Small application offering shutdown / reboot / logout options, run from the 14 | shutdown option on the main menu. 15 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: pishutdown 3 | Source: http://github.com/raspberrypi/pishutdown 4 | 5 | Files: * 6 | Copyright: 2016-2025 Raspberry Pi 7 | License: BSD-3-Clause 8 | 9 | License: BSD-3-Clause 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions 12 | are met: 13 | 1. Redistributions of source code must retain the above copyright 14 | notice, this list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions and the following disclaimer in the 17 | documentation and/or other materials provided with the distribution. 18 | 3. Neither the name of the University nor the names of its contributors 19 | may be used to endorse or promote products derived from this software 20 | without specific prior written permission. 21 | . 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /debian/pishutdown.lintian-overrides: -------------------------------------------------------------------------------- 1 | pishutdown binary: binary-without-manpage 2 | -------------------------------------------------------------------------------- /debian/pishutdown.preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ upgrade = "$1" ]; then 6 | if dpkg --compare-versions "${2}" lt "0.31" ; then 7 | dpkg-divert --package pishutdown --rename --remove /usr/bin/lxde-pi-shutdown-helper 8 | fi 9 | fi 10 | 11 | #DEBHELPER# 12 | 13 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | %: 4 | dh $@ 5 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project ('pishutdown','c') 2 | 3 | share_dir = join_paths(get_option('prefix'), 'share') 4 | resource_dir = join_paths(share_dir, 'pishutdown') 5 | ui_dir = join_paths(resource_dir, 'ui') 6 | desktop_dir = join_paths(share_dir, 'applications') 7 | 8 | gettext_package = meson.project_name() 9 | 10 | i18n = import('i18n') 11 | 12 | add_project_arguments('-DGETTEXT_PACKAGE="' + gettext_package + '"', language : [ 'c', 'cpp' ]) 13 | add_project_arguments('-DPACKAGE_LOCALE_DIR="' + share_dir + '/locale"', language : [ 'c', 'cpp' ]) 14 | add_project_arguments('-DPACKAGE_DATA_DIR="' + resource_dir + '"', language : [ 'c', 'cpp' ]) 15 | add_project_arguments('-DPACKAGE_UI_DIR="' + ui_dir + '"', language : [ 'c', 'cpp' ]) 16 | 17 | subdir('src') 18 | subdir('data') 19 | subdir('po') 20 | -------------------------------------------------------------------------------- /po/Makefile.in.in: -------------------------------------------------------------------------------- 1 | # Makefile for program source directory in GNU NLS utilities package. 2 | # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper 3 | # Copyright (C) 2004-2008 Rodney Dawes 4 | # 5 | # This file may be copied and used freely without restrictions. It may 6 | # be used in projects which are not available under a GNU Public License, 7 | # but which still want to provide support for the GNU gettext functionality. 8 | # 9 | # - Modified by Owen Taylor to use GETTEXT_PACKAGE 10 | # instead of PACKAGE and to look for po2tbl in ./ not in intl/ 11 | # 12 | # - Modified by jacob berkman to install 13 | # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize 14 | # 15 | # - Modified by Rodney Dawes for use with intltool 16 | # 17 | # We have the following line for use by intltoolize: 18 | # INTLTOOL_MAKEFILE 19 | 20 | GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ 21 | PACKAGE = @PACKAGE@ 22 | VERSION = @VERSION@ 23 | 24 | SHELL = @SHELL@ 25 | 26 | srcdir = @srcdir@ 27 | top_srcdir = @top_srcdir@ 28 | top_builddir = @top_builddir@ 29 | VPATH = @srcdir@ 30 | 31 | prefix = @prefix@ 32 | exec_prefix = @exec_prefix@ 33 | datadir = @datadir@ 34 | datarootdir = @datarootdir@ 35 | libdir = @libdir@ 36 | localedir = @localedir@ 37 | subdir = po 38 | install_sh = @install_sh@ 39 | # Automake >= 1.8 provides @mkdir_p@. 40 | # Until it can be supposed, use the safe fallback: 41 | mkdir_p = $(install_sh) -d 42 | 43 | INSTALL = @INSTALL@ 44 | INSTALL_DATA = @INSTALL_DATA@ 45 | 46 | GMSGFMT = @GMSGFMT@ 47 | MSGFMT = @MSGFMT@ 48 | XGETTEXT = @XGETTEXT@ 49 | INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ 50 | INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ 51 | MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist 52 | GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot 53 | 54 | ALL_LINGUAS = @ALL_LINGUAS@ 55 | 56 | PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) 57 | 58 | USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) 59 | 60 | USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) 61 | 62 | POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) 63 | 64 | DISTFILES = Makefile.in.in POTFILES.in $(POFILES) 65 | EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS 66 | 67 | POTFILES = \ 68 | # This comment gets stripped out 69 | 70 | CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) 71 | 72 | .SUFFIXES: 73 | .SUFFIXES: .po .pox .gmo .mo .msg .cat 74 | 75 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 76 | INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V)) 77 | INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY)) 78 | INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@; 79 | 80 | .po.pox: 81 | $(MAKE) $(GETTEXT_PACKAGE).pot 82 | $(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox 83 | 84 | .po.mo: 85 | $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $< 86 | 87 | .po.gmo: 88 | $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \ 89 | && rm -f $$file && $(GMSGFMT) -o $$file $< 90 | 91 | .po.cat: 92 | sed -f ../intl/po2msg.sed < $< > $*.msg \ 93 | && rm -f $@ && gencat $@ $*.msg 94 | 95 | 96 | all: all-@USE_NLS@ 97 | 98 | all-yes: $(CATALOGS) 99 | all-no: 100 | 101 | $(GETTEXT_PACKAGE).pot: $(POTFILES) 102 | $(GENPOT) 103 | 104 | install: install-data 105 | install-data: install-data-@USE_NLS@ 106 | install-data-no: all 107 | install-data-yes: all 108 | linguas="$(USE_LINGUAS)"; \ 109 | for lang in $$linguas; do \ 110 | dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ 111 | $(mkdir_p) $$dir; \ 112 | if test -r $$lang.gmo; then \ 113 | $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ 114 | echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ 115 | else \ 116 | $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ 117 | echo "installing $(srcdir)/$$lang.gmo as" \ 118 | "$$dir/$(GETTEXT_PACKAGE).mo"; \ 119 | fi; \ 120 | if test -r $$lang.gmo.m; then \ 121 | $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ 122 | echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ 123 | else \ 124 | if test -r $(srcdir)/$$lang.gmo.m ; then \ 125 | $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ 126 | $$dir/$(GETTEXT_PACKAGE).mo.m; \ 127 | echo "installing $(srcdir)/$$lang.gmo.m as" \ 128 | "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ 129 | else \ 130 | true; \ 131 | fi; \ 132 | fi; \ 133 | done 134 | 135 | # Empty stubs to satisfy archaic automake needs 136 | dvi info ctags tags CTAGS TAGS ID: 137 | 138 | # Define this as empty until I found a useful application. 139 | install-exec installcheck: 140 | 141 | uninstall: 142 | linguas="$(USE_LINGUAS)"; \ 143 | for lang in $$linguas; do \ 144 | rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ 145 | rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ 146 | done 147 | 148 | check: all $(GETTEXT_PACKAGE).pot 149 | rm -f missing notexist 150 | srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m 151 | if [ -r missing -o -r notexist ]; then \ 152 | exit 1; \ 153 | fi 154 | 155 | mostlyclean: 156 | rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp 157 | rm -f .intltool-merge-cache 158 | 159 | clean: mostlyclean 160 | 161 | distclean: clean 162 | rm -f Makefile Makefile.in POTFILES stamp-it 163 | rm -f *.mo *.msg *.cat *.cat.m *.gmo 164 | 165 | maintainer-clean: distclean 166 | @echo "This command is intended for maintainers to use;" 167 | @echo "it deletes files that may require special tools to rebuild." 168 | rm -f Makefile.in.in 169 | 170 | distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) 171 | dist distdir: $(DISTFILES) 172 | dists="$(DISTFILES)"; \ 173 | extra_dists="$(EXTRA_DISTFILES)"; \ 174 | for file in $$extra_dists; do \ 175 | test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ 176 | done; \ 177 | for file in $$dists; do \ 178 | test -f $$file || file="$(srcdir)/$$file"; \ 179 | ln $$file $(distdir) 2> /dev/null \ 180 | || cp -p $$file $(distdir); \ 181 | done 182 | 183 | update-po: Makefile 184 | $(MAKE) $(GETTEXT_PACKAGE).pot 185 | tmpdir=`pwd`; \ 186 | linguas="$(USE_LINGUAS)"; \ 187 | for lang in $$linguas; do \ 188 | echo "$$lang:"; \ 189 | result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ 190 | if $$result; then \ 191 | if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 192 | rm -f $$tmpdir/$$lang.new.po; \ 193 | else \ 194 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 195 | :; \ 196 | else \ 197 | echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 198 | rm -f $$tmpdir/$$lang.new.po; \ 199 | exit 1; \ 200 | fi; \ 201 | fi; \ 202 | else \ 203 | echo "msgmerge for $$lang.gmo failed!"; \ 204 | rm -f $$tmpdir/$$lang.new.po; \ 205 | fi; \ 206 | done 207 | 208 | Makefile POTFILES: stamp-it 209 | @if test ! -f $@; then \ 210 | rm -f stamp-it; \ 211 | $(MAKE) stamp-it; \ 212 | fi 213 | 214 | stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in 215 | cd $(top_builddir) \ 216 | && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ 217 | $(SHELL) ./config.status 218 | 219 | # Tell versions [3.59,3.63) of GNU make not to export all variables. 220 | # Otherwise a system limit (for SysV at least) may be exceeded. 221 | .NOEXPORT: 222 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | [encoding: UTF-8] 2 | src/pishutdown.c 3 | -------------------------------------------------------------------------------- /po/de.po: -------------------------------------------------------------------------------- 1 | # German translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # Simon Long , 2016. 5 | # Benjamin Weis , 2016. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: pishutdown 0.1\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 12 | "PO-Revision-Date: 2016-05-14 19:28+0200\n" 13 | "Last-Translator: Benjamin Weis \n" 14 | "Language-Team: \n" 15 | "Language: de\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=ASCII\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | "X-Generator: Poedit 1.8.7\n" 21 | 22 | #: ../src/pishutdown.c:63 23 | msgid "Shutdown options" 24 | msgstr "Herunterfahroptionen" 25 | 26 | #: ../src/pishutdown.c:74 27 | msgid "Shutdown" 28 | msgstr "Herunterfahren" 29 | 30 | #: ../src/pishutdown.c:80 31 | msgid "Reboot" 32 | msgstr "Neu starten" 33 | 34 | #: ../src/pishutdown.c:88 35 | msgid "Logout" 36 | msgstr "Abmelden" 37 | 38 | #: ../src/pishutdown.c:90 39 | msgid "Exit to command line" 40 | msgstr "Beenden und zur Befehlszeile" 41 | -------------------------------------------------------------------------------- /po/en_GB.po: -------------------------------------------------------------------------------- 1 | # English translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # , 2016. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2016-03-11 18:07+0000\n" 12 | "Last-Translator: \n" 13 | "Language-Team: English (British)\n" 14 | "Language: en_GB\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=ASCII\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: ../src/pishutdown.c:63 21 | msgid "Shutdown options" 22 | msgstr "Shutdown Options" 23 | 24 | #: ../src/pishutdown.c:74 25 | msgid "Shutdown" 26 | msgstr "_Shutdown" 27 | 28 | #: ../src/pishutdown.c:80 29 | msgid "Reboot" 30 | msgstr "_Reboot" 31 | 32 | msgid "Lock Screen" 33 | msgstr "Loc_k Screen" 34 | 35 | #: ../src/pishutdown.c:88 36 | msgid "Logout" 37 | msgstr "_Logout" 38 | 39 | #: ../src/pishutdown.c:90 40 | msgid "Exit to command line" 41 | msgstr "Exit to Command _Line" 42 | -------------------------------------------------------------------------------- /po/fr.po: -------------------------------------------------------------------------------- 1 | # French translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # , 2016. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2021-11-07 12:00+0200\n" 12 | "Last-Translator: Steeve Breton \n" 13 | "Language-Team: French\n" 14 | "Language: fr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: ../src/pishutdown.c:63 21 | msgid "Shutdown options" 22 | msgstr "Options d'arrêt" 23 | 24 | #: ../src/pishutdown.c:74 25 | msgid "Shutdown" 26 | msgstr "Arrêter" 27 | 28 | #: ../src/pishutdown.c:80 29 | msgid "Reboot" 30 | msgstr "Redémarrer" 31 | 32 | #: ../src/pishutdown.c:88 33 | msgid "Logout" 34 | msgstr "Fermer la session" 35 | 36 | #: ../src/pishutdown.c:90 37 | msgid "Exit to command line" 38 | msgstr "Retourner en mode Ligne de commande" 39 | -------------------------------------------------------------------------------- /po/hu.po: -------------------------------------------------------------------------------- 1 | # Hungarian translation for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # , 2024. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2024-06-26 16:40+0200\n" 12 | "Last-Translator: Dr. Hornos Tamás \n" 13 | "Language-Team: SuperPrimo\n" 14 | "Language: hu\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: Poedit 3.4.4\n" 20 | 21 | #: ../src/pishutdown.c:63 22 | msgid "Shutdown options" 23 | msgstr "Leállítási opciók" 24 | 25 | #: ../src/pishutdown.c:74 26 | msgid "Shutdown" 27 | msgstr "Leállítás" 28 | 29 | #: ../src/pishutdown.c:80 30 | msgid "Reboot" 31 | msgstr "Újraindítás" 32 | 33 | #: ../src/pishutdown.c:88 34 | msgid "Logout" 35 | msgstr "Kijelentkezés" 36 | 37 | #: ../src/pishutdown.c:90 38 | msgid "Exit to command line" 39 | msgstr "Kilépés a parancssorba" 40 | -------------------------------------------------------------------------------- /po/hy.po: -------------------------------------------------------------------------------- 1 | # Armenian translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # , 2016. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2016-03-11 18:07+0000\n" 12 | "Last-Translator: \n" 13 | "Language-Team: Armenian\n" 14 | "Language: hy\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: ../src/pishutdown.c:63 21 | msgid "Shutdown options" 22 | msgstr "Դուրս գալու ընտրանքներ" 23 | 24 | #: ../src/pishutdown.c:74 25 | msgid "Shutdown" 26 | msgstr "Անջատել" 27 | 28 | #: ../src/pishutdown.c:80 29 | msgid "Reboot" 30 | msgstr "Վերագործարկել" 31 | 32 | #: ../src/pishutdown.c:88 33 | msgid "Logout" 34 | msgstr "Դուրս գալ" 35 | 36 | #: ../src/pishutdown.c:90 37 | msgid "Exit to command line" 38 | msgstr "Ելք դեպի վահանակ" 39 | -------------------------------------------------------------------------------- /po/it.po: -------------------------------------------------------------------------------- 1 | # Italian translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # Emanuele Goldoni , 2020. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2020-04-23 22:27+0200\n" 12 | "Last-Translator: Emanuele Goldoni \n" 13 | "Language-Team: English (British)\n" 14 | "Language: en_GB\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=ASCII\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: ../src/pishutdown.c:63 21 | msgid "Shutdown options" 22 | msgstr "Opzioni di arresto" 23 | 24 | #: ../src/pishutdown.c:74 25 | msgid "Shutdown" 26 | msgstr "Arresta" 27 | 28 | #: ../src/pishutdown.c:80 29 | msgid "Reboot" 30 | msgstr "Riavvia" 31 | 32 | #: ../src/pishutdown.c:88 33 | msgid "Logout" 34 | msgstr "Termina sessione" 35 | 36 | #: ../src/pishutdown.c:90 37 | msgid "Exit to command line" 38 | msgstr "Esci e passa al terminale" 39 | -------------------------------------------------------------------------------- /po/ko.po: -------------------------------------------------------------------------------- 1 | # English translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # , 2016. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2023-03-14 14:23+0900\n" 12 | "Language-Team: English (British)\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=1; plural=0;\n" 17 | "X-Generator: Poedit 2.4.2\n" 18 | "Last-Translator: Yi Yunseok \n" 19 | "Language: ko\n" 20 | 21 | #: ../src/pishutdown.c:63 22 | msgid "Shutdown options" 23 | msgstr "종료 옵션" 24 | 25 | #: ../src/pishutdown.c:74 26 | msgid "Shutdown" 27 | msgstr "시스템 종료" 28 | 29 | #: ../src/pishutdown.c:80 30 | msgid "Reboot" 31 | msgstr "재시작" 32 | 33 | #: ../src/pishutdown.c:88 34 | msgid "Logout" 35 | msgstr "로그아웃" 36 | 37 | #: ../src/pishutdown.c:90 38 | msgid "Exit to command line" 39 | msgstr "명령줄로 나가기" 40 | -------------------------------------------------------------------------------- /po/linggen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ls -1 *.po | cut -d . -f 1 > LINGUAS 3 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | run_command('linggen') 2 | i18n.gettext(meson.project_name(), preset: 'glib') 3 | -------------------------------------------------------------------------------- /po/nb.po: -------------------------------------------------------------------------------- 1 | # Norwegian Bokmål translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # Imre Kristoffer Eilertsen , 2019 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2019-08-14 18:51+0200\n" 12 | "Language-Team: Norwegian Bokmål\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 17 | "X-Generator: Poedit 2.2.3\n" 18 | "Last-Translator: Imre Kristoffer Eilertsen \n" 19 | "Language: nb\n" 20 | 21 | #: ../src/pishutdown.c:63 22 | msgid "Shutdown options" 23 | msgstr "Avskruingsalternativer" 24 | 25 | #: ../src/pishutdown.c:74 26 | msgid "Shutdown" 27 | msgstr "Skru av" 28 | 29 | #: ../src/pishutdown.c:80 30 | msgid "Reboot" 31 | msgstr "Omstart" 32 | 33 | #: ../src/pishutdown.c:88 34 | msgid "Logout" 35 | msgstr "Logg av" 36 | 37 | #: ../src/pishutdown.c:90 38 | msgid "Exit to command line" 39 | msgstr "Avslutt til ledeteksten" 40 | -------------------------------------------------------------------------------- /po/pl.po: -------------------------------------------------------------------------------- 1 | # Polish translations for pishutdown package. 2 | # Copyright (C) 2019 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # Marcin Sielski , 2019. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2019-09-02 21:55+0200\n" 12 | "Last-Translator: Marcin Sielski \n" 13 | "Language-Team: \n" 14 | "Language: pl\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: Poedit 2.2.1\n" 20 | 21 | #: ../src/pishutdown.c:63 22 | msgid "Shutdown options" 23 | msgstr "Opcje Zamykania" 24 | 25 | #: ../src/pishutdown.c:74 26 | msgid "Shutdown" 27 | msgstr "Zamknij" 28 | 29 | #: ../src/pishutdown.c:80 30 | msgid "Reboot" 31 | msgstr "Restartuj" 32 | 33 | #: ../src/pishutdown.c:88 34 | msgid "Logout" 35 | msgstr "Wyloguj" 36 | 37 | #: ../src/pishutdown.c:90 38 | msgid "Exit to command line" 39 | msgstr "Wyjdź do wiersza poleceń" 40 | -------------------------------------------------------------------------------- /po/pt_BR.po: -------------------------------------------------------------------------------- 1 | # Portuguese (Brazil) translations for pishutdown package. 2 | # Copyright (C) 2022 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # , 2022. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-12-07 17:20-03000\n" 11 | "PO-Revision-Date: 2022-12-07 17:20-0300\n" 12 | "Last-Translator: \n" 13 | "Language-Team: Portuguese (Brazil)\n" 14 | "Language: pt_BR\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: ../src/pishutdown.c:63 21 | msgid "Shutdown options" 22 | msgstr "Opções de Desligamento" 23 | 24 | #: ../src/pishutdown.c:74 25 | msgid "Shutdown" 26 | msgstr "_Desligar" 27 | 28 | #: ../src/pishutdown.c:80 29 | msgid "Reboot" 30 | msgstr "_Reiniciar" 31 | 32 | #: ../src/pishutdown.c:88 33 | msgid "Logout" 34 | msgstr "_Finalizar sessão" 35 | 36 | #: ../src/pishutdown.c:90 37 | msgid "Exit to command line" 38 | msgstr "Sair para _linha de comando" 39 | -------------------------------------------------------------------------------- /po/ru.po: -------------------------------------------------------------------------------- 1 | # Russian translation for pishutdown package. 2 | # By Alexander Ulyev 3 | 4 | msgid "" 5 | msgstr "" 6 | "Project-Id-Version: pishutdown 0.1\n" 7 | "Report-Msgid-Bugs-To: \n" 8 | "POT-Creation-Date: 2020-10-24 23:03+0700\n" 9 | "PO-Revision-Date: 2020-10-24 23:03+0700\n" 10 | "Last-Translator: \n" 11 | "Language-Team: Russian\n" 12 | "Language: ru_RU\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 17 | 18 | #: ../src/pishutdown.c:63 19 | msgid "Shutdown options" 20 | msgstr "Завершение работы" 21 | 22 | #: ../src/pishutdown.c:74 23 | msgid "Shutdown" 24 | msgstr "Выключение" 25 | 26 | #: ../src/pishutdown.c:80 27 | msgid "Reboot" 28 | msgstr "Перезагрузка" 29 | 30 | #: ../src/pishutdown.c:88 31 | msgid "Logout" 32 | msgstr "Выход" 33 | 34 | #: ../src/pishutdown.c:90 35 | msgid "Exit to command line" 36 | msgstr "Выход к командной строке" 37 | -------------------------------------------------------------------------------- /po/sk.po: -------------------------------------------------------------------------------- 1 | # Slovak translations for pishutdown package. 2 | # Copyright (C) 2019 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # Jose Riha , 2020. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2020-11-28 20:52+0100\n" 12 | "Last-Translator: Jose Riha \n" 13 | "Language-Team: \n" 14 | "Language: sk\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: Poedit 2.4.1\n" 20 | 21 | #: ../src/pishutdown.c:63 22 | msgid "Shutdown options" 23 | msgstr "Voľby vypnutia" 24 | 25 | #: ../src/pishutdown.c:74 26 | msgid "Shutdown" 27 | msgstr "Vypnúť" 28 | 29 | #: ../src/pishutdown.c:80 30 | msgid "Reboot" 31 | msgstr "Reštartovať" 32 | 33 | #: ../src/pishutdown.c:88 34 | msgid "Logout" 35 | msgstr "Odhlásiť sa" 36 | 37 | #: ../src/pishutdown.c:90 38 | msgid "Exit to command line" 39 | msgstr "Prejsť do príkazového riadka" 40 | -------------------------------------------------------------------------------- /po/zh_CN.po: -------------------------------------------------------------------------------- 1 | # Simplified Chinese translations for pishutdown package. 2 | # Copyright (C) 2016 THE pishutdown'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the pishutdown package. 4 | # ykla , 2024. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: pishutdown 0.1\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2016-03-11 18:06+0000\n" 11 | "PO-Revision-Date: 2024-07-14 15:38+0800\n" 12 | "Last-Translator: ykla \n" 13 | "Language-Team: English (British)\n" 14 | "Language: zh_CN\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=1; plural=0;\n" 19 | "X-Generator: Poedit 3.4.4\n" 20 | 21 | #: ../src/pishutdown.c:63 22 | msgid "Shutdown options" 23 | msgstr "关机选项" 24 | 25 | #: ../src/pishutdown.c:74 26 | msgid "Shutdown" 27 | msgstr "关机" 28 | 29 | #: ../src/pishutdown.c:80 30 | msgid "Reboot" 31 | msgstr "重启" 32 | 33 | #: ../src/pishutdown.c:88 34 | msgid "Logout" 35 | msgstr "登出" 36 | 37 | #: ../src/pishutdown.c:90 38 | msgid "Exit to command line" 39 | msgstr "退出到命令行" 40 | -------------------------------------------------------------------------------- /src/meson.build: -------------------------------------------------------------------------------- 1 | sources = files ( 2 | 'pishutdown.c' 3 | ) 4 | 5 | add_global_arguments('-Wno-unused-result', language : 'c') 6 | 7 | gtk = dependency ('gtk+-3.0') 8 | deps = [ gtk ] 9 | 10 | executable ('pishutdown', sources, dependencies: deps, install: true) 11 | -------------------------------------------------------------------------------- /src/pishutdown.c: -------------------------------------------------------------------------------- 1 | /*============================================================================ 2 | Copyright (c) 2016-2025 Raspberry Pi 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | ============================================================================*/ 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | //#define USE_LOGIND 34 | #ifdef USE_LOGIND 35 | GDBusProxy *proxy; 36 | #endif 37 | 38 | static void button_handler (GtkWidget *widget, gpointer data) 39 | { 40 | if (!strcmp (data, "shutdown")) system ("/usr/bin/pkill orca;/sbin/shutdown -h now"); 41 | if (!strcmp (data, "reboot")) system ("/usr/bin/pkill orca;/sbin/reboot"); 42 | if (!strcmp (data, "lock")) 43 | { 44 | system ("/usr/bin/swaylock -p"); 45 | gtk_main_quit (); 46 | } 47 | if (!strcmp (data, "exit")) 48 | { 49 | system ("/usr/bin/pkill orca"); 50 | #ifdef USE_LOGIND 51 | if (proxy && !system ("systemctl is-active lightdm | grep -qw active")) 52 | { 53 | GVariant *var = g_variant_new ("(ui)", getuid(), SIGKILL); 54 | g_dbus_proxy_call_sync (proxy, "KillUser", var, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); 55 | } 56 | else 57 | #endif 58 | if (!system ("pgrep wayfire > /dev/null")) system ("/usr/bin/pkill wayfire"); 59 | else if (!system ("pgrep labwc > /dev/null")) system ("/usr/bin/labwc -e"); 60 | else system ("/usr/bin/pkill lxsession"); 61 | } 62 | } 63 | 64 | static gboolean delete_event (GtkWidget *widget, GdkEvent *event, gpointer data) 65 | { 66 | gtk_main_quit (); 67 | return FALSE; 68 | } 69 | 70 | static gboolean key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data) 71 | { 72 | if (event->keyval == GDK_KEY_Escape) 73 | { 74 | gtk_main_quit (); 75 | return TRUE; 76 | } 77 | return FALSE; 78 | } 79 | 80 | #ifdef USE_LOGIND 81 | static void cb_name_owned (GDBusConnection *connection, const gchar *name, const gchar *owner, gpointer user_data) 82 | { 83 | proxy = g_dbus_proxy_new_sync (connection, 0, NULL, name, "/org/freedesktop/login1", "org.freedesktop.login1.Manager", NULL, NULL); 84 | } 85 | 86 | static void cb_name_unowned (GDBusConnection *connection, const gchar *name, gpointer user_data) 87 | { 88 | if (proxy) g_object_unref (proxy); 89 | proxy = NULL; 90 | } 91 | #endif 92 | 93 | /* The dialog... */ 94 | 95 | int main (int argc, char *argv[]) 96 | { 97 | GtkWidget *dlg, *btn; 98 | GtkBuilder *builder; 99 | 100 | setlocale (LC_ALL, ""); 101 | bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); 102 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 103 | textdomain (GETTEXT_PACKAGE); 104 | 105 | // GTK setup 106 | gtk_init (&argc, &argv); 107 | gtk_icon_theme_prepend_search_path (gtk_icon_theme_get_default(), PACKAGE_DATA_DIR); 108 | 109 | // build the UI 110 | builder = gtk_builder_new_from_file (PACKAGE_UI_DIR "/pishutdown.ui"); 111 | 112 | dlg = (GtkWidget *) gtk_builder_get_object (builder, "main_window"); 113 | g_signal_connect (G_OBJECT (dlg), "delete_event", G_CALLBACK (delete_event), NULL); 114 | g_signal_connect (G_OBJECT (dlg), "key-press-event", G_CALLBACK (key_press_event), NULL); 115 | gtk_widget_add_events (dlg, GDK_KEY_PRESS_MASK); 116 | 117 | btn = (GtkWidget *) gtk_builder_get_object (builder, "btn_shutdown"); 118 | g_signal_connect (G_OBJECT (btn), "clicked", G_CALLBACK (button_handler), "shutdown"); 119 | 120 | btn = (GtkWidget *) gtk_builder_get_object (builder, "btn_reboot"); 121 | g_signal_connect (G_OBJECT (btn), "clicked", G_CALLBACK (button_handler), "reboot"); 122 | 123 | btn = (GtkWidget *) gtk_builder_get_object (builder, "btn_lock"); 124 | if (getenv ("WAYLAND_DISPLAY")) g_signal_connect (G_OBJECT (btn), "clicked", G_CALLBACK (button_handler), "lock"); 125 | else gtk_widget_hide (btn); 126 | 127 | btn = (GtkWidget *) gtk_builder_get_object (builder, "btn_logout"); 128 | g_signal_connect (G_OBJECT (btn), "clicked", G_CALLBACK (button_handler), "exit"); 129 | if (system ("systemctl is-active lightdm | grep -qw active")) 130 | gtk_button_set_label (GTK_BUTTON (btn), _("Exit to command line")); 131 | 132 | #ifdef USE_LOGIND 133 | // set up callbacks to find DBus interface to system-logind 134 | proxy = NULL; 135 | g_bus_watch_name (G_BUS_TYPE_SYSTEM, "org.freedesktop.login1", 0, cb_name_owned, cb_name_unowned, NULL, NULL); 136 | #endif 137 | 138 | gtk_widget_show (dlg); 139 | gtk_main (); 140 | gtk_widget_destroy (dlg); 141 | 142 | return 0; 143 | } 144 | 145 | /* End of file */ 146 | /*----------------------------------------------------------------------------*/ 147 | --------------------------------------------------------------------------------