I wanted 2 searchs fields (one current, the second optional) in my layout and the ability to mask both search fields. And only one button to switch beetween the three options :
Default : No search field
Clic on button "search" : Search field 1
Clic on button "search" :  Search field 2
Clic on button "search" : No search field
Etc.

Now the tweak :


Window = hidden=SearchBox1|SearchBox2|VBSearch2|VBSearch3
HBSearchButton = VBSearch1 \ #button showed
       VBSearch2 \ #hidden
       VBSearch3 #hidden
VBSearch1 = ToggleButton1(icon=gtk-find,widget=SearchBox1|VBSearch2,togglegroup=1,tip=_"Switch between search fields")
VBSearch2 = ToggleButton2icon=gtk-find,widget=SearchBox2|VBSearch3,togglegroup=1,tip=_"Switch between search fields")
VBSearch3 = ToggleButton3(icon=gtk-find,widget=VBSearch1,togglegroup=1,tip=_"Switch between search fields")


Explanation :
First clic : VBSearch1 (button) hidden, SearchBox1 (search field 1) showed, VBSearch2 (button) showed
Second clic : VBSearch2 (button) hidden, SearchBox1 hidden, SearchBox2 (search field 2) showed, VBSearch3 (button) showed
Third clic : VBsearch3 hidden, SearchBox2 hidden, VBSearch1 showed
Etc.

There is no visible difference beetween the 3 search buttons so it seems there is only one button search to switch beetween SearchBox1/SearchBox2/No SearchBox

I'm proud of this tweak  ;D

You can try with joined layout (Parking3 in progress).