[gnome-shell] Replace GdmUser with AccountsService
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Replace GdmUser with AccountsService
- Date: Mon, 29 Aug 2011 21:07:32 +0000 (UTC)
commit fa786fd3ef2bb3904013dc23fc86edf39b6410f1
Author: Florian MÃllner <fmuellner gnome org>
Date: Tue May 10 16:13:05 2011 +0200
Replace GdmUser with AccountsService
The GdmUser copy+paste code has been superseded by AccountsService,
so kill the former and use the latter.
https://bugzilla.gnome.org/show_bug.cgi?id=650893
js/ui/endSessionDialog.js | 4 +-
js/ui/polkitAuthenticationAgent.js | 4 +-
js/ui/userMenu.js | 25 +-
src/Makefile-gdmuser.am | 35 -
src/Makefile.am | 11 -
src/gdmuser/gdm-user-manager.c | 3084 --------------------------------
src/gdmuser/gdm-user-manager.h | 91 -
src/gdmuser/gdm-user-private.h | 49 -
src/gdmuser/gdm-user.c | 1099 ------------
src/gdmuser/gdm-user.h | 64 -
src/main.c | 2 +-
tools/build/gnome-shell-build-setup.sh | 6 +-
12 files changed, 21 insertions(+), 4453 deletions(-)
---
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index 70f996a..3403d69 100644
--- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js
@@ -22,8 +22,8 @@ const DBus = imports.dbus;
const Lang = imports.lang;
const Signals = imports.signals;
+const AccountsService = imports.gi.AccountsService;
const Clutter = imports.gi.Clutter;
-const Gdm = imports.gi.Gdm;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Pango = imports.gi.Pango;
@@ -237,7 +237,7 @@ EndSessionDialog.prototype = {
_init: function() {
ModalDialog.ModalDialog.prototype._init.call(this, { styleClass: 'end-session-dialog' });
- this._user = Gdm.UserManager.ref_default().get_user(GLib.get_user_name());
+ this._user = AccountsService.UserManager.get_default().get_user(GLib.get_user_name());
this._secondsLeft = 0;
this._totalSecondsToStayOpen = 0;
diff --git a/js/ui/polkitAuthenticationAgent.js b/js/ui/polkitAuthenticationAgent.js
index a99cf3f..8ab7e48 100644
--- a/js/ui/polkitAuthenticationAgent.js
+++ b/js/ui/polkitAuthenticationAgent.js
@@ -23,10 +23,10 @@
const Lang = imports.lang;
const Signals = imports.signals;
const Shell = imports.gi.Shell;
+const AccountsService = imports.gi.AccountsService;
const Clutter = imports.gi.Clutter;
const St = imports.gi.St;
const Pango = imports.gi.Pango;
-const Gdm = imports.gi.Gdm;
const Gio = imports.gi.Gio;
const Mainloop = imports.mainloop;
const Polkit = imports.gi.Polkit;
@@ -92,7 +92,7 @@ AuthenticationDialog.prototype = {
let userName = userNames[0];
- this._user = Gdm.UserManager.ref_default().get_user(userName);
+ this._user = AccountsService.UserManager.get_default().get_user(userName);
let userRealName = this._user.get_real_name()
this._userLoadedId = this._user.connect('notify::is_loaded',
Lang.bind(this, this._onUserChanged));
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index b9f9f16..8d71ce2 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -1,6 +1,6 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
-const Gdm = imports.gi.Gdm;
+const AccountsService = imports.gi.AccountsService;
const DBus = imports.dbus;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
@@ -183,10 +183,9 @@ IMStatusChooserItem.prototype = {
this._IMStatusChanged(mgr, presence, s, msg);
}));
- this._gdm = Gdm.UserManager.ref_default();
- this._gdm.queue_load();
+ this._userManager = AccountsService.UserManager.get_default();
- this._user = this._gdm.get_user(GLib.get_user_name());
+ this._user = this._userManager.get_user(GLib.get_user_name());
this._userLoadedId = this._user.connect('notify::is-loaded',
Lang.bind(this,
@@ -367,10 +366,9 @@ UserMenuButton.prototype = {
this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
- this._gdm = Gdm.UserManager.ref_default();
- this._gdm.queue_load();
+ this._userManager = AccountsService.UserManager.get_default();
- this._user = this._gdm.get_user(GLib.get_user_name());
+ this._user = this._userManager.get_user(GLib.get_user_name());
this._presence = new GnomeSession.Presence();
this._session = new GnomeSession.SessionManager();
this._haveShutdown = true;
@@ -416,9 +414,12 @@ UserMenuButton.prototype = {
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName));
this._createSubMenu();
- this._gdm.connect('notify::is-loaded', Lang.bind(this, this._updateSwitchUser));
- this._gdm.connect('user-added', Lang.bind(this, this._updateSwitchUser));
- this._gdm.connect('user-removed', Lang.bind(this, this._updateSwitchUser));
+ this._userManager.connect('notify::is-loaded',
+ Lang.bind(this, this._updateSwitchUser));
+ this._userManager.connect('user-added',
+ Lang.bind(this, this._updateSwitchUser));
+ this._userManager.connect('user-removed',
+ Lang.bind(this, this._updateSwitchUser));
this._lockdownSettings.connect('changed::' + DISABLE_USER_SWITCH_KEY,
Lang.bind(this, this._updateSwitchUser));
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
@@ -459,7 +460,7 @@ UserMenuButton.prototype = {
_updateSwitchUser: function() {
let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
- if (allowSwitch && this._gdm.can_switch ())
+ if (allowSwitch && this._userManager.can_switch ())
this._loginScreenItem.actor.show();
else
this._loginScreenItem.actor.hide();
@@ -619,7 +620,7 @@ UserMenuButton.prototype = {
// Ensure we only move to GDM after the screensaver has activated; in some
// OS configurations, the X server may block event processing on VT switch
this._screenSaverProxy.SetActiveRemote(true, Lang.bind(this, function() {
- this._gdm.goto_login_session();
+ this._userManager.goto_login_session();
}));
},
diff --git a/src/Makefile.am b/src/Makefile.am
index be7351a..73e56df 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -68,7 +68,6 @@ gnome-shell-extension-tool: gnome-shell-extension-tool.in Makefile
CLEANFILES += gnome-shell $(bin_SCRIPTS)
-include Makefile-gdmuser.am
include Makefile-st.am
include Makefile-tray.am
include Makefile-gvc.am
@@ -263,7 +262,6 @@ libgnome_shell_la_LIBADD = \
$(GNOME_SHELL_LIBS) \
$(BLUETOOTH_LIBS) \
libst-1.0.la \
- libgdmuser-1.0.la \
libtray.la \
libgvc.la \
$(NULL)
@@ -288,12 +286,3 @@ St_1_0_gir_FILES = $(filter-out %-private.h $(st_non_gir_sources), $(addprefix $
$(addprefix $(srcdir)/,$(st_source_c))
INTROSPECTION_GIRS += St-1.0.gir
CLEANFILES += St-1.0.gir
-
-Gdm-1.0.gir: libgdmuser-1.0.la
-Gdm_1_0_gir_INCLUDES = GObject-2.0 GdkPixbuf-2.0
-Gdm_1_0_gir_CFLAGS = $(gdmuser_cflags)
-Gdm_1_0_gir_LIBS = libgdmuser-1.0.la
-Gdm_1_0_gir_FILES = $(filter-out %-private.h, $(addprefix $(srcdir)/,$(gdmuser_source_h))) \
- $(addprefix $(srcdir)/,$(gdmuser_source_c))
-INTROSPECTION_GIRS += Gdm-1.0.gir
-CLEANFILES += Gdm-1.0.gir
diff --git a/src/main.c b/src/main.c
index 116f00f..23c33a5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -534,7 +534,7 @@ main (int argc, char **argv)
/* Disable debug spew from various libraries */
g_log_set_handler ("Gvc", G_LOG_LEVEL_DEBUG,
muted_log_handler, NULL);
- g_log_set_handler ("GdmUser", G_LOG_LEVEL_DEBUG,
+ g_log_set_handler ("AccountsService", G_LOG_LEVEL_DEBUG,
muted_log_handler, NULL);
g_log_set_handler ("Bluetooth", G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_MESSAGE,
muted_log_handler, NULL);
diff --git a/tools/build/gnome-shell-build-setup.sh b/tools/build/gnome-shell-build-setup.sh
index 6288874..fef109e 100644
--- a/tools/build/gnome-shell-build-setup.sh
+++ b/tools/build/gnome-shell-build-setup.sh
@@ -68,7 +68,7 @@ fi
# Non-devel packages needed by gnome-shell and its deps:
# glxinfo, gstreamer-plugins-base, gstreamer-plugins-good,
# gvfs, python, pygobject, gnome-python (gconf),
-# icon-naming-utils, zenity, libtasn1-tools
+# icon-naming-utils, zenity, libtasn1-tools accountsservice
if test "x$system" = xUbuntu -o "x$system" = xDebian -o "x$system" = xLinuxMint ; then
reqd="
@@ -84,7 +84,7 @@ if test "x$system" = xUbuntu -o "x$system" = xDebian -o "x$system" = xLinuxMint
libltdl-dev libvorbis-dev iso-codes libgnome-keyring-dev libusb-1.0-0-dev
libupower-glib-dev libcups2-dev libproxy-dev libdb-dev libproxy-dev
libsqlite3-dev libgudev-1.0-dev libsane-dev libwebkitgtk-3.0-0
- libx11-xcb-dev libupower-glib-dev
+ libx11-xcb-dev libupower-glib-dev accountsservice
"
if apt-cache show libxcb-util0-dev > /dev/null 2> /dev/null; then
@@ -117,7 +117,7 @@ fi
if test "x$system" = xFedora ; then
reqd="
- binutils curl gcc gcc-c++ make
+ binutils curl gcc gcc-c++ make accountsservice
automake bison flex gettext git gnome-common gnome-doc-utils gperf gvfs intltool
libtool pkgconfig dbus-glib-devel gnome-desktop-devel gnome-menus-devel
gnome-python2-gconf jasper-devel libffi-devel libical-devel libjpeg-devel libpng-devel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]