Presently, in Thunderbird, the toolbar only has buttons, toolbarspacers, toolbarsprings and a searchbar. Just like Firefox, I decided to add a splitter to the toolbar, but nothing happened. So, I looked back at Firefox, and realized that the urlbar and the splitter had certain attributes (resizebefore, resizeafter, and flex). I add these attributes to my splitter and its sibling element before, a toolbarspring (so my toolbarspring is used instead of the urlbar, which is a textbox) and it successfully works.
Having accomplished that, I do not know what to do after, so I speak with Bryan and he points me onto another obstable: creating a function that will update my splitter. Basically, this is to ensure that the splitter is always there (so that the user can always play with the width of his search bar). Luckily, in Firefox, there is a function, UpdateUrlbarSearchSplitterState(), which I simply modified and used. One thing that I learned, though, is that Thunderbird has many files from Firefox that, I guess, do not get used. So, when I modified the Thunderbird's UpdateUrlbarSearchSplitterState(), it did not do anything. I was stuck for awhile... but then I thought back at what Bryan said, and made my own function, UpdateSpringSearchSplitter(), in two other files. I guess, these two files in Thunderbird perform functions similar to the one file in Firefox. For now, this function gets called when the user finishes customizing his toolbar (by clicking the "Done" button on the Customize window).
My function, UpdateSpringSearchSplitter(), checks if the toolbar has a toolbarspring, a splitter, and a textbox (for the searchbar). If there is toolbarspring and a textbox, it will create a splitter, but if either, the toolbarspring or the textbox, is missing, then it will remove a splitter. This might be confusing, because it is for me, and also it is part of my problem which I am having right now.
Hopefully, I can solve this by tomorrow, since the first release is due this week...


No comments:
Post a Comment