buttonBox: Drop Shell.GenericContainer usage

Another easy port.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153
This commit is contained in:
Georges Basile Stavracas Neto
2018-07-06 10:48:15 +02:00
parent dd4709bb27
commit fc342fe8c5
2 changed files with 41 additions and 43 deletions

View File

@ -86,6 +86,7 @@ function _unpremultiply(color) {
var AppMenuButton = new Lang.Class({
Name: 'AppMenuButton',
Extends: PanelMenu.Button,
Signals: {'changed': {}},
_init(panel) {
this.parent(0.0, null, true);
@ -127,7 +128,7 @@ var AppMenuButton = new Lang.Class({
this._visible = this._gtkSettings.gtk_shell_shows_app_menu &&
!Main.overview.visible;
if (!this._visible)
this.actor.hide();
this.hide();
this._overviewHidingId = Main.overview.connect('hiding', this._sync.bind(this));
this._overviewShowingId = Main.overview.connect('showing', this._sync.bind(this));
this._showsAppMenuId = this._gtkSettings.connect('notify::gtk-shell-shows-app-menu',
@ -155,7 +156,7 @@ var AppMenuButton = new Lang.Class({
this._visible = true;
this.actor.reactive = true;
this.actor.show();
this.show();
Tweener.removeTweens(this.actor);
Tweener.addTween(this.actor,
{ opacity: 255,
@ -175,7 +176,7 @@ var AppMenuButton = new Lang.Class({
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete() {
this.actor.hide();
this.hide();
},
onCompleteScope: this });
},
@ -366,7 +367,7 @@ var AppMenuButton = new Lang.Class({
this._menuManager.addMenu(menu);
},
destroy() {
_onDestroy() {
if (this._appStateChangedSignalId > 0) {
let appSys = Shell.AppSystem.get_default();
appSys.disconnect(this._appStateChangedSignalId);
@ -398,8 +399,6 @@ var AppMenuButton = new Lang.Class({
}
});
Signals.addSignalMethods(AppMenuButton.prototype);
var ActivitiesButton = new Lang.Class({
Name: 'ActivitiesButton',
Extends: PanelMenu.Button,