mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
@@ -131,6 +131,8 @@ var taskbarAppIcon = Utils.defineClass({
|
||||
|
||||
this.callParent('_init', appInfo.app, iconParams);
|
||||
|
||||
Utils.wrapActor(this.icon);
|
||||
|
||||
this._dot.set_width(0);
|
||||
this._isGroupApps = this._dtpSettings.get_boolean('group-apps');
|
||||
|
||||
@@ -1517,10 +1519,13 @@ var ShowAppsIconWrapper = Utils.defineClass({
|
||||
this._dtpSettings = settings;
|
||||
this.realShowAppsIcon = new Dash.ShowAppsIcon();
|
||||
|
||||
Utils.wrapActor(this.realShowAppsIcon);
|
||||
Utils.wrapActor(this.realShowAppsIcon.toggleButton);
|
||||
|
||||
/* the variable equivalent to toggleButton has a different name in the appIcon class
|
||||
(actor): duplicate reference to easily reuse appIcon methods */
|
||||
this.actor = this.realShowAppsIcon.toggleButton;
|
||||
(this.realShowAppsIcon.actor || this.realShowAppsIcon).y_align = Clutter.ActorAlign.START;
|
||||
this.realShowAppsIcon.actor.y_align = Clutter.ActorAlign.START;
|
||||
|
||||
// Re-use appIcon methods
|
||||
this._removeMenuTimeout = AppDisplay.AppIcon.prototype._removeMenuTimeout;
|
||||
@@ -1543,7 +1548,7 @@ var ShowAppsIconWrapper = Utils.defineClass({
|
||||
this.actor.connect('popup-menu', Lang.bind(this, this._onKeyboardPopupMenu));
|
||||
|
||||
this._menu = null;
|
||||
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
||||
this._menuManager = new PopupMenu.PopupMenuManager(this.actor);
|
||||
this._menuTimeoutId = 0;
|
||||
|
||||
this.realShowAppsIcon.showLabel = ItemShowLabel;
|
||||
|
||||
3
panel.js
3
panel.js
@@ -70,6 +70,9 @@ var dtpPanelWrapper = Utils.defineClass({
|
||||
this.panel = panel;
|
||||
this.panelBox = panelBox;
|
||||
this.isSecondary = isSecondary;
|
||||
|
||||
Utils.wrapActor(this.panel);
|
||||
Utils.wrapActor(this.panel.statusArea.activities || 0);
|
||||
},
|
||||
|
||||
enable : function() {
|
||||
|
||||
@@ -268,6 +268,7 @@ var dtpPanelManager = Utils.defineClass({
|
||||
|
||||
_adjustPanelMenuButton: function(button, monitor, arrowSide) {
|
||||
if (button) {
|
||||
Utils.wrapActor(button);
|
||||
button.menu._boxPointer._dtpSourceActor = button.menu._boxPointer.sourceActor;
|
||||
button.menu._boxPointer.sourceActor = button.actor;
|
||||
button.menu._boxPointer._userArrowSide = arrowSide;
|
||||
|
||||
9
utils.js
9
utils.js
@@ -21,6 +21,7 @@
|
||||
* Some code was also adapted from the upstream Gnome Shell source code.
|
||||
*/
|
||||
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const GdkPixbuf = imports.gi.GdkPixbuf
|
||||
const Gi = imports._gi;
|
||||
const Gio = imports.gi.Gio;
|
||||
@@ -279,6 +280,14 @@ var hookVfunc = function(proto, symbol, func) {
|
||||
}
|
||||
};
|
||||
|
||||
var wrapActor = function(actor) {
|
||||
if (actor) {
|
||||
Object.defineProperty(actor, 'actor', {
|
||||
value: actor instanceof Clutter.Actor ? actor : actor.actor
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var addKeybinding = function(key, settings, handler, modes) {
|
||||
if (!Main.wm._allowedKeybindings[key]) {
|
||||
Main.wm.addKeybinding(
|
||||
|
||||
Reference in New Issue
Block a user