After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 609913 - [Overview] Make indicators drop targets
[Overview] Make indicators drop targets
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-14 13:01 UTC by drago01
Modified: 2010-02-15 16:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[Overview] Make indicators drop targets (1.24 KB, patch)
2010-02-14 13:03 UTC, drago01
needs-work Details | Review
[Overview] Make workspace indicators drop targets (1.35 KB, patch)
2010-02-15 14:02 UTC, drago01
committed Details | Review

Description drago01 2010-02-14 13:01:48 UTC
Opening apps on specific workspaces is easy in grid view, but not in linear view.

An easy solution is to allow dropping on the workspace indicators.

They might be small but from quick testing it seems to work well for me (well in fact they are bigger than the [+] button).
Comment 1 drago01 2010-02-14 13:03:04 UTC
Created attachment 153760 [details] [review]
[Overview] Make indicators drop targets
Comment 2 Dan Winship 2010-02-15 13:08:22 UTC
Comment on attachment 153760 [details] [review]
[Overview] Make indicators drop targets

>Subject: [PATCH] [Overview] Make indicators drop targets
>
>Allow dropping on the indicators to open apps on specific workspaces.

say "workspace indicators", not just "indicators" please (in both places)

>+        actor._delegate = actor;
>+        actor._delegate.acceptDrop = Lang.bind(this, function(source, actor, x, y, time) {

huh... not totally sure I like that. Although if there isn't already a javascript object per-indicator I guess it would be pointless to make a whole new class just for that.

You should be able to do

          actor._delegate = {};

instead (and keep the second line as-is), which I think is probably nicer in terms of not having properties/functionality/whatever accidentally leak from 'actor' into its delegate.

>+            this._workspaces[i]._metaWorkspace.activate(global.get_current_time());
>+            return this._workspaces[i].acceptDrop(source, actor, x, y, time)

swap that; you should only activate the workspace if its acceptDrop method returns true.
Comment 3 drago01 2010-02-15 14:02:56 UTC
Created attachment 153828 [details] [review]
[Overview] Make workspace indicators drop targets

Fixed up patch.
Comment 4 drago01 2010-02-15 16:25:37 UTC
Comment on attachment 153828 [details] [review]
[Overview] Make workspace indicators drop targets

Pushed as a6df234.