View Single Post
Old 03-28-2010, 01:20 PM   #13
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,773
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@Kovid: I borrowed (and hacked up) SearchBox2 in SearchBox.py, making something equivalent for saved searches. An empty box now displays 'Saved Searches' in grey. When the focus enters the box, it is cleared. When the focus leaves the box, it is reset to help text if the box is empty. Note also that the tooltip follows this text. When 'Saved Searches' is displayed, a general tooltip is provided. When a saved search name is displayed, a tooltip showing the saved search text is provided.

The attachment 6-With copy button.jpg shows what the screen looks like now.

@Starson17:
1. If you press the save search button while the help text is displayed, the box is treated as if it were empty. This preserves the 'save search name == save search value' function.
2. If you select a search, push the copy search button, edit the search, then push save, the new search will be copied over the previous name. The right thing happens if you change the name (the search is saved under the new name). The right thing happens if you clear the name: the search is saved as in #1 above.
3. I didn't implement your third suggestion, because (I think) #1 makes it redundant.

During testing, I discovered that I implemented recursive searches. At the moment, it just takes a while and then stops. I think that I will add a test for this, because there is no case where recursion is useful.

Now to the tags browser part.
Attached Thumbnails
Click image for larger version

Name:	6-With copy button.jpg
Views:	254
Size:	88.6 KB
ID:	48808  
chaley is offline   Reply With Quote