Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Additional Option to Open in New Tabbed (or 3 Pane) Window #19

Open
EnigmaSolved opened this issue May 24, 2014 · 3 comments

Comments

@EnigmaSolved
Copy link
Contributor

This is maybe a little bit unusual (or an edge case), and I'd actually be happy to do most of the code myself (and do a Pull Request), but I'm currently stuck (which I'll describe more about below). But first, a bit more on what I'm trying to achieve.

There are two (maybe more?) kinds of new mail windows that Thunderbird creates. One is the kind which ThunderLink currently initiates, which I've seen referred to as a standalone window in Thunderbird documentation. The other kind is what I call a "tabbed window" (or in Thunderbird documentation, a 3pane window). A tabbed or 3pane window includes the folder structure (usually on the left-hand side), but with the message being the selected tab.

Normally when you Open Message in New Window you get the standalone kind of window. But if you already have a message open in a tab and you select Move to New Window you will get a 3pane window instead. In general I have preferred the standalone format (it is cleaner in appearance). But I've found that there are some reasons I'd like to switch to using the 3pane window format instead (if it can be achieved relatively easily).

Here are some relevant bits of Thunderbird code:
replaceTabWithWindow:
https://mxr.mozilla.org/comm-central/source/mail/base/content/messenger.xul#231
https://mxr.mozilla.org/comm-central/source/mail/base/content/tabmail.xml#792

duplicateTabIn:
https://mxr.mozilla.org/comm-central/source/mozilla/browser/base/content/browser.js#7049

displayMessage (and related) helper functions:
https://mxr.mozilla.org/comm-central/source/mail/base/modules/MailUtils.js#98
Which is what Thunderlink uses:
https://github.com/poohsen/thunderlink/blob/master/components/thunderlinkCommandLineHandler.js#L117

My thinking is that I may be able to use one of the helper functions to do what I want:
https://mxr.mozilla.org/comm-central/source/mail/base/modules/MailUtils.js
And I suspect the key may be in sending something for the optional variable aViewWrapperToClone which is in several of these functions. Where I'm stuck is that I don't yet comprehend how or what to pass for that variable in order to tell Thunderbird I want a 3pane window. For example, once I know what to pass in, the following addition to Thunderlink (along related code) may achieve my goal: MailUtils.openMessagesInNewWindows([msgHdr], aViewWrapperToClone_ToGet3PaneWindow);.

So if anyone knows what I need to pass in for that variable aViewWrapperToClone in order to indicate I want to clone a 3pane view, that would be super helpful! Then I can likely do the rest on my own (hopefully) and submit a pull request to merge in the addition (for others benefit).

Thanks in advance to any who offer help! :)
Sean

@poohsen
Copy link
Owner

poohsen commented Jun 12, 2014

I'm sorry Sean, but I'm completely under water job-wise, plus I'm
following a Coursera course and it's quite demanding, too. I have
absolutely no time to look into this.
If you submit a pull request, I'll gladly merge it, ofc.

Apologies,
Chris

Am 25.05.2014 00:17 schrieb Sean Slevin:

This is maybe a little bit unusual (or an edge case), and I'd
actually be happy to do most of the code myself (and do a Pull
Request), but I'm currently stuck (which I'll describe more about
below). But first, a bit more on what I'm trying to achieve.

There are two (maybe more?) kinds of new mail windows that
Thunderbird creates. One is the kind which ThunderLink currently
initiates, which I've seen referred to as a standalone window in
Thunderbird documentation. The other kind is what I call a "tabbed
window" (or in Thunderbird documentation, a 3pane window). A tabbed
or 3pane window includes the folder structure (usually on the
left-hand side), but with the message being the selected tab.

Normally when you Open Message in New Window you get the
standalone kind of window. But if you already have a message open in
a tab and you select Move to New Window you will get a 3pane
window instead. In general I have preferred the standalone format
(it is cleaner in appearance). But I've found that there are some
reasons I'd like to switch to using the 3pane window format instead
(if it can be achieved relatively easily).

Here are some relevant bits of Thunderbird code:
replaceTabWithWindow:
https://mxr.mozilla.org/comm-central/source/mail/base/content/messenger.xul#231
[1]
https://mxr.mozilla.org/comm-central/source/mail/base/content/tabmail.xml#792
[2]

duplicateTabIn:
https://mxr.mozilla.org/comm-central/source/mozilla/browser/base/content/browser.js#7049
[3]

displayMessage (and related) helper functions:
https://mxr.mozilla.org/comm-central/source/mail/base/modules/MailUtils.js#98
[4]
Which is what Thunderlink uses:
https://github.com/poohsen/thunderlink/blob/master/components/thunderlinkCommandLineHandler.js#L117
[5]

My thinking is that I may be able to use one of the helper functions
to do what I want:
https://mxr.mozilla.org/comm-central/source/mail/base/modules/MailUtils.js
[6]
And I suspect the key may be in sending something for the optional
variable aViewWrapperToClone which is in several of these functions.
Where I'm stuck is that I don't yet comprehend how or what to pass for
that variable in order to tell Thunderbird I want a 3pane window. For
example, once I know what to pass in, the following addition to
Thunderlink (along related code) may achieve my goal:
MailUtils.openMessagesInNewWindows([msgHdr],
aViewWrapperToClone_ToGet3PaneWindow);.

So if anyone knows what I need to pass in for that variable
aViewWrapperToClone in order to indicate I want to clone a 3pane view,
that would be super helpful! Then I can likely do the rest on my own
(hopefully) and submit a pull request to merge in the addition (for
others benefit).

Thanks in advance to any who offer help! :)
Sean

Reply to this email directly or view it on GitHub [7].

Links:

[1]
https://mxr.mozilla.org/comm-central/source/mail/base/content/messenger.xul#231
[2]
https://mxr.mozilla.org/comm-central/source/mail/base/content/tabmail.xml#792
[3]
https://mxr.mozilla.org/comm-central/source/mozilla/browser/base/content/browser.js#7049
[4]
https://mxr.mozilla.org/comm-central/source/mail/base/modules/MailUtils.js#98
[5]
https://github.com/poohsen/thunderlink/blob/master/components/thunderlinkCommandLineHandler.js#L117
[6]
https://mxr.mozilla.org/comm-central/source/mail/base/modules/MailUtils.js
[7] #19

@EnigmaSolved
Copy link
Contributor Author

@poohsen, no problem man--I understand! I've tinkered some more with this (thanks to some helpful pointers from Janek [creator of another extension: https://addons.mozilla.org/en-US/thunderbird/addon/identity-chooser/]), but haven't made any significant headway.

My current workaround is to set ThunderLinks to open in a New Tab, and then I Move to New Window that tab which gives me the end result I want. This is working well enough for now. I'll leave this Issue open though as I may yet make more progress at some point.

Thanks, Chris, for getting back to me--I really appreciate it! And I hope work and life ease up a bit for you! :)
Sean

@ivanperez-keera
Copy link

ivanperez-keera commented Sep 14, 2017

This would be cool.

I guess a problem could be finding the folder for a given thunderlinked message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants