loginManager: Remove sessionActive property

It is unused after switching to GnomeSession:SessionIsActive, so
remove it together with shell_session_is_active_for_systemd().

https://bugzilla.gnome.org/show_bug.cgi?id=693161
This commit is contained in:
Florian Müllner 2013-02-03 22:25:02 +01:00
parent 526a16298c
commit e0c5a61be5
5 changed files with 0 additions and 82 deletions

View File

@ -128,33 +128,6 @@ PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedatas
AC_SUBST(CALENDAR_SERVER_CFLAGS) AC_SUBST(CALENDAR_SERVER_CFLAGS)
AC_SUBST(CALENDAR_SERVER_LIBS) AC_SUBST(CALENDAR_SERVER_LIBS)
AC_ARG_WITH(systemd,
AS_HELP_STRING([--with-systemd],
[Add systemd support]),
[with_systemd=$withval], [with_systemd=auto])
PKG_CHECK_MODULES(SYSTEMD,
[libsystemd-login libsystemd-daemon],
[have_systemd=yes], [have_systemd=no])
if test "x$with_systemd" = "xauto" ; then
if test x$have_systemd = xno ; then
use_systemd=no
else
use_systemd=yes
fi
else
use_systemd=$with_systemd
fi
if test "x$use_systemd" = "xyes"; then
if test "x$have_systemd" = "xno"; then
AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
fi
AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
fi
GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings` GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR]) AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])

View File

@ -51,12 +51,6 @@ const ConsoleKitManagerIface = <interface name='org.freedesktop.ConsoleKit.Manag
</interface>; </interface>;
const ConsoleKitSessionIface = <interface name='org.freedesktop.ConsoleKit.Session'> const ConsoleKitSessionIface = <interface name='org.freedesktop.ConsoleKit.Session'>
<method name='IsActive'>
<arg type='b' direction='out' />
</method>
<signal name='ActiveChanged'>
<arg type='b' direction='out' />
</signal>
<signal name='Lock' /> <signal name='Lock' />
<signal name='Unlock' /> <signal name='Unlock' />
</interface>; </interface>;
@ -109,10 +103,6 @@ const LoginManagerSystemd = new Lang.Class({
return this._currentSession; return this._currentSession;
}, },
get sessionActive() {
return Shell.session_is_active_for_systemd();
},
canPowerOff: function(asyncCallback) { canPowerOff: function(asyncCallback) {
this._proxy.CanPowerOffRemote(function(result, error) { this._proxy.CanPowerOffRemote(function(result, error) {
if (error) if (error)
@ -177,19 +167,6 @@ const LoginManagerConsoleKit = new Lang.Class({
return this._currentSession; return this._currentSession;
}, },
get sessionActive() {
if (this._sessionActive !== undefined)
return this._sessionActive;
let session = this.getCurrentSessionProxy();
session.connectSignal('ActiveChanged', Lang.bind(this, function(object, senderName, [isActive]) {
this._sessionActive = isActive;
}));
[this._sessionActive] = session.IsActiveSync();
return this._sessionActive;
},
canPowerOff: function(asyncCallback) { canPowerOff: function(asyncCallback) {
this._proxy.CanStopRemote(function(result, error) { this._proxy.CanStopRemote(function(result, error) {
if (error) if (error)

View File

@ -86,7 +86,6 @@ include Makefile-hotplug-sniffer.am
gnome_shell_cflags = \ gnome_shell_cflags = \
$(GNOME_SHELL_CFLAGS) \ $(GNOME_SHELL_CFLAGS) \
$(SYSTEMD_CFLAGS) \
-I$(srcdir)/tray \ -I$(srcdir)/tray \
-DVERSION=\"$(VERSION)\" \ -DVERSION=\"$(VERSION)\" \
-DLOCALEDIR=\"$(datadir)/locale\" \ -DLOCALEDIR=\"$(datadir)/locale\" \
@ -282,7 +281,6 @@ libgnome_shell_la_LDFLAGS = -avoid-version
libgnome_shell_la_LIBADD = \ libgnome_shell_la_LIBADD = \
-lm \ -lm \
$(GNOME_SHELL_LIBS) \ $(GNOME_SHELL_LIBS) \
$(SYSTEMD_LIBS) \
$(BLUETOOTH_LIBS) \ $(BLUETOOTH_LIBS) \
libst-1.0.la \ libst-1.0.la \
libtray.la \ libtray.la \

View File

@ -14,11 +14,6 @@
#include <langinfo.h> #include <langinfo.h>
#endif #endif
#ifdef WITH_SYSTEMD
#include <systemd/sd-daemon.h>
#include <systemd/sd-login.h>
#endif
static void static void
stop_pick (ClutterActor *actor, stop_pick (ClutterActor *actor,
const ClutterColor *color) const ClutterColor *color)
@ -355,29 +350,6 @@ shell_get_file_contents_utf8_sync (const char *path,
return contents; return contents;
} }
/**
* shell_session_is_active_for_systemd:
*
* Checks whether the session we are running in is currently active,
* i.e. in the foreground and ready for user input.
*
* Returns: TRUE if session is active
*/
gboolean
shell_session_is_active_for_systemd (void)
{
/* If this isn't systemd, let's assume the session is active. */
#ifdef WITH_SYSTEMD
if (sd_booted () <= 0)
return TRUE;
return sd_session_is_active (NULL) != 0;
#else
return TRUE;
#endif
}
/** /**
* shell_util_wifexited: * shell_util_wifexited:
* @status: the status returned by wait() or waitpid() * @status: the status returned by wait() or waitpid()

View File

@ -32,8 +32,6 @@ gboolean shell_write_string_to_stream (GOutputStream *stream,
char *shell_get_file_contents_utf8_sync (const char *path, char *shell_get_file_contents_utf8_sync (const char *path,
GError **error); GError **error);
gboolean shell_session_is_active_for_systemd (void);
gboolean shell_util_wifexited (int status, gboolean shell_util_wifexited (int status,
int *exit); int *exit);