-
Notifications
You must be signed in to change notification settings - Fork 104
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
Back/forward buttons do not work (semi-working patch in there!) #393
Comments
Hi, Thanks for reporting. I'm too busy with other stuff so I'm not going to implement this, but any patch would of course be most welcome. |
+1 for this. I might be able to help; do you have a sense of what's involved, or which bits of TBConversations internals are relevant starting points? |
Sure! Here's some guidance if you want to fix this. I'm talking only about navigating in the mail:3pane, and I'm not taking into account other cases, such as the conversation-in-a-tab case.
The code above is the first hit. Something interesting seems to be happening in At that point, I stopped digging into the code. I added a return true in Thunderbird's mail/base/content/mail3PaneWindowCommands.js on line 447, to pretend that the back command is always enabled, but then I got errors in the error console. Which confirmed my initial feeling that this is waaaaay too complicated for Thunderbird Conversations to interact with. Anyway, if you're motivated, what you can do is wrap your head around nsMsgDBView's implementation, and figure out exactly in which cases it will call nsMessenger's relevant functions; Thunderbird Conversations confuses nsMsgDBView a lot, because when there's more than one message selected, it appears to nsMsgDBView that we're in a thread summary, which nsMsgDBView obviously doesn't want to navigate. In that case, I imagine it will refuse to add a message url (which message by the way, since there's so many of them selected?) to the navigation history... This is horrible C++ code and there's little changes you can "do the right thing" in a clean way. The alternative is to add a hook to gFolderDisplay.navigate, which is Javascript, and wonderfully written, hence much more easy to interact with. However, you're likely to break a lot of stuff that way. Fortunately, this is an area that is well-covered by tests. Anyway, I guess my point is, if I'm not doing it, there's a reason for it: it's too hard, and not worth spending a week refactoring the C++ code just so that I have that feature working with Conversations. If you want to contribute, I can suggest much easier bugs! Cheers, jonathan |
Yowch! This looks tricky, but I find myself missing this feature a lot, ~ben On 9/2/2011 1:02 AM, protz wrote:
|
tl;dr: The following code seems to work reasonably well for me: Message.prototype.expand = function () { // NEW CODE } More details: Ok, I think I've reconstructed the call stack that you're
So the only thing missing in all this mess is to get message urls into Then I think that if you don't monkeypatch anything to do with The only challenge is when conversations skip around between folders -- ~ben |
I think you need to file a bug on Bugzilla if you managed to crash Thunderbird. That's important. Re your patch, what worries me is that loadMsgByViewIndex will trigger a message loading in the background (i.e. in the regular message pane), which
It's cool that it works, and I'm impressed that you found a way to do this! However, this seems like a huge hack. I'm kinda tolerant w.r.t. hacks, as there's lots of them in Conversations, but this really makes the hack-o-meter explode. Can you just patch nsMessenger and add a hook there that Thunderbird Conversations could use? With the rapid release cycle, that means that the patch would be integrated in, at most, 3*6 weeks, and Thunderbird Conversations could take advantage of it pretty soon. Thanks for your work! This is definitely not one of the easiest bugs... |
I think my comment above boils down to: I think we need to make nsMessenger::AddMsgUrlToNavigateHistory(message.toTmplData().uri) scriptable. Really. This isn't hard to do. If you want, I could provide guidance on how to make that happen, and I could review your patch on the bugzilla side of things. |
Yes. That would by FAR be the easiest and most correct way to do things I deliberately avoided patching nsMessenger because 1) I was trying to A much cleaner design, probably, might take after HTML5's pushState() On 9/10/2011 9:47 AM, Jonathan Protzenko wrote:
|
Filed: https://bugzilla.mozilla.org/show_bug.cgi?id=686123 On 9/10/2011 9:45 AM, Jonathan Protzenko wrote:
|
Cool. Let me know if you need help for the patch to make the right On Sat 10 Sep 2011 04:56:44 PM CEST, Ben Lerner wrote:
|
I haven't had a chance to work on making the function above scriptable (very busy at school), but maybe there's a shorter-term fix: could you add a hook, in hooks.js, called onMessageExpanded(aMsgHeader, aMessage), that gets called as the last action of Message.prototype.expand? If so, I could implement the hack above as a standalone extension that uses your hooks, until one of us gets TB to make the function above scriptable... Keeps your code clean, and is easy to replace later :) |
Hi, I'm not a conversations/mozilla programmer unforuntately. Jon On Wednesday, January 25, 2012 15:45:27, Ben Lerner wrote:
|
There's a function called onMessageStreamed and another one called On Wed 25 Jan 2012 09:47:27 PM CET, 86smopuiM wrote:
|
In the latest version of Conversations I have (2.2.4), I don't see
If you feel like including this code in future versions of |
Hi Ben, it's awesome you got this to work! Here's some miscellaneous remarks:
I'll try to see how difficult it is to make |
Yep :) I hadn't been using the -master branch because until this hook, This is very much a stopgap measure until nsMessenger::AMUTNH is On 1/26/2012 9:00 AM, Jonathan Protzenko wrote:
|
https://bugzilla.mozilla.org/show_bug.cgi?id=721365 I just compiled Thunderbird with this, and then I'm able to add entries to the back/forward menu properly. There's some extra hacking needed in order to trick Thunderbird into thinking the commands are enabled, but that should be simple enough. |
Also, you still need to monkey-patch isCommandEnabled. Snippet:
You could add this as a separate function in monkeypatch.js; then, you could add the call in message.js, both in onSelected and after the msgLoaded stuff in streamMessage. After that, you could submit a pull request and I'd be happy to integrate the stuff in Conversations. |
I don't have that currently patched, because IIRC, I'd tried that once, On 1/26/2012 9:20 AM, Jonathan Protzenko wrote:
|
Yes, that's a good remark. If there's extra hacking needed on the Thunderbird side, please let me know (e.g. do I need to make more functions scriptable for you to properly detect whether there's anything left in the history ?). |
If I create a build for you that contains my patch, will it help you figure out the remaining parts? |
It might, but at the moment I don't have a dedicated dev box, just my On 1/26/2012 9:31 AM, Jonathan Protzenko wrote:
|
Alright, it's just that it's not super-hard for me to generate a build On Thu 26 Jan 2012 03:49:59 PM CET, Ben Lerner wrote:
|
My only concern is that I'd need a side-by-side installation of two TB On 1/26/2012 9:53 AM, Jonathan Protzenko wrote:
|
https://developer.mozilla.org/en/Setting_up_extension_development_environment On Thu 26 Jan 2012 04:01:09 PM CET, Ben Lerner wrote:
|
Yep, I'm familiar with it. And I have a test profile set up, too. I On 1/26/2012 10:02 AM, Jonathan Protzenko wrote:
|
The windows build will be available from On Thu 26 Jan 2012 04:06:14 PM CET, Ben Lerner wrote:
|
So the test build didn't succeed but hopefully tomorrow's nightly should have the changed baked in. ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-central/ |
Hello |
Here's a summary of the situation.
There's probably quite a few corner cases but I'd certainly be willing to add even an imperfect patch. However, the story remains the same: busy with the PhD and little time / incentive to hack on this particular bug since I'm not using the back/forward feature myself... |
Normally, you can use the back/forward buttons to navigate between previously viewed messages, which is nice if they were way down in the list or in different folders so that you don't have to spend a lot of time finding them repeatedly. They do not work with conversations installed.
The text was updated successfully, but these errors were encountered: