Commit Graph

113 Commits

Author SHA1 Message Date
Stef Walter
1034e33c35 modalDialog: Show spinner when working
Use the same UI concept from the login screen to show spinners when
the polkit or keyring dialogs are working

https://bugzilla.gnome.org/show_bug.cgi?id=684438
2013-05-09 06:41:07 +02:00
Florian Müllner
b33d87a762 loginDialog: Adjust logoBin to modalDialog changes
With modalDialogs' backgroundStack using a BinLayout now, we need
to set approriate expand flags on the iconBin.

https://bugzilla.gnome.org/show_bug.cgi?id=699877
2013-05-08 00:09:53 +02:00
Florian Müllner
522d21154b loginDialog: Remove logo in upper left corner
With optional branding now being shown below the user list, we can
remove the unloved instance in the upper left corner ...

https://bugzilla.gnome.org/show_bug.cgi?id=694912
2013-05-07 20:52:04 +02:00
Florian Müllner
7c231916c1 loginDialog: (Optionally) show logo below user list
The optional logo on the login screen is currently shown in the
top bar, which is not only a rather unprominent position, it also
gives the wrong suggestion of a clickable element.
Newer designs call for the logo to be shown horizontally centered
at the bottom of the screen, so implement that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694912
2013-05-07 20:52:04 +02:00
Stef Walter
47dee22b05 gdm: Fix regression where domain login hint not shown
Also only keep around realmd while we're actually using it, allow it
to quit if no other clients are active.

https://bugzilla.gnome.org/show_bug.cgi?id=698200
2013-05-03 21:55:45 +02:00
Florian Müllner
2fc76e6d9e panel: Pass a full pathname to AnimatedIcon
For classic mode, we want to use a different styling for the spinner,
so we will pick up the image filename from CSS to make use of mode
specific styling. As the CSS will give us a full pathname, adapt the
API to take a full pathname instead of building it inside AnimatedIcon
from the passed basename.

https://bugzilla.gnome.org/show_bug.cgi?id=693688
2013-04-16 19:10:40 +02:00
Ray Strode
d097327bd8 loginDialog,unlockDialog: Give user time to read messages
Right now, if multiple messages come in, they just sort of
clobber each other.

This commit sets up a message queue, and introduces pauses
long enough for the user to hopefully be able to read those
messages.

https://bugzilla.gnome.org/show_bug.cgi?id=694688
2013-03-18 19:01:30 -04:00
Ray Strode
e9584cfcab gdm: don't clear user-verifier on reset automatically
Right, the common code between the login screen and
the unlock screen handles clearing the user verifier
when GDM sends a reset.

We don't actually always want to clear the messages on
reset in the unlock case, though, so doing it implicitly
is problematic.

This commit moves the clear() call from the common code
to the specific reset handlers.

https://bugzilla.gnome.org/show_bug.cgi?id=694688
2013-03-18 19:01:30 -04:00
Jasper St. Pierre
209014b083 screenShield: Forward key presses to tne entry when raising the shield
https://bugzilla.gnome.org/show_bug.cgi?id=686740
2013-03-11 15:08:21 -04:00
Jasper St. Pierre
127f10e7a8 screenShield: Don't wait until the dialog is loaded before opening it
If we wait asynchronously, key presses while the shield is opening
will be dropped in the void.

https://bugzilla.gnome.org/show_bug.cgi?id=686740
2013-03-11 15:08:21 -04:00
Jasper St. Pierre
1566a4e607 unlockDialog, loginDialog: Connect to the activate signal on the entry
This is the recommended way to connect to an entry's activation binding --
event bubbling is not guaranteed by ClutterText.

https://bugzilla.gnome.org/show_bug.cgi?id=695154
2013-03-05 15:25:11 -05:00
Matthias Clasen
a7bb6a2781 Show the session list when needed
Some of the conditions for showing the user list were not
properly inverted, causing the session list to be hidden
when it shouldn't be and shown when it shouldn't be.

https://bugzilla.gnome.org/show_bug.cgi?id=694784
2013-02-27 18:09:43 -05:00
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
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