Commit Graph

76 Commits

Author SHA1 Message Date
Giovanni Campagna
b9463d23e8 ShellUserVerifier: fix fail counter
If it is updated after checking, it counts the number of failures
not including the current one, so it allows one extra attempt. Instead,
by updating it before checking, we get the expected result of dropping the
curtain at the third password.

https://bugzilla.gnome.org/show_bug.cgi?id=687132
2012-10-29 17:54:12 +01:00
Giovanni Campagna
04debd1623 LoginDialog: clear previous auth failed messages when trying again
When the user has the entered the password for the second time
and clicked OK, clear messages from the previous attempt, so any
new failure is shown clearly.

https://bugzilla.gnome.org/show_bug.cgi?id=687132
2012-10-29 17:54:11 +01:00
Florian Müllner
9efe5287e4 gdm: Move logo into the panel
GDM has a 'logo' key in its schema to allow distributors to add
some branding. It is currently placed above the user list, which
no longer works too well since the login screen lost its dialog
window. Display the logo in the top-left corner instead of the
Activities button instead.

https://bugzilla.gnome.org/show_bug.cgi?id=685852
2012-10-25 18:31:16 +02:00
Florian Müllner
990443465f powerMenu: Use LoginManager for suspend
https://bugzilla.gnome.org/show_bug.cgi?id=686482
2012-10-23 21:14:10 +02:00
Giovanni Campagna
e249218a9d Allow testing GDM login dialog from the session
Check an environment variable, GDM_GREETER_TEST. If 1, LoginDialog will
skip anything that fails outside a GDM session.
It is therefore possible to test the GDM greeter without installing it
system-wide, by attempting login as the already logged in user (uses the
same code path as the unlock dialog).

https://bugzilla.gnome.org/show_bug.cgi?id=683725
2012-10-23 19:09:00 +02:00
Florian Müllner
86c85a752e loginScreen: Add support for 'disable-restart-buttons'
GDM's GSettings schema contains a 'disable-restart-buttons' key
that currently is only supported by the fallback greeter.
Implement support in the shell greeter as well.

https://bugzilla.gnome.org/show_bug.cgi?id=686247
2012-10-16 22:57:37 +02:00
Florian Müllner
3abfcda8b5 loginDialog: Use the same focus root for dialog and ctrl-alt-tab
Adding a group to the Ctrl-Alt-Tab popup will also add it to the
focus manager. Due to that, we currently end up with two focus
groups added for the login dialog - an explicit one for the entire
dialog, and an implicit one for the main content group.
When doing keynav, we ascend in the widget hierarchy from the
currently focused actor until we find a valid focus root, so
adding a children of the dialog as focus root breaks keynav to
any actors that are not inside the main content group.
The simple fix is to use the same group in both cases.

https://bugzilla.gnome.org/show_bug.cgi?id=684730
2012-10-11 19:04:43 +02:00
Florian Müllner
e8f96a6e16 loginDialog: Sync :expanded better with user list visibility
Now that we use a different text style for the username depending on
whether the user list is expanded or not, changing the :expanded style
before the actual transition looks disruptive. Adding the style right
before fading in other items and removing it right after fading them
out gives a better result.

https://bugzilla.gnome.org/show_bug.cgi?id=685201
2012-10-11 16:14:38 +02:00
Florian Müllner
dc15df1aa7 loginDialog: Remove now unused functions
https://bugzilla.gnome.org/show_bug.cgi?id=685201
2012-10-11 16:14:38 +02:00
Florian Müllner
05f5fac35b loginDialog: Use the same prompt layout as the unlock dialog
Currently the layout of the password prompt differs slightly between
login dialog and unlock screen - for the former, the prompt is
displayed next to the user avatar, replacing the user name, for
the latter, it is diplayed below both avatar and name.

https://bugzilla.gnome.org/show_bug.cgi?id=685201
2012-10-11 16:14:38 +02:00
Adel Gadllah
3ed5f9cd15 gdm: Try harder to move focus to the first user
_moveFocusToItems seems to be called to early causing
clutter_actor_grab_key_focus not to be called.

So queue another attempt with BEFORE_REDRAW priority when
this happens to make sure we actually move the focus sucessfully.

https://bugzilla.gnome.org/show_bug.cgi?id=684650
2012-10-06 18:15:02 +02:00
Florian Müllner
20d4ffde6e loginDialog: Rely on default button for activation
Currently the default action is performed twice when pressing Return
in the login dialog, once in response to the entry's 'activate' signal,
and again by activating the default button. Usually this is not a
problem, as the second invocation is simply ignored, however it breaks
the case where multiple consecutive questions are asked (e.g. username
and password in the 'Not listed' case).
Fix the problem by not handling the 'activate' signal at all.

https://bugzilla.gnome.org/show_bug.cgi?id=685511
2012-10-04 21:18:54 +02:00
Olivier Blin
a1bf19dbdf ShellUserVerifier: fix typo in function name, caught on auth error
https://bugzilla.gnome.org/show_bug.cgi?id=685434
2012-10-03 22:07:27 +02:00
Ray Strode
6a739afd25 gdm: Make SessionList accessible
https://bugzilla.gnome.org/show_bug.cgi?id=684748
2012-09-25 12:02:06 +02:00
Florian Müllner
f7826616b8 gdm: Make UserList accessible
https://bugzilla.gnome.org/show_bug.cgi?id=684728
2012-09-25 02:06:02 +02:00
Florian Müllner
9f476a12dd gdm: Provide an accessible name for powerMenu
https://bugzilla.gnome.org/show_bug.cgi?id=684727
2012-09-25 02:06:02 +02:00
Giovanni Campagna
449d116af2 Fix 10884ef7f5
Bad rebase and code left in that had no effect.
2012-09-19 13:01:56 +02:00
Rico Tzschichholz
51bdc44352 gdm: Fix property typo
Introduced by cc6744055f
2012-09-19 12:11:25 +02:00
Giovanni Campagna
10884ef7f5 ShellUserVerifier: catch DBus errors and report them to the user
Instead of leaving the login or unlock dialogs in an inconsistent state,
catch DBus errors and show an Authentication Error message. The error
details are logged in the session logs.

https://bugzilla.gnome.org/show_bug.cgi?id=683060
2012-09-19 11:50:57 +02:00
Jasper St. Pierre
cc6744055f gdm: Don't fade in the log in dialog
Instead, directly show it.

https://bugzilla.gnome.org/show_bug.cgi?id=682428
2012-09-19 01:41:17 -03:00
Ray Strode
638507caff fingerprint: autostart fprintd when necessary
commit e333263fd6 changed fingerprint.js
to not throw an exception when fprintd is uninstalled, by adding the
flags DO_NOT_LOAD_PROPERTIES and DO_NOT_AUTO_START

DO_NOT_LOAD_PROPERTIES is correct.  Loading the properties is what makes
it fail at initialization time when not installed.  DO_NOT_AUTO_START is
not correct though. It means fprintd will never get activated implicitly
when we need it.

This commit removes DO_NOT_AUTO_START thus making fprintd start when we
need it, but not fail at initialization time when not around.

https://bugzilla.gnome.org/show_bug.cgi?id=683131
2012-09-14 12:12:46 -04:00
Giovanni Campagna
db20a54861 Login/UnlockDialog: don't reset immediately if auth fails
Instead of showing a notification, add a small message immediately
below the entry, and give the user two more attempts to login,
before going back to the welcome or lock screen.

https://bugzilla.gnome.org/show_bug.cgi?id=682544
2012-09-04 23:38:46 +02:00
Giovanni Campagna
703417a760 ShellUserVerifier: fix cancellation
Ensure that all async callbacks check and ignore G_IO_ERROR_CANCELLED.
Ensure that all runs of authentication have their own GCancellable, so
that .begin() can be called multiple times on the same user verifier.
Check for fingerprint reader when beginning authentication, and not
when reset by GDM.

https://bugzilla.gnome.org/show_bug.cgi?id=682544
2012-09-02 23:09:23 +02:00
Debarshi Ray
833cb2556b gdm: Fix powerMenu icon name
Fallout from commit c21b1e5fe0
2012-09-02 14:55:45 +02:00
Jasper St. Pierre
167ed7c35b loginDialog: Fix regression from updating icon
Remove a rogue reference to _updateIcon.
2012-09-01 08:06:41 -03:00
Giovanni Campagna
5e46abfa03 Use UserAvatarWidget to display user avatars
Replace duplicate custom code with a common widget.

https://bugzilla.gnome.org/show_bug.cgi?id=683137
2012-08-31 23:31:25 +02:00
Giovanni Campagna
dc10e61a20 Fix some more symbolic icon names
Reviewed by Jasper St. Pierre in IRC.
2012-08-31 22:46:53 +02:00
Alban Browaeys
3c386e0c50 gdm: reset cancellable if cancelled.
Otherwise the second attempt tot login after pressing "escape" key
on the login "freeze" and raise an exception about IOError operation
cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=681537
2012-08-26 14:35:11 +02:00
Ray Strode
0a1f0e58d0 gdm: Add network login hint
Different networks have different user identifers.

This can be confusing to the user, so to make it clearer,
we try to provide a hint.

https://bugzilla.gnome.org/show_bug.cgi?id=681975
2012-08-21 13:15:29 -04:00
Ray Strode
9024c5d7ac gdm: generalize fingerprint message into login hint
The fingerprint message is useful for users that click their
names in the user list to let them know if fingerprint login
is available.

This same place on screen (below the login entry) can potentially
be used for other messages as well.

This commit changes the variable and style names surrounding
this feature to be more generic.

A subsequent commit will leverage this functionality to provide
a hint on how to log in to the local enterprise domain controller
(if relevant).

https://bugzilla.gnome.org/show_bug.cgi?id=681975
2012-08-21 13:15:28 -04:00
Giovanni Campagna
9a7914eee9 Consolidate systemd and consolekit in a common abstract class
Various code around had different paths for ConsoleKit and
logind. Consolidate it by making an abstract class that all
callers can use, which hides the implementation details of the
two daemons.

https://bugzilla.gnome.org/show_bug.cgi?id=682096
2012-08-18 18:09:55 +02:00
Giovanni Campagna
6cb713b0e3 Consolidate ConsoleKit and Systemd code
In preparation for accessing it in the screenshield, factor out
common code for ConsoleKit and Systemd.
Also, clean up ConsoleKit manager, as the daemon is required in
a non systemd installation. In particular:
- We allow it to be autostarted at session startup (or really,
  we expect it to be already there, started by GDM during session
  opening).
- We no longer silently assume that the session is active if
  it can't start.

https://bugzilla.gnome.org/show_bug.cgi?id=682096
2012-08-17 19:10:27 +02:00
Jasper St. Pierre
aa30c6a323 loginDialog: Remove manual insensitive tracking
StWidget does this for us now
2012-08-07 11:51:12 -03:00
Giovanni Campagna
48b70f358d GdmUtil: don't call GetUserVerifier from the user session
GetUserVerifier can only be called from the greeter session,
and fails with AccessDenied in all other cases. Also, calling it
hides the real error from OpenReauthenticationChannel, which
instead should be logged.

https://bugzilla.gnome.org/show_bug.cgi?id=680750
2012-08-03 18:06:10 +02:00
Florian Müllner
96c9f8058b loginDialog: Indicate whether users are logged in
Unlike the fallback gdm UI, we do not indicate in the user list
whether a user already has an open session or not. This information
is useful, so use a spotlight effect similar to the running-app
indicator to mark logged in users.

https://bugzilla.gnome.org/show_bug.cgi?id=658185
2012-08-01 22:20:35 +02:00
Florian Müllner
a3f4bca14e loginDialog: Add an :expanded pseudo class to the user list
We want to style user list items differently depending on whether
the list is expanded or shrunk; instead of manually updating the
items' style, we can just expose the :expanded style on the list
itself and use that in the CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=658185
2012-08-01 22:20:35 +02:00
Florian Müllner
5c7992beef loginDialog: Tweak automatic scroll animation
The current animation time of two seconds may result in some
confusion, as the reason of the behavior only becomes apprent
when the auto-activating item becomes visible; make the animation
a lot faster and ease it out a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=660913
2012-07-31 17:50:52 +02:00
Florian Müllner
6a615f30dc gdm: Adjust timed-login indicator
Until the recent style changes, the same element was used to indicate
both item focus and progress for timed logins. As focus is now indicated
by the item's background style, rename the indicator from focusBin to
timedLoginIndicator and make some minor adjustments to better fit the
new style:
  - move it next to the icon below the text
  - give it a white color and a shadow
  - update animation to grow from the left instead of the center

https://bugzilla.gnome.org/show_bug.cgi?id=660913
2012-07-31 17:50:52 +02:00
Florian Müllner
bfea41b771 loginDialog: Update user list style
Rather than changing the text color to indicate hover and an underline
to mark the focused item, use the same semi-transparent white background
as in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=660913
2012-07-31 17:50:52 +02:00
Matthias Clasen
be801dff5f gdm: Add a missing comma 2012-07-21 14:08:04 -04:00
Giovanni Campagna
a28d639c3b Consolidate creation of login and unlock dialog in the screenshield
The design calls for the curtain to appear in the gdm greeter too.
Implement this by having the screenshield manage the login dialog
(delegating its creation to SessionMode).

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
46db9edacc Split some common code out of gdm/loginDialog
This will be reused by session unlocking.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
8970e17911 ModalDialog: add 'default' pseudo-class to default button
Add 'default' parameter to setButtons, that controls the binding
of Return (unless overridden) and applies the 'default' pseudo-class.
Currently it has no effect, but it will start having after the
login dialog redesign.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Jasper St. Pierre
19e4c953ef js: Don't pass extra arguments to add_actor
It's clear that this was supposed to be passed to our own 'add' monkey
patch, but we missed. Remove the ignored arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=680216
2012-07-19 11:01:03 -04:00
Florian Müllner
f46a165886 loginDialog: Scale focusBin instead of resizing it
When setting an explicit size as we do currently, rounding errors
(for instance introduced by padding not specified in pixels) may
affect the parent's size allocation, e.g. making it shrink or grow
each time the size is reset.
Rather than taking care of possible rounding errors, set up focusBin
to take up the available width and use scaling for the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=675076
2012-07-18 23:56:54 +02:00
Ray Strode
e06ecb8f0c gdm: port from libgdmgreeter to libgdm
When GDM was moved over to GDBus it dropped the libgdmgreeter
library and introduced a new libgdm library with a somewhat
different API.

The main differences in the API are:

1) open_connection is now implicit and automatic
2) conversations don't need to be started explicitly, they're
   started just-in-time when verification is requested
3) The functions are split up between the client, and new
   helper objects that correspond to the dbus interfaces
   they were generated from (one for user verification,
   one for greeter specific operations, and a couple more
   that aren't used by gnome-shell).
4) libgdm supports reauthenticating in an already running
   session, so user switching should now affect the users
   session more like screen unlocking does.

This commit moves the shell over to the new library.

Based on work by Giovanni Campagna <gcampagna@src.gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=676401
2012-07-17 11:38:28 -04:00
Matthias Clasen
b4464929cb Implemented banner support for the login screen
Based on a patch by Marius Rieder,
https://bugzilla.gnome.org/review?bug=665346
2012-07-06 09:01:25 -04:00
Florian Müllner
ae16da4e81 Fix wrong result handling of remote calls
When using dbus-glib, single return values were special-cased to
be returned verbatim rather than as array with a single element.
This is no longer true since switching to GDBus, so fix the places
where the change was overlooked.

https://bugzilla.gnome.org/show_bug.cgi?id=678852
2012-06-26 18:06:26 +02:00
Jasper St. Pierre
723a1c843a Refactor show()/hide() sequences
We seem to have a lot of code that does something along the lines of:

    if (condition)
        actor.show();
    else
        actor.hide();

ClutterActor already has such a thing for exactly this purpose: the 'visible'
property. Use it instead of the mess above.

https://bugzilla.gnome.org/show_bug.cgi?id=672272
2012-05-02 12:43:58 -04:00
Ray Strode
e333263fd6 gdm: don't fail if fprintd unavailable
fingerprint support is optional so we shouldn't try to start
fprintd upfront and croak if it fails.

https://bugzilla.gnome.org/show_bug.cgi?id=675006
2012-05-02 11:44:29 -04:00