Commit 982d7023 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

menu: add GpLockLogout

parent 01d3f88a
......@@ -165,6 +165,7 @@ AC_SUBST(FISH_CFLAGS)
AC_SUBST(FISH_LIBS)
PKG_CHECK_MODULES([MENU], [
gdm
gio-unix-2.0 >= $GLIB_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
libgnome-menu-3.0 >= $LIBGNOME_MENU_REQUIRED
......
......@@ -22,6 +22,8 @@ menu_la_CFLAGS = \
menu_la_SOURCES = \
gp-bookmarks.c \
gp-bookmarks.h \
gp-lock-logout.c \
gp-lock-logout.h \
gp-main-menu-applet.c \
gp-main-menu-applet.h \
gp-menu-bar-applet.c \
......@@ -72,13 +74,49 @@ menu-resources.h: $(srcdir)/menu.gresource.xml $(menu_resources)
--sourcedir=$(srcdir) --generate-header --c-name menu \
$(srcdir)/menu.gresource.xml
gp-dm-seat-gen.h:
gp-dm-seat-gen.c: org.freedesktop.DisplayManager.Seat.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gp \
--generate-c-code gp-dm-seat-gen \
$(srcdir)/org.freedesktop.DisplayManager.Seat.xml
gp-login1-manager-gen.h:
gp-login1-manager-gen.c: org.freedesktop.login1.Manager.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gp \
--generate-c-code gp-login1-manager-gen \
$(srcdir)/org.freedesktop.login1.Manager.xml
gp-screensaver-gen.h:
gp-screensaver-gen.c: org.gnome.ScreenSaver.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gp \
--generate-c-code gp-screensaver-gen \
$(srcdir)/org.gnome.ScreenSaver.xml
gp-session-manager-gen.h:
gp-session-manager-gen.c: org.gnome.SessionManager.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gp \
--generate-c-code gp-session-manager-gen \
$(srcdir)/org.gnome.SessionManager.xml
BUILT_SOURCES = \
menu-resources.c \
menu-resources.h \
gp-dm-seat-gen.c \
gp-dm-seat-gen.h \
gp-login1-manager-gen.c \
gp-login1-manager-gen.h \
gp-screensaver-gen.c \
gp-screensaver-gen.h \
gp-session-manager-gen.c \
gp-session-manager-gen.h \
$(NULL)
EXTRA_DIST = \
menu.gresource.xml \
org.freedesktop.DisplayManager.Seat.xml \
org.freedesktop.login1.Manager.xml \
org.gnome.ScreenSaver.xml \
org.gnome.SessionManager.xml \
$(menu_resources) \
$(NULL)
......
This diff is collapsed.
/*
* Copyright (C) 2018 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GP_LOCK_LOGOUT_H
#define GP_LOCK_LOGOUT_H
#include <libgnome-panel/gp-applet.h>
G_BEGIN_DECLS
#define GP_TYPE_LOCK_LOGOUT (gp_lock_logout_get_type ())
G_DECLARE_FINAL_TYPE (GpLockLogout, gp_lock_logout, GP, LOCK_LOGOUT, GObject)
GpLockLogout *gp_lock_logout_new (GpApplet *applet);
void gp_lock_logout_append_to_menu (GpLockLogout *lock_logout,
GtkMenu *menu);
G_END_DECLS
#endif
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DisplayManager.Seat">
<annotation name="org.gtk.GDBus.C.Name" value="DmSeatGen" />
<method name="SwitchToGreeter" />
</interface>
</node>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.login1.Manager">
<annotation name="org.gtk.GDBus.C.Name" value="Login1ManagerGen" />
<method name="Suspend">
<arg name="interactive" type="b" direction="in" />
</method>
<method name="Hibernate">
<arg name="interactive" type="b" direction="in" />
</method>
<method name="HybridSleep">
<arg name="interactive" type="b" direction="in" />
</method>
<method name="CanSuspend">
<arg name="result" type="s" direction="out" />
</method>
<method name="CanHibernate">
<arg name="result" type="s" direction="out" />
</method>
<method name="CanHybridSleep">
<arg name="result" type="s" direction="out" />
</method>
</interface>
</node>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.gnome.ScreenSaver">
<annotation name="org.gtk.GDBus.C.Name" value="ScreensaverGen" />
<method name="Lock" />
</interface>
</node>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.gnome.SessionManager">
<annotation name="org.gtk.GDBus.C.Name" value="SessionManagerGen" />
<method name="Shutdown" />
<method name="Reboot" />
<method name="CanShutdown">
<arg name="is_available" direction="out" type="b" />
</method>
<method name="SetRebootToFirmwareSetup">
<arg name="enable" direction="in" type="b" />
</method>
<method name="CanRebootToFirmwareSetup">
<arg name="is_available" direction="out" type="b" />
</method>
<method name="Logout">
<arg name="mode" type="u" direction="in" />
</method>
</interface>
</node>
......@@ -59,6 +59,7 @@ modules/fish/fish-module.c
modules/fish/fish-menu.ui
modules/fish/fish.ui
modules/menu/gp-bookmarks.c
modules/menu/gp-lock-logout.c
modules/menu/gp-main-menu-applet.c
modules/menu/gp-menu-bar-applet.c
modules/menu/gp-menu-module.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment