Project

General

Profile

« Previous | Next » 

Revision 328af46c

Added by David Sorber over 7 years ago

Minor but important search usability improvements. Adding case
insensitive searching and removal of previous marks before starting a
new search.

View differences:

software/pwmgr/pwmgr.py
ENC_TMP_FILE_PATH = '/home/dsorber/Documents/chicken_soup.enc.tmp'
KEY_FILE_PATH = '/mnt/pw_ramdisk/.f05d11ef-000c-45c2-ae14-56b56c23e1c5'
VERSION = '0.0.7'
VERSION = '0.0.8'
class SearchDialog(Gtk.Dialog):
......
"""
Close handler
"""
if self.pass_data_loaded:
# Hash the current text to see if any changes have been made
current_hash = self._hash_textview()
......
dialog.destroy()
def search_and_mark(self, text, start):
# Remove existing marks before starting new search
self.textbuffer.remove_all_tags(self.textbuffer.get_start_iter(),
self.textbuffer.get_end_iter())
end = self.textbuffer.get_end_iter()
match = start.forward_search(text, 0, end)
match = start.forward_search(text, Gtk.TextSearchFlags.CASE_INSENSITIVE, end)
if match != None:
match_start, match_end = match

Also available in: Unified diff