Proposal - middle mouse button click on tab label closes card view

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Proposal - middle mouse button click on tab label closes card view

Jochen Riekhof-8
Hi...

beeing a frequent user of Firefox and Intellij I got used to the
behavior that a middle mouse button (wheel button) click on a tab label
closes it. I think it is also implemented this way in Opera and eclipse.
Would it be difficult to put into Dolphin 6 as well?

Ciao

...Jochen


Reply | Threaded
Open this post in threaded view
|

Re: Proposal - middle mouse button click on tab label closes card view

Don Rylander-3
Jochen,
"Jochen Riekhof" <[hidden email]> wrote in message
news:-[hidden email]...
> Hi...
>
> beeing a frequent user of Firefox and Intellij I got used to the behavior
> that a middle mouse button (wheel button) click on a tab label closes it.
> I think it is also implemented this way in Opera and eclipse. Would it be
> difficult to put into Dolphin 6 as well?

I got very accustomed to this, too, and I have slapped together an
embarrassingly hackish solution in my image.

Caveat: This isn't something I personally trust enough yet to add
permanently.  I just open an inspector on an IdeaSpace's tab view, and run
the code below.  It makes use of the InstanceSpecific behavior, but you
wouldn't have to do that.  You
Note that it generally (always?) causes a NotFound error.  Being too lazy to
figure out why, I just ignore it; that would be the "embarrassingly hackish"
bit, and also why it's not a "real" part of my image yet.

HTH,

Don

================ Code follows this line ================
"From within an inspector on the TabViewXP.  File-in Instance-specific
Behavior.st first."
SmalltalkSystem sourceManager fileIn: 'Instance-specific Behavior.st'.
self assumeInstanceBasedBehavior.
self when: #middleButtonReleased: send: #checkToCloseCard: to: self.
self class methodDictionary
 at: #checkToCloseCard:
 put: (Compiler compile: 'checkToCloseCard: aMouseEvent

| theIndex theCard |
theIndex := self itemFromPoint: (aMouseEvent lParamX @ aMouseEvent lParamY).
theCard:=self parentView cards at: theIndex.
theCard notNil ifTrue: [theCard ensureVisible. [self topShell closeCard:
theCard] on: NotFoundError do: [:e|]].').

self respondsTo: #checkToCloseCard: