ui: move userAvatar to own file

There are a few places in the code that use the UserAvatar widget
without using the user menu.

Since the avatar is used outside of the user menu, move it from
userMenu.js to its own file.
This commit is contained in:
Ray Strode
2013-06-14 08:49:12 -04:00
parent 026ec2d4c2
commit 4f135be89a
7 changed files with 69 additions and 57 deletions

View File

@ -6,7 +6,7 @@ const AccountsService = imports.gi.AccountsService;
const Lang = imports.lang;
const St = imports.gi.St;
const UserMenu = imports.ui.userMenu;
const UserAvatar = imports.ui.userAvatar;
const UserWidget = new Lang.Class({
Name: 'UserWidget',
@ -18,7 +18,7 @@ const UserWidget = new Lang.Class({
vertical: false });
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
this._avatar = new UserMenu.UserAvatarWidget(user);
this._avatar = new UserAvatar.UserAvatar(user);
this.actor.add(this._avatar.actor,
{ x_fill: true, y_fill: true });