loginDialog: Pass-through UserWidget's label-actor
https://bugzilla.gnome.org/show_bug.cgi?id=729603
This commit is contained in:
parent
eab8ea9a1e
commit
c4b2968f9f
@ -22,6 +22,7 @@ const Clutter = imports.gi.Clutter;
|
|||||||
const Gdm = imports.gi.Gdm;
|
const Gdm = imports.gi.Gdm;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
@ -70,6 +71,9 @@ const UserListItem = new Lang.Class({
|
|||||||
this._userWidget = new UserWidget.UserWidget(this.user);
|
this._userWidget = new UserWidget.UserWidget(this.user);
|
||||||
layout.add(this._userWidget.actor);
|
layout.add(this._userWidget.actor);
|
||||||
|
|
||||||
|
this._userWidget.actor.bind_property('label-actor', this.actor, 'label-actor',
|
||||||
|
GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
|
this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
|
||||||
scale_x: 0 });
|
scale_x: 0 });
|
||||||
layout.add(this._timedLoginIndicator);
|
layout.add(this._timedLoginIndicator);
|
||||||
|
@ -6,6 +6,7 @@ const Clutter = imports.gi.Clutter;
|
|||||||
const AccountsService = imports.gi.AccountsService;
|
const AccountsService = imports.gi.AccountsService;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
@ -117,6 +118,7 @@ const UserWidgetLabel = new Lang.Class({
|
|||||||
this._currentLabel = this._realNameLabel;
|
this._currentLabel = this._realNameLabel;
|
||||||
else
|
else
|
||||||
this._currentLabel = this._userNameLabel;
|
this._currentLabel = this._userNameLabel;
|
||||||
|
this.label_actor = this._currentLabel;
|
||||||
|
|
||||||
let childBox = new Clutter.ActorBox();
|
let childBox = new Clutter.ActorBox();
|
||||||
childBox.x1 = 0;
|
childBox.x1 = 0;
|
||||||
@ -158,6 +160,9 @@ const UserWidget = new Lang.Class({
|
|||||||
this._label = new UserWidgetLabel(user);
|
this._label = new UserWidgetLabel(user);
|
||||||
this.actor.add_child(this._label);
|
this.actor.add_child(this._label);
|
||||||
|
|
||||||
|
this._label.bind_property('label-actor', this.actor, 'label-actor',
|
||||||
|
GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUser));
|
this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUser));
|
||||||
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUser));
|
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUser));
|
||||||
this._updateUser();
|
this._updateUser();
|
||||||
|
Loading…
Reference in New Issue
Block a user