Changes

Jump to: navigation, search

Community:SummerOfCode12:Brainstorming

40 bytes added, 14:46, 5 March 2012
m
Added <pre> to code with appropriate width so that table layout doesn't break
|One way to move the compose window into a tab is to load the compose window document into a XUL iframe (which is like an HTML iframe, except it hosts XUL). To test this out, install the [https://addons.mozilla.org/en-US/firefox/addon/extension-developer/ Developer Assistant] extension for Thunderbird, then go to Tools -> Extension Developer -> JavaScript Shell and run the following code:
<pre width=70>enumerateWindows();
Shell.enumWins[0].document.getElementById("tabmail").openTab(
"chromeTab", {chromePage: "chrome://messenger/content/messengercompose/messengercompose.xul"});</pre>
Then try playing around with it, sending a message, etc. As you can see, the basic concept works, but there are currently issues with the UI. Your job will be to sort them out, make everything work properly, and ship your code as part of Thunderbird.
Easier way: Tools -> Error console, then
<pre width=70>top.opener.openTab("chromeTab", {chromePage: "chrome://messenger/content/messengercompose/messengercompose.xul"});</pre>
Level of difficulty: hard. Will require writing XUL (menus will probably need to be moved out into an [https://developer.mozilla.org/en/XUL_Overlays overlay]), JavaScript (passing [https://developer.mozilla.org/en/XUL_Tutorial/Commands menu commands] down to the child iframe) and CSS (to fix theming issues) and writing unit tests to ensure that things work as expected. Since Mac OS X has a global menu, getting it right might require more work. ''You will need access to a Mac for your proposal to be accepted.''.
3
edits

Navigation menu