App Picker: Prevent drag if favorite-apps is locked.
Because there's nothing (in single-monitor setups) that could take the drop in this case. * js/ui/appDisplay.js: AllView._loadApps(), FrequentView._loadApps(): Pass an isDraggable parameter when creating the AppIcons, depending on whether the favorite-apps key is locked. AppIcon._init(): Check for isDraggable in the params and do not create _draggable if it was specified, to prevent a drag from starting. AppIcon.popupMenu(): Check _draggable before trying to call fakeRelease on it. * js/ui/dash.js: Dash._createAppItem(): Check AppIcon._draggable before trying to connect to its signals. https://bugzilla.gnome.org/show_bug.cgi?id=741325
This commit is contained in:
@ -535,14 +535,17 @@ const Dash = new Lang.Class({
|
||||
let appIcon = new AppDisplay.AppIcon(app,
|
||||
{ setSizeManually: true,
|
||||
showLabel: false });
|
||||
appIcon._draggable.connect('drag-begin',
|
||||
Lang.bind(this, function() {
|
||||
appIcon.actor.opacity = 50;
|
||||
}));
|
||||
appIcon._draggable.connect('drag-end',
|
||||
Lang.bind(this, function() {
|
||||
appIcon.actor.opacity = 255;
|
||||
}));
|
||||
if (appIcon._draggable) {
|
||||
appIcon._draggable.connect('drag-begin',
|
||||
Lang.bind(this, function() {
|
||||
appIcon.actor.opacity = 50;
|
||||
}));
|
||||
appIcon._draggable.connect('drag-end',
|
||||
Lang.bind(this, function() {
|
||||
appIcon.actor.opacity = 255;
|
||||
}));
|
||||
}
|
||||
|
||||
appIcon.connect('menu-state-changed',
|
||||
Lang.bind(this, function(appIcon, opened) {
|
||||
this._itemMenuStateChanged(item, opened);
|
||||
|
Reference in New Issue
Block a user