6

When I open the "customize" menu in Thunderbird, I can add or remove the items from the toolbar. This way, I can reorder the buttons "write", "reply", "reply all", or remove them altogether.

The Quick Filter Toolbar cannot be moved like this.

There used to be an addon called quickfiltertoolbar, which made it possible to move the Quick Filter Toolbar around, same as other items.

I have made a screenshot to illustrate what I mean:

enter image description here

By default, the Quick Filter Toolbar occupies its own panel, under the main panel. What the addon allowed, was to move the items up to the main panel (purple on my screenshot) and move the various associated buttons as well (attachements, ...)

This way I could save space, and I did not need a separate panel for Quick Filter Toolbar.

Unfortunately, this great addon no longer works with current Thunderbird 68.8.

I am looking for a way to achive the same, by perhaps using userChrome.css, or if not possible by editing the files omni.ja.

I have shown on my screenshot what I am trying to achieve.

First, remove the stupid useless buttons from the Quick Filter Toolbar: "Unread", "Starred", "Contact", "Tags".

And then, move the rest up (the pin icon, attachements, and the search field.

Lastly, get rid of the now-empty panel

Can this be achieved ?

  • @tukan - I have started another Thunderbird bounty, in case you are interested. – 400 the Cat May 25 at 8:41
  • When I'll be released from kindergarden (my kids), I'll check it out if I can something about it. – tukan May 25 at 9:43
  • What is this? It looks so different! Is this Windows? Ubuntu? – WGRM May 25 at 14:37
  • @intika - I hope you can find a solution. This has been bothering me for a long time. – 400 the Cat May 26 at 3:43
  • I have found a solution, but it is rather complex so it will take me time to write about it and organized it. – tukan May 26 at 14:15
4
+1000

Edited: adding patch script

The solution is based on the Thunderbird source code. I have applied these changes for Thunderbird 68.8.0 (package at Opensuse 68.8.0-1.1 | x86_64) .

You need to unpack the omni.ja edit/replace the files the way I have indicated and pack omni.ja back again (the same way the path script does).

First what you need to patch is messenger.xul file:

diff -r chrome\messenger\content\messenger\messenger.xul chrome\messenger\content\messenger\messenger.xul
4798,4824d4797
<     <toolbarbutton id="qfb-sticky" type="checkbox"
<                    class="toolbarbutton-1" orient="horizontal"
<                    crop="none" minwidth="16"
<                    tooltiptext="&quickFilterBar.sticky.tooltip;"/>
<     <label id="qfb-results-label"
<            minwidth="&quickFilterBar.resultsLabel.minWidth;"
<            value=""
<            somefmtstring="&quickFilterBar.resultsLabel.some.formatString;"
<            noresultsstring="&quickFilterBar.resultsLabel.none;"/>
<     <textbox is="search-textbox" id="qfb-qs-textbox"
<              align="center"
<              flex="3"
<              class="searchBox"
<              placeholder=""
<              emptytextbase="&quickFilterBar.textbox.emptyText.base1;"
<              keyLabelNonMac="&quickFilterBar.textbox.emptyText.keyLabel2.nonmac;"
<              keyLabelMac="&quickFilterBar.textbox.emptyText.keyLabel2.mac;"
<              timeout="500"
<              maxlength="100"
<              width="170"
<              minwidth="160">
<     </textbox>
<     <toolbarbutton id="qfb-attachment" type="checkbox"
<                    class="toolbarbutton-1" orient="horizontal"
<                    crop="none" minwidth="16"
<                    label="&quickFilterBar.attachment.label;"
<                    tooltiptext="&quickFilterBar.attachment.tooltip;"/>
4967a4941
> 
4975c4949
<            defaultset="button-getmsg,button-newmsg,button-chat,button-address,separator,button-tag,separator,qfb-sticky,qfb-results-label,qfb-qs-textbox,qfb-attachment,qfb-show-filter-bar,spring,gloda-search,button-appmenu">
---
>            defaultset="button-getmsg,button-newmsg,button-chat,button-address,separator,button-tag,qfb-show-filter-bar,spring,gloda-search,button-appmenu">
5067c5041,5042
<     <vbox id="quick-filter-bar" hidden="true">
---
> 
>     <vbox id="quick-filter-bar">
5076d5050
<                        hidden="true"
5082c5056
<           <toolbarseparator/>
---
>           <toolbarseparator id="qfb-separator"/>
5085,5086c5059
<                          hidden="true"
<                          align="center"
---
>                          crop="none" minwidth="16"
5090c5063
<            <toolbarbutton id="qfb-starred" type="checkbox"
---
>           <toolbarbutton id="qfb-starred" type="checkbox"
5092d5064
<                          hidden="true"
5099d5070
<                          hidden="true"
5106d5076
<                          hidden="true"
5113d5082
<                          hidden="true"
5122d5090
<                hidden="true"
5129d5096
<                  hidden="true"

Notice here the move of the whole section to the mail toolbar section. Also I have adjusted the values so the search bar is smaller. Notice that you can simply hide the quickFilterBar item by adding hidden="true" to the section. I have added the the hidden tak also to the whole quickFilterBar vbox as you wished.

Next you need to patch messageWindow.xul:

diff -r chrome\messenger\content\messenger\messageWindow.xul chrome\messenger\content\messenger\messageWindow.xul
4531c4531
<            defaultset="button-getmsg,button-newmsg,button-chat,button-address,separator,button-tag,separator,qfb-sticky,qfb-results-label,qfb-qs-textbox,qfb-attachment,qfb-show-filter-bar,spring,gloda-search,button-appmenu">
---
>            defaultset="button-getmsg,button-newmsg,button-chat,button-address,separator,button-tag,qfb-show-filter-bar,spring,gloda-search,button-appmenu">

Here you want to remain consisten on the messageWindow too.

Next you need to patch primaryToolbar.css:

diff -r chrome\classic\skin\classic\messenger\primaryToolbar.css chrome\classic\skin\classic\messenger\primaryToolbar.css
479,504d478
< #qfb-sticky {
<   list-style-image: url("chrome://messenger/skin/icons/sticky.svg");
< }
< 
< /*
<  * The coloring based on the matches of the filter is defined at quickFilterBar.js.
<  * It would have to be ported to work within the mail toolbar.
<  *
<  * #qfb-results-label {
<  * color: #4e9a06; // was GrayText
<  * text-align: end;
<  * visibility: hidden;
<  * }
<  * 
<  * #quick-filter-bar[filterActive="matches"] #qfb-results-label {
<  * color: #4e9a06;
<  * }
<  *
<  * #quick-filter-bar[filterActive="nomatches"] #qfb-results-label {
<  * color: #f66;
<  * }
< */
< #qfb-attachment {
<   list-style-image: url("chrome://messenger/skin/icons/attach.svg");
< }
< 

Adding the the images to primaryToolbar.css and also the reference what to do if you want to have different coloring when using the filters.

Last but not the least quickFilterBar.css:

diff -r chrome\messenger\content\messenger\quickFilterBar.css chrome\messenger\content\messenger\quickFilterBar.css
42c42
<   color: #fff200;  /* was GrayText */
---
>   color: GrayText;

The last patching is needed in order for the results to get one nice (yellow) color. The toolbar was able to differentiate if result was found - green color and not found red. This solution show only one color yellow for both branches. You would need to migrate the code from the quickFilterBar.js which could prove to be tricky.

Note: Please don't forget to delete your profile(s) when applying the changes.

After the changes it looks like this

Quick Filter Toolbar moved to the main panel

A patch for linux

As promised I'm now adding a direct patch file for the changes (Using sed (GNU sed) 4.8): Thunderbird quick filter widgets move to main toolbar - patch. This patch patches the move only (not including the previous patches).

Edit2:

If you need for the quick filter search buttons (Sender, Recipients, Subject, Body) to appear you need to comment out this sed:

# hiding the whole box
sed -E -i -e 's:(\s*<\w+\s\w+="quick-filter-bar")(>):\1 hidden="true"\2:' chrome/messenger/content/messenger/messenger.xul

After commenting out, you need to active quick search toolbar again. This will show a black line, the quick search toolbar itself without buttons. The filter buttons (Sender, Recipients, Subject, Body) will then appear when a filter string is entered.

| improve this answer | |
  • thank you. But I am having difficulties patching the 4 files. Looks like you are using windows, and the files here have slight differences. Also, I have custom modifications in messenger.xul and messageWindow.xul from my previous bounty. So I cannot simply copy your files. I have uploaded my files here: www37.zippyshare.com/v/fHVREc2N/file.html – 400 the Cat May 27 at 5:00
  • @400theCat I have now added a direct patch file with which you can patch your omni.ja file directly. Some of the sed (check the version) were tricky, but I have now tested it and it works as it should. Yes, the original files posted were for windows. I want to have patched both versions. – tukan May 27 at 14:21
  • your script seems to work nicely, it patches the files successfully. But when I then start Thunderbird with the new omni.ja, the changes don't look as expected. The Quick Filter Toolbar disappeared completely, but neither quick filter , nor the pin and attachment appear on the main panel. So basically same as if I simply removed Quick Filter Toolbar altogether. You can try running the sed command on the files I have uploaded above (pre-script). Or I can upload the files after I ran your script. Sorry for the trouble. I see you have put a lot of work into this. – 400 the Cat May 28 at 4:25
  • oh, and I assume by Please don't forget to delete your profile(s) when applying the changes, you meant delete my ~/.cache/thunderbird/<profile>/, not the actual profile in ~/.thunderbird/<profile>/. – 400 the Cat May 28 at 4:28
  • 1
    Who is downvoting? I can vouch for the solution. I spent 1000 bounty, accepted the answer, and I am happy with the result. – 400 the Cat Jul 7 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.