Commit Graph

79 Commits

Author SHA1 Message Date
Ray Strode
300c4d8432 gdm: make entry reactive when asking user question
We disable the entry after a user answers a question while we
process it, but we don't reactivate it later if asked another
one.

This commit makes sure the entry is always reactive when we
are waiting for an answer from the user.

https://bugzilla.gnome.org/show_bug.cgi?id=691806
2013-02-20 13:38:00 -05:00
Ray Strode
5fa9581db3 loginDialog: add cross fade animation between states
This commit adds a crossfade between the user selection state
and the user verification state.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:54 -05:00
Ray Strode
96001d86e1 loginDialog: put "Not Listed?" button and user list in separate container
The user list and the "Not Listed?" button get shown and hidden at the
same time, so we can simplify the code by putting them in a new
subcontainer.

This commit creates a userSelectionBox container that both actors get
put in, and changes all the code that shows and hides these actors to
show and hide userSelectionBox instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:54 -05:00
Ray Strode
963e808d98 loginDialog: move prompt hiding code to hidePrompt
The sessionList and the prompt hint are all really
part of the prompt, so we should have the code that
hides those things in hidePrompt instead of in
showUserList.

This commit does that.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:54 -05:00
Ray Strode
d124ca377f loginDialog: use user widget when doing verification
Right now, when a user item is clicked we remove all other users from
the list and position the item in the appropriate place on screen.

Ultimately, we're going to want to crossfade from the fully populated
list to the user prompt.  Since we're going to need to show the user
avatar in two different positions we can't simply move it.

This commit leaves the user item for the user list, and instead shows
a UserWidget actor during user verification, in the same way the
unlock dialog shows a UserWidget actor during reauthentication.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:53 -05:00
Ray Strode
244121d920 loginDialog: fade out before starting session
Right now we very abruptly kill the login screen
and start the users session without any transition
out.

This commit introduces a fade out of the dialog and
panels.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:53 -05:00
Ray Strode
adf95fb90d loginDialog: drop animations
The latest mockups don't animate between states by
resizing actors. Instead, crossfades are employed.

This commit strips out many of the existing animations
as a first step toward implementing the new ones.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:53 -05:00
Ray Strode
f8446f1bfc loginDialog: get rid of title label
the login screen currently says "Sign In" at the top of it.

The latest mock ups don't have that.

This commit drops it.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:53 -05:00
Ray Strode
07c0105c83 loginDialog: don't try to stop work spinner if it's already gone
This can happen if the dialog gets reset at the wrong moment.

https://bugzilla.gnome.org/show_bug.cgi?id=693757
2013-02-18 20:35:05 -05:00
Ray Strode
7da186d4e9 loginDialog: fix cancel from "Not Listed?"
Since commit 1ae0fadbf4 we
no longer start a PAM conversation as soon as the user clicks
the "Not Listed?" button.  Instead we defer starting the PAM
conversation until the user types their username.

Unfortunately, the cancel button resets the dialog back to the
user list indrectly by cancelling the current PAM conversation.

This means if the user hasn't yet entered thier username then
the cancel button doesn't work.

This commit performs a direct dialog reset in the case the
PAM conversation hasn't been started yet.

https://bugzilla.gnome.org/show_bug.cgi?id=693756
2013-02-18 20:34:20 -05:00
Jeremy Bicha
2a5f8e84bb js: Use proper Unicode ellipsis (…) instead of three dots
https://bugzilla.gnome.org/show_bug.cgi?id=689542
2013-02-12 17:05:00 -05:00
Florian Müllner
b682c8e052 main: Move KeybindingMode into Shell
Having the definition in C instead of Javascript allows sharing
the corresponding header with gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-02-04 16:48:40 +01:00
Jasper St. Pierre
a0d7d7bc4b loginDialog: Allow right-clicking on button items
In a gdm session, we may not know what mouse orientation the user
may be in, so it makes sense to support both the left and right
mouse buttons to activate login or other items.

Additionally, add the behavior to all modal dialog items, even in
a user session, because it's unlikely that the user will right-click
on buttons, and it makes for an easier implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=688748
2013-01-22 23:42:53 -05:00
Jasper St. Pierre
9548cd8341 js: Explicitly dispose all cairo contexts
Due to limitations and bugs in SpiderMonkey's GC, wrapper objects
for cairo contexts and similar may not get cleaned up immediately
after repainting, leading to leaking memory. Explicitly disposing
of such objects after they're not needed can clean up large portions
of memory for cairo surfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=685513
2013-01-08 13:07:51 -05:00
Stéphane Démurget
59a7fdd2c9 Login: add a spinner for better process indication
We need to do a better job of indicating login process. This can
sometimes take a few seconds (particularly if you get your password
wrong): we need to give better feedback of what's going on.

This adds a spinner next to the login button if the authorization takes
some time.

https://bugzilla.gnome.org/show_bug.cgi?id=687113
2012-11-20 21:08:38 +01:00
Stéphane Démurget
c3cab28c9b Login: sensitivity fixes
The login dialog had these issues:
  - the entry was not really disabled, you could still edit text
  - the sensitivity state was not reset on verification failure
  - the session list was not disabled

The unlock dialog had these issues:
  - "Login as another user..." was not insensitive
  - redundant password char setting, overwriting the one given by the
    question

The entry insensitive style was also wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=687113
2012-11-20 21:08:37 +01:00
Florian Müllner
b58f502dd6 main: Add optional keybindingMode parameter to pushModal()
For now we just use it to assign an identifier to modal modes in
which we want to allow some keybindings, but we don't use it for
any actual filtering; we'll start doing this shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:44:22 +01:00
Florian Müllner
fae4cb9e56 loginDialog: Fix yet another StIconType removal fallout
https://bugzilla.gnome.org/show_bug.cgi?id=688181
2012-11-12 18:45:10 +01:00
Florian Müllner
063bbb02f2 loginDialog: Remove the correct focus root from ctrl-alt-tab
Commit 3abfcda8b5 fixed the focus root passed to addGroup(),
but left the one in removeGroup() unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=688181
2012-11-12 18:45:10 +01:00
Stéphane Démurget
1228db6ac1 unlockDialog: better confirmation button label
If I click on "Not listed?" in the login screen, I come to a username
field with two buttons: "Cancel" and "Sign In".

Clicking on "Sign In" doesn't actually sign me in though - it takes me
to the login entry. It would be better to rename "Sign In" to "Next" for
the username stage, therefore.

Gdm emit a signal to ask a question or a secret, but we can not know if
this is the last authentication question, hence we only use "Sign In"
for secret questions which improve the situation a lot.

https://bugzilla.gnome.org/show_bug.cgi?id=687656
2012-11-07 01:26:35 +01:00
Ray Strode
87e8770cbc loginDialog: support disable-user-list key
In some deployments showing a user list at the login
screen is undesirable.

GDM's fallback login screen has a configuration key:

org.gnome.login-screen disable-user-list false

that causes the user-list to get hidden.

This commit adds similar functionality to the normal,
shell-based login screen.

Based on a series of patches by Marius Rieder.

https://bugzilla.gnome.org/show_bug.cgi?id=660660
2012-11-06 15:05:15 -05:00
Ray Strode
cac9d120be loginDialog: hide session list until username is entered
Right now when a user clicks "Not Listed?" they end up
seeing a session list that gets reset after they enter their
username.

This commit hides the session list until the username has
been entered.

https://bugzilla.gnome.org/show_bug.cgi?id=660660
2012-11-06 15:02:36 -05:00
Ray Strode
1ae0fadbf4 loginDialog: don't rely on PAM to ask for a username
For the "Not Listed?" case we will need to be able
to identify when the user has entered their username.

Once we have a way of tracking when the username is
entered, we can then defer showing the session list
too early, before the user can reliably pick a
session.

This username tracking will also be important for
implementing a disable-user-list configuration key.
If the config key gets toggled off at runtime, we'll
need to know if we're at a disruptive part of
the authentication process or not, so we know whether
we can can expose the user list right away, or wait
until the authentication conversation finishes.

Right now, we pass null in for an initial username,
and let the PAM machinery ask the user, which means we
have no good way of knowing when the username is entered.

This commit changes the "Not Listed?" code to ask the
user their username up front, before starting the PAM
conversation in much the same way we do if the user
picks a user from the user list.

https://bugzilla.gnome.org/show_bug.cgi?id=660660
2012-11-06 15:02:36 -05:00
Stéphane Démurget
ae0821e07b Disable the login button when there is no input
You can't login until something has been entered in the password field.
We should therefore make the login button insensitive until you have
entered some text.

https://bugzilla.gnome.org/show_bug.cgi?id=687112
2012-11-05 10:17:46 +00:00
Ray Strode
aef9b733e5 loginDialog: drop spurious parameter
_onNotListed had an unusued, incorrect parameter.

This commit drops it.

https://bugzilla.gnome.org/show_bug.cgi?id=660660
2012-11-01 14:24:45 -04: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
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
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
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
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
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
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
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
Jasper St. Pierre
aa30c6a323 loginDialog: Remove manual insensitive tracking
StWidget does this for us now
2012-08-07 11:51:12 -03: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