MozillaZine

[Update for 1.0 PR] Super Drag and Go

Announce and Discuss the Latest Theme and Extension Releases.
code65536

User avatar
 
Posts: 57
Joined: October 17th, 2004, 7:01 pm
Location: .us

Post Posted April 1st, 2008, 2:41 am

Merlyel wrote:And why can't you do it? Call it SDaG2, keep original author as one of coauthors and post it.

Well, that won't update the SD&G listing on AMO; it'll just create a new one extension and a new listing. And since creating a new extension means using a new extension ID, it means that existing SD&G users can't update SD&G to the new extension; they must uninstall the old and install a new one, and Firefox, when looking for updates, will look only at the extension ID and thus never find the new one.

But yes, I am planning on eventually doing that. I just finished completely rewriting SD&G yesterday from scratch as a new, different extension, with a smaller, tighter code base. There was a lot of ugly code in the original SD&G (for example, replacing global functions in contentAreaDNDObserver and nsDragAndDrop, which is something that really should be avoided because it was affecting some drops that were occurring outside of the browser content area and is generally bad practice anyway). 0.2.6.3 was only a stopgap version. But before posting it, I want to use it for a little while to make sure that I didn't break anything...

Merlyel

User avatar
 
Posts: 102
Joined: January 13th, 2006, 7:17 pm
Location: 54°45' N; 56°0' E

Post Posted April 1st, 2008, 3:49 am

code65536
they must uninstall the old and install a new one

They would have to do it since original SDaG does not work under fx 3 (and even 2). So I guess that would not cause any trouble.
But yes, I am planning on eventually doing that. I just finished completely rewriting SD&G yesterday from scratch as a new, different extension, with a smaller, tighter code base.

Will it be only fx3 version or will it work on 2.x too?
But before posting it, I want to use it for a little while to make sure that I didn't break anything...

I think few beta-testers for your new SDaG would be better than one ;)

code65536

User avatar
 
Posts: 57
Joined: October 17th, 2004, 7:01 pm
Location: .us

Post Posted April 1st, 2008, 4:47 pm

Merlyel wrote:They would have to do it since original SDaG does not work under fx 3 (and even 2). So I guess that would not cause any trouble.

What I meant was that users of the older versions of SD&G can update to SD&G-0.2.6.3 by just installing it, without having to first uninstall the old version. With a new extension, that sort of update would not be possible, which is one of the reasons I had been hesitant spin SD&G off into a new extension.
Will it be only fx3 version or will it work on 2.x too?

Should work on both FF2 and the latest FF3 nightly...

RNiK

User avatar
 
Posts: 561
Joined: August 9th, 2006, 6:47 am
Location: Forette City, Italy

Post Posted April 2nd, 2008, 10:02 am

code65536 wrote:I just finished completely rewriting SD&G yesterday from scratch as a new, different extension, with a smaller, tighter code base.

Maybe you can take a look at the Drag'n'go snippet here: http://mozilla.zeniko.ch/userchrome.js.html#snippets

Hope this helps! :)
MondoWin ==> Italian site for information about MS Windows tweaking

code65536

User avatar
 
Posts: 57
Joined: October 17th, 2004, 7:01 pm
Location: .us

Post Posted April 2nd, 2008, 10:14 am

RNiK wrote:
code65536 wrote:I just finished completely rewriting SD&G yesterday from scratch as a new, different extension, with a smaller, tighter code base.

Maybe you can take a look at the Drag'n'go snippet here: http://mozilla.zeniko.ch/userchrome.js.html#snippets

Hope this helps! :)

Thanks, but my code base is even smaller than that (well, once you strip out all the comments). ;) That snippet is actually just an adaptation of the SD&G code and it contains a number of the flaws present in the SD&G code base (e.g., clobbering parts of contentAreaDNDObserver and all the undesirable side effects of that).



Anyway, I have posted QuickDrag (the re-write of SD&G) in this thread.

Since I will no longer be maintaining and updating SD&G for new FF releases, I recommend that people migrate to QuickDrag (or to Drag de Go, which has a richer feature set, but also a much larger footprint).

zeniko
 
Posts: 201
Joined: October 19th, 2007, 4:50 am
Location: Swiss Confederation

Post Posted April 3rd, 2008, 4:15 pm

code65536 wrote:Thanks, but my code base is even smaller than that (well, once you strip out all the comments). ;)

Hardly... and you even do less (mainly not handling multiple dropped files and not treating image links as links). ;)

BTW: What's the reasoning behind preferring link text to the proper hyperlink? I mostly drag proper hyperlinks - and I always want the URL.

code65536

User avatar
 
Posts: 57
Joined: October 17th, 2004, 7:01 pm
Location: .us

Post Posted April 3rd, 2008, 5:09 pm

zeniko wrote:Hardly... and you even do less (mainly not handling multiple dropped files and not treating image links as links). ;)

It was intentional. I disliked the idea of overriding the default file drop handler (or any of the built-in handlers, for that matter). That seemed to be something that is out of the scope of what was desirable--my goal with QuickDrag was to limit the scope of its impact as much as possible (so doing something like replacing nsDragAndDrop::checkCanDrop that's used all over the place would be out of the question for my goals, and similarly so would overriding file drop handling). SD&G didn't handle multi file drops anyway, what file drop it did handle was just duping the built-in behavior (which could be problematic because if the built-in behavior was ever updated in a future FF version, SD&G would be overriding the new version's behavior), so there was no benefit in SD&G's promiscuous scope.

I had only briefly glanced at your code, so I didn't notice that yours does support multi file drops. Sorry about that. So that is one place where my implementation falls short on features. But I've personally used SD&G only for the browsing tasks of navigation/searching/saving, so I didn't find it missing. ;)

zeniko wrote:BTW: What's the reasoning behind preferring link text to the proper hyperlink? I mostly drag proper hyperlinks - and I always want the URL.

I explained that in the FAQ, and it's the same reason I don't treat image links as links. Middle-click-to-open has always existed, and I've always used that for opening stuff in a new tab. At the same time, I've often wanted to save an image that was linked, and I've often wanted to search for some text that was linked. With SD&G, if I wanted to search for text that happened to be linked, it was annoyingly difficult because I had to select the text (w/o accidentally clicking on it in the process) along with some text outside of the link (so that the drag won't register as a link, which wasn't always possible, and would sometimes involve manually fixing up the search afterwards if the outside text changed the meaning of the query)--it was basically my biggest complaint about SD&G. Because the middle-click-to-open behavior already existed (and most trackpad drivers support tap zones or other means to emulate a middle button; I do a lot on a laptop w/o a physical middle button and I still use middle-click-to-open) and because middle-click-to-open is even easier and faster than drag-to-open, it seemed a waste to have yet another mouse action mapped to open a link when it could instead be mapped to search or to save an image.

zeniko
 
Posts: 201
Joined: October 19th, 2007, 4:50 am
Location: Swiss Confederation

Post Posted April 3rd, 2008, 5:26 pm

code65536 wrote:Because the middle-click-to-open behavior had already existed (and most trackpad drivers support tap zones or other means to emulate a middle button; I do a lot on a laptop w/o a physical middle button), it seemed a waste to have the drag behavior open the link when it could be used for search and saving.

Well, my ThinkPad ain't got no touchpad and the middle mouse button is needed for scrolling (and at work the middle mouse button used to be misconfigured without an easy fix), so I've never had much of a choice. No worries, though, I'll continue to maintain my own Super DragAndGo fork...

code65536

User avatar
 
Posts: 57
Joined: October 17th, 2004, 7:01 pm
Location: .us

Post Posted April 3rd, 2008, 6:17 pm

zeniko wrote:Well, my ThinkPad ain't got no touchpad and the middle mouse button is needed for scrolling (and at work the middle mouse button used to be misconfigured without an easy fix), so I've never had much of a choice.

Yikes! Well, I guess that would be a problem. ;) I wouldn't know how I'd survive without the middle click...

(Maybe I'll add an option to revert the link behavior in a later version...)

Edit: Starting with version 1.0.1, QuickDrag will now offer the option to revert the link dragging behavior to the old SD&G behavior of opening it instead of searching or saving.

AlphawolfWMP

User avatar
 
Posts: 22
Joined: April 14th, 2007, 12:39 pm

Post Posted January 27th, 2010, 11:29 am

Doesn't seem to be working in 3.6. I can drag a link, but it doesn't open a new tab on releasing the mouse button. Anyone else having the problem?
:|

RNiK

User avatar
 
Posts: 561
Joined: August 9th, 2006, 6:47 am
Location: Forette City, Italy

Post Posted January 28th, 2010, 1:16 am

AlphawolfWMP wrote:Doesn't seem to be working in 3.6. I can drag a link, but it doesn't open a new tab on releasing the mouse button. Anyone else having the problem?

As per this, you'd better switch to QuickDrag. 8-)
code65536 wrote:Since I will no longer be maintaining and updating SD&G for new FF releases, I recommend that people migrate to QuickDrag (or to Drag de Go, which has a richer feature set, but also a much larger footprint).
MondoWin ==> Italian site for information about MS Windows tweaking

JulesDM
 
Posts: 1
Joined: February 16th, 2010, 3:10 pm

Post Posted February 16th, 2010, 3:21 pm

This was a good plugin, thanks for developing it initially. I have tried QuickDrag and it is nice, but it sometimes causes my FF to crash. Does anyone else experience that or am I alone? Is there another add-on that works just as well that maybe doesn't have an impact on the performance of Firefox?

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 5 guests