Merge pull request #249 from yoavp77/persist-search-case-sensitivity
Preserve searchbar case sensitivity state in config file on state change
This commit is contained in:
commit
eef917b5ce
@ -122,6 +122,7 @@ DEFAULTS = {
|
||||
'putty_paste_style_source_clipboard': False,
|
||||
'smart_copy' : True,
|
||||
'line_height' : 1.0,
|
||||
'case_sensitive' : True,
|
||||
},
|
||||
'keybindings': {
|
||||
'zoom_in' : '<Control>plus',
|
||||
|
@ -85,7 +85,7 @@ class Searchbar(Gtk.HBox):
|
||||
self.match_case = Gtk.CheckButton.new_with_label('Match Case')
|
||||
self.match_case.show()
|
||||
self.match_case.set_sensitive(True)
|
||||
self.match_case.set_active(True)
|
||||
self.match_case.set_active(self.config.base.get_item('case_sensitive'))
|
||||
self.match_case.connect('toggled', self.match_case_toggled)
|
||||
|
||||
# Wrap checkbox
|
||||
@ -132,6 +132,8 @@ class Searchbar(Gtk.HBox):
|
||||
self.regex_flags_pcre2 = regex.FLAGS_PCRE2
|
||||
self.regex_flags_glib = regex.FLAGS_GLIB
|
||||
|
||||
self.config.base.set_item('case_sensitive', toggled_state)
|
||||
self.config.save()
|
||||
self.do_search(self.entry) # Start a new search everytime the check box is toggled.
|
||||
|
||||
def get_vte(self):
|
||||
|
Loading…
Reference in New Issue
Block a user