|
|
580c05 |
From 067ae5de5b42169d0105ce1deb1147f640308d27 Mon Sep 17 00:00:00 2001
|
|
|
b97e22 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Mon, 10 Nov 2014 14:36:07 -0500
|
|
|
580c05 |
Subject: [PATCH 01/19] loginDialog: allocate children manually
|
|
|
b97e22 |
|
|
|
580c05 |
The login screen is pretty custom full screen container and the standard
|
|
|
580c05 |
layout managers aren't really a good fit for the kind of layout that's
|
|
|
580c05 |
happening. This will be even more problematic with upcoming changes
|
|
|
580c05 |
to login banners, so we need to switch techniques.
|
|
|
b97e22 |
|
|
|
580c05 |
This commit moves login dialog over to using a custom allocate handler
|
|
|
580c05 |
that has specific domain knowledge of the parts of the login screen
|
|
|
580c05 |
and where they go.
|
|
|
b97e22 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=703972
|
|
|
b97e22 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 94 ++++++++++++++++++++++++++++++++++++++++++++++-----
|
|
|
580c05 |
1 file changed, 85 insertions(+), 9 deletions(-)
|
|
|
b97e22 |
|
|
|
b97e22 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 7fbeb3e..ced6fc2 100644
|
|
|
b97e22 |
--- a/js/gdm/loginDialog.js
|
|
|
b97e22 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -368,12 +368,12 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
Name: 'LoginDialog',
|
|
|
4c1248 |
|
|
|
580c05 |
_init: function(parentActor) {
|
|
|
580c05 |
- this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
|
|
|
580c05 |
- layout_manager: new Clutter.BinLayout(),
|
|
|
580c05 |
- style_class: 'login-dialog',
|
|
|
580c05 |
- visible: false });
|
|
|
580c05 |
+ this.actor = new Shell.GenericContainer({ style_class: 'login-dialog',
|
|
|
580c05 |
+ visible: false });
|
|
|
580c05 |
+ this.actor.get_accessible().set_role(Atk.Role.WINDOW);
|
|
|
4c1248 |
|
|
|
580c05 |
this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
|
|
580c05 |
+ this.actor.connect('allocate', Lang.bind(this, this._onAllocate));
|
|
|
580c05 |
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
|
|
580c05 |
parentActor.add_child(this.actor);
|
|
|
4c1248 |
|
|
|
580c05 |
@@ -409,8 +409,6 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
|
|
|
580c05 |
x_align: Clutter.ActorAlign.CENTER,
|
|
|
580c05 |
y_align: Clutter.ActorAlign.CENTER,
|
|
|
580c05 |
- x_expand: true,
|
|
|
580c05 |
- y_expand: true,
|
|
|
580c05 |
vertical: true,
|
|
|
580c05 |
visible: false });
|
|
|
580c05 |
this.actor.add_child(this._userSelectionBox);
|
|
|
580c05 |
@@ -456,9 +454,7 @@ const LoginDialog = new Lang.Class({
|
|
|
4c1248 |
|
|
|
580c05 |
this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
|
|
|
580c05 |
x_align: Clutter.ActorAlign.CENTER,
|
|
|
580c05 |
- y_align: Clutter.ActorAlign.END,
|
|
|
580c05 |
- x_expand: true,
|
|
|
580c05 |
- y_expand: true });
|
|
|
580c05 |
+ y_align: Clutter.ActorAlign.END });
|
|
|
580c05 |
this.actor.add_child(this._logoBin);
|
|
|
580c05 |
this._updateLogo();
|
|
|
4c1248 |
|
|
|
580c05 |
@@ -489,6 +485,86 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
Lang.bind(this, this._updateDisableUserList));
|
|
|
580c05 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
+ _getLogoBinAllocation: function (dialogBox) {
|
|
|
580c05 |
+ let actorBox = new Clutter.ActorBox();
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let [minWidth, minHeight, natWidth, natHeight] = this._logoBin.get_preferred_size();
|
|
|
580c05 |
+ let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ actorBox.x1 = centerX - natWidth / 2;
|
|
|
580c05 |
+ actorBox.y1 = dialogBox.y2 - natHeight;
|
|
|
580c05 |
+ actorBox.x2 = actorBox.x1 + natWidth;
|
|
|
580c05 |
+ actorBox.y2 = actorBox.y1 + natHeight;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ return actorBox;
|
|
|
580c05 |
+ },
|
|
|
580c05 |
+
|
|
|
580c05 |
+ _getCenterActorAllocation: function (dialogBox, actor) {
|
|
|
580c05 |
+ let actorBox = new Clutter.ActorBox();
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let [minWidth, minHeight, natWidth, natHeight] = actor.get_preferred_size();
|
|
|
580c05 |
+ let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
|
|
|
580c05 |
+ let centerY = dialogBox.y1 + (dialogBox.y2 - dialogBox.y1) / 2;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ actorBox.x1 = centerX - natWidth / 2;
|
|
|
580c05 |
+ actorBox.y1 = centerY - natHeight / 2;
|
|
|
580c05 |
+ actorBox.x2 = actorBox.x1 + natWidth;
|
|
|
580c05 |
+ actorBox.y2 = actorBox.y1 + natHeight;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ return actorBox;
|
|
|
580c05 |
+ },
|
|
|
580c05 |
+
|
|
|
580c05 |
+ _onAllocate: function (actor, dialogBox, flags) {
|
|
|
580c05 |
+ let dialogHeight = dialogBox.y2 - dialogBox.y1;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // First find out what space the children require
|
|
|
580c05 |
+ let authPromptAllocation = null;
|
|
|
580c05 |
+ if (this._authPrompt.actor.visible)
|
|
|
580c05 |
+ authPromptAllocation = this._getCenterActorAllocation(dialogBox, this._authPrompt.actor);
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let userSelectionAllocation = null;
|
|
|
580c05 |
+ let userSelectionHeight = 0;
|
|
|
580c05 |
+ if (this._userSelectionBox.visible) {
|
|
|
580c05 |
+ userSelectionAllocation = this._getCenterActorAllocation(dialogBox, this._userSelectionBox);
|
|
|
580c05 |
+ userSelectionHeight = userSelectionAllocation.y2 - userSelectionAllocation.y1;
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let logoAllocation = null;
|
|
|
580c05 |
+ let logoHeight = 0;
|
|
|
580c05 |
+ if (this._logoBin.visible) {
|
|
|
580c05 |
+ logoAllocation = this._getLogoBinAllocation(dialogBox);
|
|
|
580c05 |
+ logoHeight = logoAllocation.y2 - logoAllocation.y1;
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // Then figure out what extra space we can hand out
|
|
|
580c05 |
+ let leftOverYSpace = dialogHeight - userSelectionHeight - logoHeight;
|
|
|
580c05 |
+ if (leftOverYSpace > 0) {
|
|
|
580c05 |
+ if (userSelectionAllocation) {
|
|
|
580c05 |
+ let topExpansion = leftOverYSpace / 2;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // Don't ever expand more than we have space for
|
|
|
580c05 |
+ if (userSelectionAllocation.y1 - topExpansion < 0)
|
|
|
580c05 |
+ topExpansion = userSelectionAllocation.y1;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // Always expand the bottom the same as the top since it's centered
|
|
|
580c05 |
+ let bottomExpansion = topExpansion;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ userSelectionAllocation.y1 -= topExpansion;
|
|
|
580c05 |
+ userSelectionAllocation.y2 += bottomExpansion;
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // Finally hand out the allocations
|
|
|
580c05 |
+ if (authPromptAllocation)
|
|
|
580c05 |
+ this._authPrompt.actor.allocate(authPromptAllocation, flags);
|
|
|
580c05 |
+
|
|
|
580c05 |
+ if (userSelectionAllocation)
|
|
|
580c05 |
+ this._userSelectionBox.allocate(userSelectionAllocation, flags);
|
|
|
580c05 |
+
|
|
|
580c05 |
+ if (logoAllocation)
|
|
|
580c05 |
+ this._logoBin.allocate(logoAllocation, flags);
|
|
|
580c05 |
+ },
|
|
|
580c05 |
+
|
|
|
580c05 |
_ensureUserListLoaded: function() {
|
|
|
580c05 |
if (!this._userManager.is_loaded) {
|
|
|
580c05 |
this._userManagerLoadedId = this._userManager.connect('notify::is-loaded',
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
b97e22 |
|
|
|
580c05 |
From b9975d16c2d253bf5636d6ad95e0c22d2b93d05a Mon Sep 17 00:00:00 2001
|
|
|
b97e22 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Tue, 11 Nov 2014 09:11:01 -0500
|
|
|
580c05 |
Subject: [PATCH 02/19] loginDialog: display banner message when
|
|
|
580c05 |
disable-user-list=true
|
|
|
580c05 |
|
|
|
580c05 |
The login screen supports showing a banner message which admins
|
|
|
580c05 |
can use to mention login rules or disclaimers.
|
|
|
b97e22 |
|
|
|
580c05 |
This message only shows up currently if the user list is enabled.
|
|
|
580c05 |
Most people who want to show a banner message also want to disable
|
|
|
580c05 |
the user list.
|
|
|
b97e22 |
|
|
|
580c05 |
This commit moves the banner message to display when the user is
|
|
|
580c05 |
prompted for login credentials instead of when showing the user
|
|
|
580c05 |
list. It also adds a scrollbar if the message is too long.
|
|
|
b97e22 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=703972
|
|
|
b97e22 |
---
|
|
|
580c05 |
data/theme/gnome-shell.css | 8 ++--
|
|
|
580c05 |
js/gdm/loginDialog.js | 105 +++++++++++++++++++++++++++++++++++++++------
|
|
|
580c05 |
2 files changed, 95 insertions(+), 18 deletions(-)
|
|
|
b97e22 |
|
|
|
b97e22 |
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
|
|
|
580c05 |
index 04994fa..2ec51b2 100644
|
|
|
b97e22 |
--- a/data/theme/gnome-shell.css
|
|
|
b97e22 |
+++ b/data/theme/gnome-shell.css
|
|
|
580c05 |
@@ -2392,6 +2392,10 @@ StScrollBar StButton#vhandle:active {
|
|
|
b97e22 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
/* Login Dialog */
|
|
|
580c05 |
+.login-dialog-banner-view {
|
|
|
580c05 |
+ padding-top: 24px;
|
|
|
580c05 |
+ max-width: 23em;
|
|
|
580c05 |
+}
|
|
|
4c1248 |
|
|
|
580c05 |
.framed-user-icon {
|
|
|
580c05 |
border: 2px solid #8b8b8b;
|
|
|
580c05 |
@@ -2404,11 +2408,7 @@ StScrollBar StButton#vhandle:active {
|
|
|
b97e22 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
.login-dialog-banner {
|
|
|
580c05 |
- font-size: 10pt;
|
|
|
580c05 |
- font-weight: bold;
|
|
|
580c05 |
- text-align: center;
|
|
|
580c05 |
color: #666666;
|
|
|
580c05 |
- padding-bottom: 1em;
|
|
|
b97e22 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
.login-dialog {
|
|
|
b97e22 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index ced6fc2..41aa89c 100644
|
|
|
b97e22 |
--- a/js/gdm/loginDialog.js
|
|
|
b97e22 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -27,6 +27,7 @@ const Gtk = imports.gi.Gtk;
|
|
|
b97e22 |
const Lang = imports.lang;
|
|
|
b97e22 |
const Mainloop = imports.mainloop;
|
|
|
b97e22 |
const Meta = imports.gi.Meta;
|
|
|
580c05 |
+const Pango = imports.gi.Pango;
|
|
|
b97e22 |
const Shell = imports.gi.Shell;
|
|
|
b97e22 |
const Signals = imports.signals;
|
|
|
b97e22 |
const St = imports.gi.St;
|
|
|
580c05 |
@@ -413,11 +414,6 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
visible: false });
|
|
|
580c05 |
this.actor.add_child(this._userSelectionBox);
|
|
|
4c1248 |
|
|
|
580c05 |
- this._bannerLabel = new St.Label({ style_class: 'login-dialog-banner',
|
|
|
580c05 |
- text: '' });
|
|
|
580c05 |
- this._userSelectionBox.add(this._bannerLabel);
|
|
|
580c05 |
- this._updateBanner();
|
|
|
580c05 |
-
|
|
|
580c05 |
this._userList = new UserList();
|
|
|
580c05 |
this._userSelectionBox.add(this._userList.actor,
|
|
|
580c05 |
{ expand: true,
|
|
|
580c05 |
@@ -452,6 +448,22 @@ const LoginDialog = new Lang.Class({
|
|
|
b97e22 |
x_align: St.Align.START,
|
|
|
b97e22 |
x_fill: true });
|
|
|
4c1248 |
|
|
|
580c05 |
+ this._bannerView = new St.ScrollView({ style_class: 'login-dialog-banner-view',
|
|
|
580c05 |
+ opacity: 0,
|
|
|
580c05 |
+ vscrollbar_policy: Gtk.PolicyType.AUTOMATIC,
|
|
|
580c05 |
+ hscrollbar_policy: Gtk.PolicyType.NEVER });
|
|
|
580c05 |
+ this.actor.add_child(this._bannerView);
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let bannerBox = new St.BoxLayout({ vertical: true });
|
|
|
580c05 |
+
|
|
|
580c05 |
+ this._bannerView.add_actor(bannerBox);
|
|
|
580c05 |
+ this._bannerLabel = new St.Label({ style_class: 'login-dialog-banner',
|
|
|
580c05 |
+ text: '' });
|
|
|
580c05 |
+ this._bannerLabel.clutter_text.line_wrap = true;
|
|
|
580c05 |
+ this._bannerLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
|
580c05 |
+ bannerBox.add_child(this._bannerLabel);
|
|
|
580c05 |
+ this._updateBanner();
|
|
|
b97e22 |
+
|
|
|
580c05 |
this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
|
|
|
580c05 |
x_align: Clutter.ActorAlign.CENTER,
|
|
|
580c05 |
y_align: Clutter.ActorAlign.END });
|
|
|
580c05 |
@@ -485,6 +497,20 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
Lang.bind(this, this._updateDisableUserList));
|
|
|
580c05 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
+ _getBannerAllocation: function (dialogBox) {
|
|
|
580c05 |
+ let actorBox = new Clutter.ActorBox();
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let [minWidth, minHeight, natWidth, natHeight] = this._bannerView.get_preferred_size();
|
|
|
580c05 |
+ let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ actorBox.x1 = centerX - natWidth / 2;
|
|
|
580c05 |
+ actorBox.y1 = dialogBox.y1 + Main.layoutManager.panelBox.height;
|
|
|
580c05 |
+ actorBox.x2 = actorBox.x1 + natWidth;
|
|
|
580c05 |
+ actorBox.y2 = actorBox.y1 + natHeight;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ return actorBox;
|
|
|
580c05 |
+ },
|
|
|
580c05 |
+
|
|
|
580c05 |
_getLogoBinAllocation: function (dialogBox) {
|
|
|
580c05 |
let actorBox = new Clutter.ActorBox();
|
|
|
4c1248 |
|
|
|
580c05 |
@@ -518,9 +544,21 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let dialogHeight = dialogBox.y2 - dialogBox.y1;
|
|
|
4c1248 |
|
|
|
580c05 |
// First find out what space the children require
|
|
|
580c05 |
+ let bannerAllocation = null;
|
|
|
580c05 |
+ let bannerHeight = 0;
|
|
|
580c05 |
+ let bannerWidth = 0;
|
|
|
580c05 |
+ if (this._bannerView.visible) {
|
|
|
580c05 |
+ bannerAllocation = this._getBannerAllocation(dialogBox, this._bannerView);
|
|
|
580c05 |
+ bannerHeight = bannerAllocation.y2 - bannerAllocation.y1;
|
|
|
580c05 |
+ bannerWidth = bannerAllocation.x2 - bannerAllocation.x1;
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+
|
|
|
580c05 |
let authPromptAllocation = null;
|
|
|
580c05 |
- if (this._authPrompt.actor.visible)
|
|
|
580c05 |
+ let authPromptHeight = 0;
|
|
|
580c05 |
+ if (this._authPrompt.actor.visible) {
|
|
|
580c05 |
authPromptAllocation = this._getCenterActorAllocation(dialogBox, this._authPrompt.actor);
|
|
|
580c05 |
+ authPromptHeight = authPromptAllocation.y2 - authPromptAllocation.y1;
|
|
|
580c05 |
+ }
|
|
|
4c1248 |
|
|
|
580c05 |
let userSelectionAllocation = null;
|
|
|
580c05 |
let userSelectionHeight = 0;
|
|
|
580c05 |
@@ -537,16 +575,37 @@ const LoginDialog = new Lang.Class({
|
|
|
b97e22 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
// Then figure out what extra space we can hand out
|
|
|
580c05 |
- let leftOverYSpace = dialogHeight - userSelectionHeight - logoHeight;
|
|
|
580c05 |
- if (leftOverYSpace > 0) {
|
|
|
580c05 |
- if (userSelectionAllocation) {
|
|
|
580c05 |
- let topExpansion = leftOverYSpace / 2;
|
|
|
580c05 |
+ if (bannerAllocation) {
|
|
|
580c05 |
+ let leftOverYSpace = dialogHeight - bannerHeight - authPromptHeight - logoHeight;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ if (leftOverYSpace > 0) {
|
|
|
580c05 |
+ // First figure out how much left over space is up top
|
|
|
580c05 |
+ let leftOverTopSpace = leftOverYSpace / 2;
|
|
|
4c1248 |
|
|
|
580c05 |
- // Don't ever expand more than we have space for
|
|
|
580c05 |
- if (userSelectionAllocation.y1 - topExpansion < 0)
|
|
|
580c05 |
- topExpansion = userSelectionAllocation.y1;
|
|
|
580c05 |
+ // Then, shift the banner into the middle of that extra space
|
|
|
580c05 |
+ let yShift = leftOverTopSpace / 2;
|
|
|
b97e22 |
+
|
|
|
580c05 |
+ bannerAllocation.y1 += yShift;
|
|
|
580c05 |
+ bannerAllocation.y2 += yShift;
|
|
|
580c05 |
+ } else {
|
|
|
580c05 |
+ // recompute banner height to be constrained if there's no room for its
|
|
|
580c05 |
+ // requested height
|
|
|
b97e22 |
+
|
|
|
580c05 |
+ // First figure out how much space there is without the banner
|
|
|
580c05 |
+ leftOverYSpace += bannerHeight;
|
|
|
b97e22 |
+
|
|
|
580c05 |
+ // Then figure out how much of that space is up top
|
|
|
580c05 |
+ let availableTopSpace = leftOverYSpace / 2;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // Then give all of that space to the banner
|
|
|
580c05 |
+ bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace;
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+ } else if (userSelectionAllocation) {
|
|
|
580c05 |
+ // Grow the user list to fill the space
|
|
|
580c05 |
+ let leftOverYSpace = dialogHeight - userSelectionHeight - logoHeight;
|
|
|
4c1248 |
|
|
|
580c05 |
- // Always expand the bottom the same as the top since it's centered
|
|
|
580c05 |
+ if (leftOverYSpace > 0) {
|
|
|
580c05 |
+ let topExpansion = leftOverYSpace / 2;
|
|
|
580c05 |
let bottomExpansion = topExpansion;
|
|
|
4c1248 |
|
|
|
580c05 |
userSelectionAllocation.y1 -= topExpansion;
|
|
|
580c05 |
@@ -555,6 +614,10 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
// Finally hand out the allocations
|
|
|
580c05 |
+ if (bannerAllocation) {
|
|
|
580c05 |
+ this._bannerView.allocate(bannerAllocation, flags);
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+
|
|
|
580c05 |
if (authPromptAllocation)
|
|
|
580c05 |
this._authPrompt.actor.allocate(authPromptAllocation, flags);
|
|
|
4c1248 |
|
|
|
580c05 |
@@ -617,6 +680,18 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
}
|
|
|
b97e22 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
+ _fadeInBannerView: function() {
|
|
|
580c05 |
+ Tweener.addTween(this._bannerView,
|
|
|
580c05 |
+ { opacity: 255,
|
|
|
580c05 |
+ time: _FADE_ANIMATION_TIME,
|
|
|
580c05 |
+ transition: 'easeOutQuad' });
|
|
|
580c05 |
+ },
|
|
|
b97e22 |
+
|
|
|
580c05 |
+ _hideBannerView: function() {
|
|
|
580c05 |
+ Tweener.removeTweens(this._bannerView);
|
|
|
580c05 |
+ this._bannerView.opacity = 0;
|
|
|
b97e22 |
+ },
|
|
|
b97e22 |
+
|
|
|
580c05 |
_updateLogoTexture: function(cache, uri) {
|
|
|
580c05 |
if (this._logoFileUri != uri)
|
|
|
580c05 |
return;
|
|
|
580c05 |
@@ -684,6 +759,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
{ opacity: 255,
|
|
|
580c05 |
time: _FADE_ANIMATION_TIME,
|
|
|
580c05 |
transition: 'easeOutQuad' });
|
|
|
580c05 |
+ this._fadeInBannerView();
|
|
|
b97e22 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
_showRealmLoginHint: function(realmManager, hint) {
|
|
|
580c05 |
@@ -940,6 +1016,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
_showUserList: function() {
|
|
|
580c05 |
this._ensureUserListLoaded();
|
|
|
580c05 |
this._authPrompt.hide();
|
|
|
580c05 |
+ this._hideBannerView();
|
|
|
580c05 |
this._sessionMenuButton.close();
|
|
|
580c05 |
this._setUserListExpanded(true);
|
|
|
580c05 |
this._notListedButton.show();
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
580c05 |
|
|
|
580c05 |
From 5c2fb5d1d1ace07e2f9c27d563289e315fe53509 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Tue, 11 Nov 2014 09:11:01 -0500
|
|
|
580c05 |
Subject: [PATCH 03/19] loginDialog: use two column view if banner message long
|
|
|
580c05 |
|
|
|
580c05 |
Frequently banner messages are longer than can reasonable
|
|
|
580c05 |
fit in a one column view, which leads to a smooshed layout.
|
|
|
580c05 |
|
|
|
580c05 |
This commit changes the layout to a two column view, with the
|
|
|
580c05 |
banner on the left and the prompt on the right, if the banner
|
|
|
580c05 |
message is long enough that it can't fit well above the prompt.
|
|
|
580c05 |
If there isn't enough space for two columns then we keep the
|
|
|
580c05 |
one column layout but add scrollbars.
|
|
|
580c05 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=703972
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 67 ++++++++++++++++++++++++++++++++++++++++++---------
|
|
|
580c05 |
1 file changed, 55 insertions(+), 12 deletions(-)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 41aa89c..575effa 100644
|
|
|
580c05 |
--- a/js/gdm/loginDialog.js
|
|
|
580c05 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -541,6 +541,7 @@ const LoginDialog = new Lang.Class({
|
|
|
b97e22 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
_onAllocate: function (actor, dialogBox, flags) {
|
|
|
580c05 |
+ let dialogWidth = dialogBox.x2 - dialogBox.x1;
|
|
|
580c05 |
let dialogHeight = dialogBox.y2 - dialogBox.y1;
|
|
|
4c1248 |
|
|
|
580c05 |
// First find out what space the children require
|
|
|
580c05 |
@@ -555,9 +556,11 @@ const LoginDialog = new Lang.Class({
|
|
|
4c1248 |
|
|
|
580c05 |
let authPromptAllocation = null;
|
|
|
580c05 |
let authPromptHeight = 0;
|
|
|
580c05 |
+ let authPromptWidth = 0;
|
|
|
580c05 |
if (this._authPrompt.actor.visible) {
|
|
|
580c05 |
authPromptAllocation = this._getCenterActorAllocation(dialogBox, this._authPrompt.actor);
|
|
|
580c05 |
authPromptHeight = authPromptAllocation.y2 - authPromptAllocation.y1;
|
|
|
580c05 |
+ authPromptWidth = authPromptAllocation.x2 - authPromptAllocation.x1;
|
|
|
580c05 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
let userSelectionAllocation = null;
|
|
|
580c05 |
@@ -574,7 +577,9 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
logoHeight = logoAllocation.y2 - logoAllocation.y1;
|
|
|
580c05 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
- // Then figure out what extra space we can hand out
|
|
|
580c05 |
+ // Then figure out if we're overly constrained and need to
|
|
|
580c05 |
+ // try a different layout, or if we have what extra space we
|
|
|
580c05 |
+ // can hand out
|
|
|
580c05 |
if (bannerAllocation) {
|
|
|
580c05 |
let leftOverYSpace = dialogHeight - bannerHeight - authPromptHeight - logoHeight;
|
|
|
4c1248 |
|
|
|
580c05 |
@@ -588,17 +593,55 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
bannerAllocation.y1 += yShift;
|
|
|
580c05 |
bannerAllocation.y2 += yShift;
|
|
|
580c05 |
} else {
|
|
|
580c05 |
- // recompute banner height to be constrained if there's no room for its
|
|
|
580c05 |
- // requested height
|
|
|
580c05 |
-
|
|
|
580c05 |
- // First figure out how much space there is without the banner
|
|
|
580c05 |
- leftOverYSpace += bannerHeight;
|
|
|
580c05 |
-
|
|
|
580c05 |
- // Then figure out how much of that space is up top
|
|
|
580c05 |
- let availableTopSpace = leftOverYSpace / 2;
|
|
|
580c05 |
-
|
|
|
580c05 |
- // Then give all of that space to the banner
|
|
|
580c05 |
- bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace;
|
|
|
580c05 |
+ // Then figure out how much space there would be if we switched to a
|
|
|
580c05 |
+ // wide layout with banner on one side and authprompt on the other.
|
|
|
580c05 |
+ let leftOverXSpace = dialogWidth - authPromptWidth;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // In a wide view, half of the available space goes to the banner,
|
|
|
580c05 |
+ // and the other half goes to the margins.
|
|
|
580c05 |
+ let wideBannerWidth = leftOverXSpace / 2;
|
|
|
580c05 |
+ let wideSpacing = leftOverXSpace - wideBannerWidth;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // If we do go with a wide layout, we need there to be at least enough
|
|
|
580c05 |
+ // space for the banner and the auth prompt to be the same width,
|
|
|
580c05 |
+ // so it doesn't look unbalanced.
|
|
|
580c05 |
+ if (authPromptWidth > 0 && wideBannerWidth > authPromptWidth) {
|
|
|
580c05 |
+ let centerX = dialogBox.x1 + dialogWidth / 2;
|
|
|
580c05 |
+ let centerY = dialogBox.y1 + dialogHeight / 2;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // A small portion of the spacing goes down the center of the
|
|
|
580c05 |
+ // screen to help delimit the two columns of the wide view
|
|
|
580c05 |
+ let centerGap = wideSpacing / 8;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // place the banner along the left edge of the center margin
|
|
|
580c05 |
+ bannerAllocation.x2 = centerX - centerGap / 2;
|
|
|
580c05 |
+ bannerAllocation.x1 = bannerAllocation.x2 - wideBannerWidth;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // figure out how tall it would like to be and try to accomodate
|
|
|
580c05 |
+ // but don't let it get too close to the logo
|
|
|
580c05 |
+ let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let maxWideHeight = dialogHeight - 3 * logoHeight;
|
|
|
580c05 |
+ wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight);
|
|
|
580c05 |
+ bannerAllocation.y1 = centerY - wideBannerHeight / 2;
|
|
|
580c05 |
+ bannerAllocation.y2 = bannerAllocation.y1 + wideBannerHeight;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // place the auth prompt along the right edge of the center margin
|
|
|
580c05 |
+ authPromptAllocation.x1 = centerX + centerGap / 2;
|
|
|
580c05 |
+ authPromptAllocation.x2 = authPromptAllocation.x1 + authPromptWidth;
|
|
|
580c05 |
+ } else {
|
|
|
580c05 |
+ // If we aren't going to do a wide view, then we need to limit
|
|
|
580c05 |
+ // the height of the banner so it will present scrollbars
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // First figure out how much space there is without the banner
|
|
|
580c05 |
+ leftOverYSpace += bannerHeight;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // Then figure out how much of that space is up top
|
|
|
580c05 |
+ let availableTopSpace = leftOverYSpace / 2;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ // Then give all of that space to the banner
|
|
|
580c05 |
+ bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace;
|
|
|
580c05 |
+ }
|
|
|
580c05 |
}
|
|
|
580c05 |
} else if (userSelectionAllocation) {
|
|
|
580c05 |
// Grow the user list to fill the space
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
b97e22 |
|
|
|
580c05 |
From f349bc2c4b437430dfc65d13bba24e39c5ab8c59 Mon Sep 17 00:00:00 2001
|
|
|
b97e22 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Thu, 22 Jan 2015 14:00:01 -0500
|
|
|
580c05 |
Subject: [PATCH 04/19] loginDialog: fix reactivity of first user in user list
|
|
|
b97e22 |
|
|
|
580c05 |
After the login banner is shown and hidden, the first user
|
|
|
580c05 |
in the user list becomes non-reactive. This is because the
|
|
|
580c05 |
banner is given an opacity of 0, but still allocated.
|
|
|
b97e22 |
|
|
|
580c05 |
This commit fixes that by hiding the banner explicitly.
|
|
|
b97e22 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=743370
|
|
|
b97e22 |
---
|
|
|
b97e22 |
js/gdm/loginDialog.js | 2 ++
|
|
|
b97e22 |
1 file changed, 2 insertions(+)
|
|
|
b97e22 |
|
|
|
b97e22 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 575effa..930f82b 100644
|
|
|
b97e22 |
--- a/js/gdm/loginDialog.js
|
|
|
b97e22 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -724,6 +724,7 @@ const LoginDialog = new Lang.Class({
|
|
|
b97e22 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
_fadeInBannerView: function() {
|
|
|
580c05 |
+ this._bannerView.show();
|
|
|
580c05 |
Tweener.addTween(this._bannerView,
|
|
|
580c05 |
{ opacity: 255,
|
|
|
580c05 |
time: _FADE_ANIMATION_TIME,
|
|
|
580c05 |
@@ -733,6 +734,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
_hideBannerView: function() {
|
|
|
580c05 |
Tweener.removeTweens(this._bannerView);
|
|
|
580c05 |
this._bannerView.opacity = 0;
|
|
|
580c05 |
+ this._bannerView.hide();
|
|
|
b97e22 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
_updateLogoTexture: function(cache, uri) {
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
580c05 |
|
|
|
580c05 |
From 4c16f0573d5b72ffb99261692353d004d4e13337 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: =?UTF-8?q?Cl=C3=A9ment=20Gu=C3=A9rin?= <geecko.dev@free.fr>
|
|
|
580c05 |
Date: Fri, 27 Mar 2015 22:19:47 +0100
|
|
|
580c05 |
Subject: [PATCH 05/19] gdm: use integer coordinates for login dialog actors
|
|
|
580c05 |
|
|
|
580c05 |
If the login screen actors aren't placed at pixel
|
|
|
580c05 |
boundaries then they will show up blurred with fuzzy
|
|
|
580c05 |
text.
|
|
|
580c05 |
|
|
|
580c05 |
This commit ensures all actor allocations are floored
|
|
|
580c05 |
to integer coordinates.
|
|
|
580c05 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=746912
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 22 +++++++++++-----------
|
|
|
580c05 |
1 file changed, 11 insertions(+), 11 deletions(-)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 930f82b..34bef7d 100644
|
|
|
580c05 |
--- a/js/gdm/loginDialog.js
|
|
|
580c05 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -503,7 +503,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let [minWidth, minHeight, natWidth, natHeight] = this._bannerView.get_preferred_size();
|
|
|
580c05 |
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
|
|
|
580c05 |
|
|
|
580c05 |
- actorBox.x1 = centerX - natWidth / 2;
|
|
|
580c05 |
+ actorBox.x1 = Math.floor(centerX - natWidth / 2);
|
|
|
580c05 |
actorBox.y1 = dialogBox.y1 + Main.layoutManager.panelBox.height;
|
|
|
580c05 |
actorBox.x2 = actorBox.x1 + natWidth;
|
|
|
580c05 |
actorBox.y2 = actorBox.y1 + natHeight;
|
|
|
580c05 |
@@ -517,7 +517,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let [minWidth, minHeight, natWidth, natHeight] = this._logoBin.get_preferred_size();
|
|
|
580c05 |
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
|
|
|
580c05 |
|
|
|
580c05 |
- actorBox.x1 = centerX - natWidth / 2;
|
|
|
580c05 |
+ actorBox.x1 = Math.floor(centerX - natWidth / 2);
|
|
|
580c05 |
actorBox.y1 = dialogBox.y2 - natHeight;
|
|
|
580c05 |
actorBox.x2 = actorBox.x1 + natWidth;
|
|
|
580c05 |
actorBox.y2 = actorBox.y1 + natHeight;
|
|
|
580c05 |
@@ -532,8 +532,8 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
|
|
|
580c05 |
let centerY = dialogBox.y1 + (dialogBox.y2 - dialogBox.y1) / 2;
|
|
|
580c05 |
|
|
|
580c05 |
- actorBox.x1 = centerX - natWidth / 2;
|
|
|
580c05 |
- actorBox.y1 = centerY - natHeight / 2;
|
|
|
580c05 |
+ actorBox.x1 = Math.floor(centerX - natWidth / 2);
|
|
|
580c05 |
+ actorBox.y1 = Math.floor(centerY - natHeight / 2);
|
|
|
580c05 |
actorBox.x2 = actorBox.x1 + natWidth;
|
|
|
580c05 |
actorBox.y2 = actorBox.y1 + natHeight;
|
|
|
580c05 |
|
|
|
580c05 |
@@ -588,7 +588,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let leftOverTopSpace = leftOverYSpace / 2;
|
|
|
580c05 |
|
|
|
580c05 |
// Then, shift the banner into the middle of that extra space
|
|
|
580c05 |
- let yShift = leftOverTopSpace / 2;
|
|
|
580c05 |
+ let yShift = Math.floor(leftOverTopSpace / 2);
|
|
|
580c05 |
|
|
|
580c05 |
bannerAllocation.y1 += yShift;
|
|
|
580c05 |
bannerAllocation.y2 += yShift;
|
|
|
580c05 |
@@ -614,8 +614,8 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let centerGap = wideSpacing / 8;
|
|
|
580c05 |
|
|
|
580c05 |
// place the banner along the left edge of the center margin
|
|
|
580c05 |
- bannerAllocation.x2 = centerX - centerGap / 2;
|
|
|
580c05 |
- bannerAllocation.x1 = bannerAllocation.x2 - wideBannerWidth;
|
|
|
580c05 |
+ bannerAllocation.x2 = Math.floor(centerX - centerGap / 2);
|
|
|
580c05 |
+ bannerAllocation.x1 = Math.floor(bannerAllocation.x2 - wideBannerWidth);
|
|
|
580c05 |
|
|
|
580c05 |
// figure out how tall it would like to be and try to accomodate
|
|
|
580c05 |
// but don't let it get too close to the logo
|
|
|
580c05 |
@@ -623,11 +623,11 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
|
|
|
580c05 |
let maxWideHeight = dialogHeight - 3 * logoHeight;
|
|
|
580c05 |
wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight);
|
|
|
580c05 |
- bannerAllocation.y1 = centerY - wideBannerHeight / 2;
|
|
|
580c05 |
+ bannerAllocation.y1 = Math.floor(centerY - wideBannerHeight / 2);
|
|
|
580c05 |
bannerAllocation.y2 = bannerAllocation.y1 + wideBannerHeight;
|
|
|
580c05 |
|
|
|
580c05 |
// place the auth prompt along the right edge of the center margin
|
|
|
580c05 |
- authPromptAllocation.x1 = centerX + centerGap / 2;
|
|
|
580c05 |
+ authPromptAllocation.x1 = Math.floor(centerX + centerGap / 2);
|
|
|
580c05 |
authPromptAllocation.x2 = authPromptAllocation.x1 + authPromptWidth;
|
|
|
580c05 |
} else {
|
|
|
580c05 |
// If we aren't going to do a wide view, then we need to limit
|
|
|
580c05 |
@@ -637,7 +637,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
leftOverYSpace += bannerHeight;
|
|
|
580c05 |
|
|
|
580c05 |
// Then figure out how much of that space is up top
|
|
|
580c05 |
- let availableTopSpace = leftOverYSpace / 2;
|
|
|
580c05 |
+ let availableTopSpace = Math.floor(leftOverYSpace / 2);
|
|
|
580c05 |
|
|
|
580c05 |
// Then give all of that space to the banner
|
|
|
580c05 |
bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace;
|
|
|
580c05 |
@@ -648,7 +648,7 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let leftOverYSpace = dialogHeight - userSelectionHeight - logoHeight;
|
|
|
580c05 |
|
|
|
580c05 |
if (leftOverYSpace > 0) {
|
|
|
580c05 |
- let topExpansion = leftOverYSpace / 2;
|
|
|
580c05 |
+ let topExpansion = Math.floor(leftOverYSpace / 2);
|
|
|
580c05 |
let bottomExpansion = topExpansion;
|
|
|
580c05 |
|
|
|
580c05 |
userSelectionAllocation.y1 -= topExpansion;
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
580c05 |
|
|
|
580c05 |
From a179abc0adf73f19aeb4ec8069ffaecd0b229179 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
580c05 |
Date: Fri, 20 Mar 2015 14:29:40 +0100
|
|
|
580c05 |
Subject: [PATCH 06/19] loginDialog: Move long session-list menus to the side
|
|
|
580c05 |
|
|
|
580c05 |
Currently the menu position below the button means that the menu
|
|
|
580c05 |
can extend to roughly half the screen height before ending up partly
|
|
|
580c05 |
off-screen. This is plenty of space for commonly installed sessions,
|
|
|
580c05 |
but some users have a significantly higher number of sessions in the
|
|
|
580c05 |
list. Move the menu to the side of the button in that case to maximize
|
|
|
580c05 |
the vertical space the menu may take up.
|
|
|
580c05 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=734352
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 12 +++++++++++-
|
|
|
580c05 |
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 34bef7d..bf47c2d 100644
|
|
|
580c05 |
--- a/js/gdm/loginDialog.js
|
|
|
580c05 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -49,6 +49,7 @@ const _FADE_ANIMATION_TIME = 0.25;
|
|
|
580c05 |
const _SCROLL_ANIMATION_TIME = 0.5;
|
|
|
580c05 |
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
|
|
|
580c05 |
const _LOGO_ICON_HEIGHT = 48;
|
|
|
580c05 |
+const _MAX_BOTTOM_MENU_ITEMS = 5;
|
|
|
4c1248 |
|
|
|
580c05 |
const UserListItem = new Lang.Class({
|
|
|
580c05 |
Name: 'UserListItem',
|
|
|
580c05 |
@@ -283,7 +284,16 @@ const SessionMenuButton = new Lang.Class({
|
|
|
4c1248 |
|
|
|
580c05 |
this.actor = new St.Bin({ child: this._button });
|
|
|
4c1248 |
|
|
|
580c05 |
- this._menu = new PopupMenu.PopupMenu(this._button, 0, St.Side.TOP);
|
|
|
580c05 |
+ let side = St.Side.TOP;
|
|
|
580c05 |
+ let align = 0;
|
|
|
580c05 |
+ if (Gdm.get_session_ids().length > _MAX_BOTTOM_MENU_ITEMS) {
|
|
|
580c05 |
+ if (this.actor.text_direction == Clutter.TextDirection.RTL)
|
|
|
580c05 |
+ side = St.Side.RIGHT;
|
|
|
580c05 |
+ else
|
|
|
580c05 |
+ side = St.Side.LEFT;
|
|
|
580c05 |
+ align = 0.5;
|
|
|
580c05 |
+ }
|
|
|
580c05 |
+ this._menu = new PopupMenu.PopupMenu(this._button, align, side);
|
|
|
580c05 |
Main.uiGroup.add_actor(this._menu.actor);
|
|
|
580c05 |
this._menu.actor.hide();
|
|
|
4c1248 |
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
b97e22 |
|
|
|
580c05 |
From cd87ad4e3f9aa3e18f35f6f4069412412eeb1977 Mon Sep 17 00:00:00 2001
|
|
|
b97e22 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Mon, 16 Mar 2015 07:38:04 -0400
|
|
|
580c05 |
Subject: [PATCH 07/19] gdm: fix empty user list on user switching
|
|
|
580c05 |
|
|
|
580c05 |
There's some vestigial code for hiding the user list
|
|
|
580c05 |
that runs at the same time its parent is hidden.
|
|
|
b97e22 |
|
|
|
580c05 |
Only the parent should be hidden, at this point, so
|
|
|
580c05 |
there's situations where the user list hides and
|
|
|
580c05 |
never comes back.
|
|
|
b97e22 |
|
|
|
580c05 |
This commit fixes that, by deleting the vestigial code.
|
|
|
580c05 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=719418
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 9 +--------
|
|
|
580c05 |
1 file changed, 1 insertion(+), 8 deletions(-)
|
|
|
b97e22 |
|
|
|
580c05 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index bf47c2d..9ef7b2a 100644
|
|
|
580c05 |
--- a/js/gdm/loginDialog.js
|
|
|
580c05 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -1090,18 +1090,11 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
},
|
|
|
580c05 |
|
|
|
580c05 |
_onUserListActivated: function(activatedItem) {
|
|
|
580c05 |
- let tasks = [function() {
|
|
|
580c05 |
- return GdmUtil.cloneAndFadeOutActor(this._userSelectionBox);
|
|
|
580c05 |
- },
|
|
|
580c05 |
- function() {
|
|
|
580c05 |
- this._setUserListExpanded(false);
|
|
|
580c05 |
- }];
|
|
|
580c05 |
-
|
|
|
580c05 |
this._user = activatedItem.user;
|
|
|
580c05 |
|
|
|
580c05 |
this._updateCancelButton();
|
|
|
580c05 |
|
|
|
580c05 |
- let batch = new Batch.ConcurrentBatch(this, [new Batch.ConsecutiveBatch(this, tasks),
|
|
|
580c05 |
+ let batch = new Batch.ConcurrentBatch(this, [GdmUtil.cloneAndFadeOutActor(this._userSelectionBox),
|
|
|
580c05 |
this._beginVerificationForItem(activatedItem)]);
|
|
|
580c05 |
batch.run();
|
|
|
580c05 |
},
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
b97e22 |
|
|
|
580c05 |
From 15559166cb1039289a3d81851d7834e3b74cc4cb Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
580c05 |
Date: Fri, 12 Jun 2015 14:14:46 +0200
|
|
|
580c05 |
Subject: [PATCH 08/19] theme: Make banner message more prominent
|
|
|
b97e22 |
|
|
|
580c05 |
Drop the dedicated dimmed font color for the banner message in favor
|
|
|
580c05 |
of the brighter default, to make the banner message more prominent.
|
|
|
b97e22 |
---
|
|
|
580c05 |
data/theme/gnome-shell.css | 4 ----
|
|
|
580c05 |
1 file changed, 4 deletions(-)
|
|
|
b97e22 |
|
|
|
b97e22 |
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
|
|
|
580c05 |
index 2ec51b2..97634b1 100644
|
|
|
b97e22 |
--- a/data/theme/gnome-shell.css
|
|
|
b97e22 |
+++ b/data/theme/gnome-shell.css
|
|
|
580c05 |
@@ -2407,10 +2407,6 @@ StScrollBar StButton#vhandle:active {
|
|
|
580c05 |
border: 2px solid #bbbbbb;
|
|
|
b97e22 |
}
|
|
|
4c1248 |
|
|
|
580c05 |
-.login-dialog-banner {
|
|
|
580c05 |
- color: #666666;
|
|
|
b97e22 |
-}
|
|
|
b97e22 |
-
|
|
|
580c05 |
.login-dialog {
|
|
|
580c05 |
/* Reset border and background */
|
|
|
580c05 |
border: none;
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
580c05 |
|
|
|
580c05 |
From a3cf129242f79a598bfc0f699ccdfafe99eca754 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Thu, 25 Jun 2015 15:39:58 -0400
|
|
|
580c05 |
Subject: [PATCH 09/19] gdm: fix banner allocation computation
|
|
|
580c05 |
|
|
|
580c05 |
The code to figure how how much room that banner had was wrong.
|
|
|
580c05 |
This commit fixes it.
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 9 ++++++++-
|
|
|
580c05 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
580c05 |
|
|
|
b97e22 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 9ef7b2a..d58daaa 100644
|
|
|
b97e22 |
--- a/js/gdm/loginDialog.js
|
|
|
b97e22 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -591,7 +591,14 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
// try a different layout, or if we have what extra space we
|
|
|
580c05 |
// can hand out
|
|
|
580c05 |
if (bannerAllocation) {
|
|
|
580c05 |
- let leftOverYSpace = dialogHeight - bannerHeight - authPromptHeight - logoHeight;
|
|
|
580c05 |
+ let bannerSpace;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ if (authPromptAllocation)
|
|
|
580c05 |
+ bannerSpace = authPromptAllocation.y1 - bannerAllocation.y1;
|
|
|
580c05 |
+ else
|
|
|
580c05 |
+ bannerSpace = 0;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ let leftOverYSpace = bannerSpace - bannerHeight;
|
|
|
4c1248 |
|
|
|
580c05 |
if (leftOverYSpace > 0) {
|
|
|
580c05 |
// First figure out how much left over space is up top
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
580c05 |
|
|
|
580c05 |
From 03743107d8b630254d22533c404806bc48cdc44b Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: David Liang <liangchenye@gmail.com>
|
|
|
580c05 |
Date: Thu, 26 Feb 2015 15:40:56 -0500
|
|
|
580c05 |
Subject: [PATCH 10/19] gdm: prevent nextSignalId from being connected multiply
|
|
|
580c05 |
times
|
|
|
580c05 |
|
|
|
580c05 |
The problem is caused by '_askForUsernameAndBeginVerification' being
|
|
|
580c05 |
called multiply times. So when we click 'next', the old connected
|
|
|
580c05 |
function will also be executed.
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 45 ++++++++++++++++++++++++++-------------------
|
|
|
580c05 |
1 file changed, 26 insertions(+), 19 deletions(-)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index d58daaa..02c8201 100644
|
|
|
580c05 |
--- a/js/gdm/loginDialog.js
|
|
|
580c05 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -498,6 +498,10 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
this._disableUserList = undefined;
|
|
|
580c05 |
this._userListLoaded = false;
|
|
|
4c1248 |
|
|
|
580c05 |
+ this._realmManager = new Realmd.Manager();
|
|
|
580c05 |
+ this._realmSignalId = this._realmManager.connect('login-format-changed',
|
|
|
580c05 |
+ Lang.bind(this, this._showRealmLoginHint));
|
|
|
580c05 |
+
|
|
|
580c05 |
LoginManager.getLoginManager().getCurrentSessionProxy(Lang.bind(this, this._gotGreeterSessionProxy));
|
|
|
4c1248 |
|
|
|
580c05 |
// If the user list is enabled, it should take key focus; make sure the
|
|
|
580c05 |
@@ -841,25 +845,22 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
this._authPrompt.setPasswordChar('');
|
|
|
580c05 |
this._authPrompt.setQuestion(_("Username: "));
|
|
|
4c1248 |
|
|
|
580c05 |
- let realmManager = new Realmd.Manager();
|
|
|
580c05 |
- let realmSignalId = realmManager.connect('login-format-changed',
|
|
|
580c05 |
- Lang.bind(this, this._showRealmLoginHint));
|
|
|
580c05 |
- this._showRealmLoginHint(realmManager.loginFormat);
|
|
|
580c05 |
-
|
|
|
580c05 |
- let nextSignalId = this._authPrompt.connect('next',
|
|
|
580c05 |
- Lang.bind(this, function() {
|
|
|
580c05 |
- this._authPrompt.disconnect(nextSignalId);
|
|
|
580c05 |
- this._authPrompt.updateSensitivity(false);
|
|
|
580c05 |
- let answer = this._authPrompt.getAnswer();
|
|
|
580c05 |
- this._user = this._userManager.get_user(answer);
|
|
|
580c05 |
- this._authPrompt.clear();
|
|
|
580c05 |
- this._authPrompt.startSpinning();
|
|
|
580c05 |
- this._authPrompt.begin({ userName: answer });
|
|
|
580c05 |
- this._updateCancelButton();
|
|
|
580c05 |
-
|
|
|
580c05 |
- realmManager.disconnect(realmSignalId)
|
|
|
580c05 |
- realmManager.release();
|
|
|
580c05 |
- }));
|
|
|
580c05 |
+ this._showRealmLoginHint(this._realmManager.loginFormat);
|
|
|
580c05 |
+
|
|
|
580c05 |
+ if (this._nextSignalId)
|
|
|
580c05 |
+ this._authPrompt.disconnect(this._nextSignalId);
|
|
|
580c05 |
+ this._nextSignalId = this._authPrompt.connect('next',
|
|
|
580c05 |
+ Lang.bind(this, function() {
|
|
|
580c05 |
+ this._authPrompt.disconnect(this._nextSignalId);
|
|
|
580c05 |
+ this._nextSignalId = 0;
|
|
|
580c05 |
+ this._authPrompt.updateSensitivity(false);
|
|
|
580c05 |
+ let answer = this._authPrompt.getAnswer();
|
|
|
580c05 |
+ this._user = this._userManager.get_user(answer);
|
|
|
580c05 |
+ this._authPrompt.clear();
|
|
|
580c05 |
+ this._authPrompt.startSpinning();
|
|
|
580c05 |
+ this._authPrompt.begin({ userName: answer });
|
|
|
580c05 |
+ this._updateCancelButton();
|
|
|
580c05 |
+ }));
|
|
|
580c05 |
this._updateCancelButton();
|
|
|
4c1248 |
|
|
|
580c05 |
this._authPrompt.updateSensitivity(true);
|
|
|
580c05 |
@@ -1135,6 +1136,12 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
this._greeterSessionProxy.disconnect(this._greeterSessionProxyChangedId);
|
|
|
580c05 |
this._greeterSessionProxy = null;
|
|
|
580c05 |
}
|
|
|
580c05 |
+ if (this._realmManager) {
|
|
|
580c05 |
+ this._realmManager.disconnect(this._realmSignalId);
|
|
|
580c05 |
+ this._realmSignalId = 0;
|
|
|
580c05 |
+ this._realmManager.release();
|
|
|
580c05 |
+ this._realmManager = null;
|
|
|
580c05 |
+ }
|
|
|
b97e22 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
_loadUserList: function() {
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
b97e22 |
|
|
|
580c05 |
From 284fef5e484a76d919e9dade90cdc8ea99a304f9 Mon Sep 17 00:00:00 2001
|
|
|
b97e22 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Tue, 30 Jun 2015 12:51:59 -0400
|
|
|
580c05 |
Subject: [PATCH 11/19] gdm: fix cancel button when not listed is clicked
|
|
|
b97e22 |
|
|
|
580c05 |
We currently ignore cancellation attempts on the authprompt if
|
|
|
580c05 |
the pam conversation isn't authenticating. Of course the authprompt
|
|
|
580c05 |
asks questions before PAM gets involved, so that's wrong.
|
|
|
b97e22 |
|
|
|
580c05 |
This commit makes cancel work at the "Not Listed?" username screen.
|
|
|
b97e22 |
---
|
|
|
580c05 |
js/gdm/authPrompt.js | 2 +-
|
|
|
580c05 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b97e22 |
|
|
|
580c05 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
580c05 |
index a4d69d9..2ac0a54 100644
|
|
|
580c05 |
--- a/js/gdm/authPrompt.js
|
|
|
580c05 |
+++ b/js/gdm/authPrompt.js
|
|
|
580c05 |
@@ -501,7 +501,7 @@ const AuthPrompt = new Lang.Class({
|
|
|
b97e22 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
cancel: function() {
|
|
|
580c05 |
- if (this.verificationStatus == AuthPromptStatus.NOT_VERIFYING || this.verificationStatus == AuthPromptStatus.VERIFICATION_SUCCEEDED) {
|
|
|
580c05 |
+ if (this.verificationStatus == AuthPromptStatus.VERIFICATION_SUCCEEDED) {
|
|
|
b97e22 |
return;
|
|
|
580c05 |
}
|
|
|
580c05 |
this.reset();
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
b97e22 |
|
|
|
580c05 |
From b1f7ee30ae333a288528215b0f120d7b342ad448 Mon Sep 17 00:00:00 2001
|
|
|
b97e22 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Fri, 14 Nov 2014 15:57:16 -0500
|
|
|
580c05 |
Subject: [PATCH 12/19] gdm: fix handling of removed smartcard at startup
|
|
|
b97e22 |
|
|
|
580c05 |
If a smartcard is missing from the reader when we start up,
|
|
|
580c05 |
and the system is configured to disable password authentication,
|
|
|
580c05 |
then we need to ask the user to insert their smartcard.
|
|
|
b97e22 |
|
|
|
580c05 |
This commit fixes that.
|
|
|
580c05 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=740143
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/util.js | 2 +-
|
|
|
580c05 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
|
|
580c05 |
index 4bfaf7c..6286b84 100644
|
|
|
580c05 |
--- a/js/gdm/util.js
|
|
|
580c05 |
+++ b/js/gdm/util.js
|
|
|
580c05 |
@@ -410,7 +410,7 @@ const ShellUserVerifier = new Lang.Class({
|
|
|
580c05 |
_updateDefaultService: function() {
|
|
|
580c05 |
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
|
|
580c05 |
this._defaultService = PASSWORD_SERVICE_NAME;
|
|
|
580c05 |
- else if (this.smartcardDetected)
|
|
|
580c05 |
+ else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY))
|
|
|
580c05 |
this._defaultService = SMARTCARD_SERVICE_NAME;
|
|
|
580c05 |
else if (this._haveFingerprintReader)
|
|
|
580c05 |
this._defaultService = FINGERPRINT_SERVICE_NAME;
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
b97e22 |
|
|
|
580c05 |
From 4bf6c66b064b24161889900aa8cb3ba0fa2701df Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Wed, 1 Jul 2015 11:18:44 -0400
|
|
|
580c05 |
Subject: [PATCH 13/19] gdm: use password authentication if all schemes are
|
|
|
580c05 |
disabled
|
|
|
580c05 |
|
|
|
580c05 |
This prevents a traceback, at least.
|
|
|
b97e22 |
---
|
|
|
580c05 |
js/gdm/util.js | 5 +++++
|
|
|
580c05 |
1 file changed, 5 insertions(+)
|
|
|
b97e22 |
|
|
|
580c05 |
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
|
|
580c05 |
index 6286b84..dd04544 100644
|
|
|
580c05 |
--- a/js/gdm/util.js
|
|
|
580c05 |
+++ b/js/gdm/util.js
|
|
|
580c05 |
@@ -414,6 +414,11 @@ const ShellUserVerifier = new Lang.Class({
|
|
|
580c05 |
this._defaultService = SMARTCARD_SERVICE_NAME;
|
|
|
580c05 |
else if (this._haveFingerprintReader)
|
|
|
580c05 |
this._defaultService = FINGERPRINT_SERVICE_NAME;
|
|
|
580c05 |
+
|
|
|
580c05 |
+ if (!this._defaultService) {
|
|
|
580c05 |
+ log("no authentication service is enabled, using password authentication");
|
|
|
580c05 |
+ this._defaultService = PASSWORD_SERVICE_NAME;
|
|
|
580c05 |
+ }
|
|
|
b97e22 |
},
|
|
|
b97e22 |
|
|
|
580c05 |
_startService: function(serviceName) {
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
580c05 |
|
|
|
580c05 |
From 9f99fbecd20cb1d1270138c1a207559a663a7c67 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
580c05 |
Date: Fri, 10 Jul 2015 18:58:05 +0200
|
|
|
580c05 |
Subject: [PATCH 14/19] loginDialog: Limit user list to the available height
|
|
|
580c05 |
|
|
|
580c05 |
We currently will always allocate the user list's preferred size, so it
|
|
|
580c05 |
will grow indefinitely and never scroll; limit the height instead to
|
|
|
580c05 |
get the desired scrolling behavior when necessary.
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 2 ++
|
|
|
580c05 |
1 file changed, 2 insertions(+)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 02c8201..66b8fff 100644
|
|
|
580c05 |
--- a/js/gdm/loginDialog.js
|
|
|
580c05 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -546,6 +546,8 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
|
|
|
580c05 |
let centerY = dialogBox.y1 + (dialogBox.y2 - dialogBox.y1) / 2;
|
|
|
b97e22 |
|
|
|
580c05 |
+ natHeight = Math.min(natHeight, dialogBox.y2 - dialogBox.y1);
|
|
|
580c05 |
+
|
|
|
580c05 |
actorBox.x1 = Math.floor(centerX - natWidth / 2);
|
|
|
580c05 |
actorBox.y1 = Math.floor(centerY - natHeight / 2);
|
|
|
580c05 |
actorBox.x2 = actorBox.x1 + natWidth;
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
580c05 |
|
|
|
580c05 |
From 1a10f4dde018a19226daeef95556c0582d3c39a9 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Wed, 15 Jul 2015 15:52:29 -0400
|
|
|
580c05 |
Subject: [PATCH 15/19] gdm: unconditionally cancel auth user verifier on reset
|
|
|
580c05 |
|
|
|
580c05 |
We currently only cancel the user verifier on reset if
|
|
|
580c05 |
verifying, but that means we don't properly cancel it when
|
|
|
580c05 |
asking for a username at the Not Listed screen.
|
|
|
580c05 |
|
|
|
580c05 |
The object already handles getting called when there is
|
|
|
580c05 |
nothing to cancel, so just cancel it unconditionally.
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/authPrompt.js | 2 +-
|
|
|
580c05 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
580c05 |
index 2ac0a54..22b102c 100644
|
|
|
580c05 |
--- a/js/gdm/authPrompt.js
|
|
|
580c05 |
+++ b/js/gdm/authPrompt.js
|
|
|
580c05 |
@@ -434,7 +434,7 @@ const AuthPrompt = new Lang.Class({
|
|
|
580c05 |
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
|
|
580c05 |
this.cancelButton.reactive = true;
|
|
|
b97e22 |
|
|
|
580c05 |
- if (oldStatus == AuthPromptStatus.VERIFYING)
|
|
|
580c05 |
+ if (this._userVerifier)
|
|
|
580c05 |
this._userVerifier.cancel();
|
|
|
b97e22 |
|
|
|
580c05 |
this._queryingService = null;
|
|
|
b97e22 |
--
|
|
|
580c05 |
2.5.0
|
|
|
b97e22 |
|
|
|
4c1248 |
|
|
|
580c05 |
From 8b5dfd5db42a9f5688edb304fd31f09fcbde129b Mon Sep 17 00:00:00 2001
|
|
|
4c1248 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Fri, 17 Jul 2015 12:57:21 -0400
|
|
|
580c05 |
Subject: [PATCH 16/19] authPrompt: set next button to next when asking for
|
|
|
580c05 |
username
|
|
|
580c05 |
|
|
|
580c05 |
If the next button ever gets set to Sign In, it won't
|
|
|
580c05 |
get reset to next until the next question asked by pam.
|
|
|
580c05 |
|
|
|
580c05 |
This commit ensures it gets reset to Next when asking
|
|
|
580c05 |
for the username.
|
|
|
580c05 |
---
|
|
|
580c05 |
js/gdm/authPrompt.js | 1 +
|
|
|
580c05 |
1 file changed, 1 insertion(+)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
580c05 |
index 22b102c..c69ade4 100644
|
|
|
580c05 |
--- a/js/gdm/authPrompt.js
|
|
|
580c05 |
+++ b/js/gdm/authPrompt.js
|
|
|
580c05 |
@@ -433,6 +433,7 @@ const AuthPrompt = new Lang.Class({
|
|
|
580c05 |
let oldStatus = this.verificationStatus;
|
|
|
580c05 |
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
|
|
580c05 |
this.cancelButton.reactive = true;
|
|
|
580c05 |
+ this.nextButton.label = _("Next");
|
|
|
580c05 |
|
|
|
580c05 |
if (this._userVerifier)
|
|
|
580c05 |
this._userVerifier.cancel();
|
|
|
580c05 |
--
|
|
|
580c05 |
2.5.0
|
|
|
580c05 |
|
|
|
4c1248 |
|
|
|
580c05 |
From 87eb68c1c9edd1c1a8c961669c9a4b01f29377d9 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Wed, 22 Jul 2015 14:52:22 -0400
|
|
|
580c05 |
Subject: [PATCH 17/19] authPrompt: don't allow next if entry is empty
|
|
|
4c1248 |
|
|
|
580c05 |
Normally the user isn't allowed to proceed past
|
|
|
580c05 |
the username question until they've filled it in.
|
|
|
580c05 |
To ensure this, the authprompt code desensitizes
|
|
|
580c05 |
the next button when the number of characters change to
|
|
|
580c05 |
zero.
|
|
|
4c1248 |
|
|
|
580c05 |
Unfortunately it fails to desensitize the next button
|
|
|
580c05 |
up front when the entry starts out empty.
|
|
|
4c1248 |
|
|
|
580c05 |
This commit addresses that bug.
|
|
|
4c1248 |
---
|
|
|
580c05 |
js/gdm/authPrompt.js | 2 +-
|
|
|
4c1248 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
4c1248 |
|
|
|
580c05 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
580c05 |
index c69ade4..3e9eb9a 100644
|
|
|
580c05 |
--- a/js/gdm/authPrompt.js
|
|
|
580c05 |
+++ b/js/gdm/authPrompt.js
|
|
|
580c05 |
@@ -402,7 +402,7 @@ const AuthPrompt = new Lang.Class({
|
|
|
4c1248 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
updateSensitivity: function(sensitive) {
|
|
|
580c05 |
- this._updateNextButtonSensitivity(sensitive);
|
|
|
580c05 |
+ this._updateNextButtonSensitivity(sensitive && this._entry.text.length > 0);
|
|
|
580c05 |
this._entry.reactive = sensitive;
|
|
|
580c05 |
this._entry.clutter_text.editable = sensitive;
|
|
|
580c05 |
},
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
4c1248 |
|
|
|
4c1248 |
|
|
|
580c05 |
From 20d76a7dac49ece9477be410c243aedf79535bc4 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Tue, 4 Aug 2015 09:53:04 -0400
|
|
|
580c05 |
Subject: [PATCH 18/19] gdm: make user list fade-in on vt switch more reliable
|
|
|
4c1248 |
|
|
|
580c05 |
We fade out the authentication prompt when a user successfully
|
|
|
580c05 |
logs into a user session. We reset it and fade it back in when
|
|
|
580c05 |
the user switches back to the login screen VT.
|
|
|
4c1248 |
|
|
|
580c05 |
The problem is, we only fade it back in if the auth prompt status is
|
|
|
580c05 |
VERIFICATION_SUCCEEDED. It's possible for it to be NOT_VERIFYING
|
|
|
580c05 |
if the authprompt gets reset for some other reason in the interim.
|
|
|
580c05 |
|
|
|
580c05 |
This commit changes the check to be more precise. We now only skip
|
|
|
580c05 |
the fade-in, if we're already faded in, and we only skip the reset if
|
|
|
580c05 |
we're already reset.
|
|
|
580c05 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=753181
|
|
|
4c1248 |
---
|
|
|
580c05 |
js/gdm/loginDialog.js | 5 +++--
|
|
|
580c05 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
4c1248 |
|
|
|
4c1248 |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
580c05 |
index 66b8fff..a51ffd5 100644
|
|
|
4c1248 |
--- a/js/gdm/loginDialog.js
|
|
|
4c1248 |
+++ b/js/gdm/loginDialog.js
|
|
|
580c05 |
@@ -870,7 +870,7 @@ const LoginDialog = new Lang.Class({
|
|
|
4c1248 |
},
|
|
|
4c1248 |
|
|
|
580c05 |
_loginScreenSessionActivated: function() {
|
|
|
580c05 |
- if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFICATION_SUCCEEDED)
|
|
|
580c05 |
+ if (this.actor.opacity == 255 && this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
|
|
|
580c05 |
return;
|
|
|
4c1248 |
|
|
|
4c1248 |
Tweener.addTween(this.actor,
|
|
|
580c05 |
@@ -887,7 +887,8 @@ const LoginDialog = new Lang.Class({
|
|
|
580c05 |
},
|
|
|
580c05 |
onUpdateScope: this,
|
|
|
580c05 |
onComplete: function() {
|
|
|
580c05 |
- this._authPrompt.reset();
|
|
|
580c05 |
+ if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
|
|
|
580c05 |
+ this._authPrompt.reset();
|
|
|
580c05 |
},
|
|
|
580c05 |
onCompleteScope: this });
|
|
|
4c1248 |
},
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
4c1248 |
|
|
|
4c1248 |
|
|
|
580c05 |
From eb2381cff936e62f68d72730dbff2d485408059f Mon Sep 17 00:00:00 2001
|
|
|
4c1248 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Mon, 3 Aug 2015 14:07:17 -0400
|
|
|
580c05 |
Subject: [PATCH 19/19] gdm: clear user verifier when finished with it
|
|
|
4c1248 |
|
|
|
580c05 |
We only need the user verifier for the purpose of user verification.
|
|
|
580c05 |
Once it's complete we should clear it so it doesn't get in the way
|
|
|
580c05 |
later.
|
|
|
580c05 |
|
|
|
580c05 |
This fixes a bug introduced in commit 3c8c5a557059 that leads to the
|
|
|
580c05 |
user session crashing when the login screen is reactivated.
|
|
|
580c05 |
|
|
|
580c05 |
https://bugzilla.gnome.org/show_bug.cgi?id=753181
|
|
|
4c1248 |
---
|
|
|
580c05 |
js/gdm/authPrompt.js | 2 ++
|
|
|
580c05 |
1 file changed, 2 insertions(+)
|
|
|
4c1248 |
|
|
|
580c05 |
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
|
|
580c05 |
index 3e9eb9a..34ad7fb 100644
|
|
|
580c05 |
--- a/js/gdm/authPrompt.js
|
|
|
580c05 |
+++ b/js/gdm/authPrompt.js
|
|
|
580c05 |
@@ -490,6 +490,7 @@ const AuthPrompt = new Lang.Class({
|
|
|
4c1248 |
|
|
|
580c05 |
finish: function(onComplete) {
|
|
|
580c05 |
if (!this._userVerifier.hasPendingMessages) {
|
|
|
580c05 |
+ this._userVerifier.clear();
|
|
|
580c05 |
onComplete();
|
|
|
4c1248 |
return;
|
|
|
4c1248 |
}
|
|
|
580c05 |
@@ -497,6 +498,7 @@ const AuthPrompt = new Lang.Class({
|
|
|
580c05 |
let signalId = this._userVerifier.connect('no-more-messages',
|
|
|
580c05 |
Lang.bind(this, function() {
|
|
|
580c05 |
this._userVerifier.disconnect(signalId);
|
|
|
580c05 |
+ this._userVerifier.clear();
|
|
|
580c05 |
onComplete();
|
|
|
580c05 |
}));
|
|
|
4c1248 |
},
|
|
|
4c1248 |
--
|
|
|
580c05 |
2.5.0
|
|
|
4c1248 |
|