Merge pull request #1303 from auouymous/setting-to-disable-find-as-you-type
Add setting to disable find-as-you-type.
This commit is contained in:
commit
9bdc9d966e
|
@ -287,6 +287,20 @@
|
|||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton_find_as_you_type">
|
||||
<property name="label" translatable="yes">Find as you type</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">general</property>
|
||||
|
|
|
@ -156,6 +156,7 @@ defaults = {
|
|||
'new_episodes': 'show', # ignore, show, queue, download
|
||||
'live_search_delay': 200,
|
||||
'search_always_visible': False,
|
||||
'find_as_you_type': True,
|
||||
|
||||
'podcast_list': {
|
||||
'all_episodes': True,
|
||||
|
|
|
@ -234,6 +234,8 @@ class gPodderPreferences(BuilderWidget):
|
|||
self.checkbutton_show_all_episodes)
|
||||
self._config.connect_gtk_togglebutton('podcast_list_sections',
|
||||
self.checkbutton_podcast_sections)
|
||||
self._config.connect_gtk_togglebutton('ui.gtk.find_as_you_type',
|
||||
self.checkbutton_find_as_you_type)
|
||||
|
||||
self.update_interval_presets = [0, 10, 30, 60, 2 * 60, 6 * 60, 12 * 60]
|
||||
adjustment_update_interval = self.hscale_update_interval.get_adjustment()
|
||||
|
|
|
@ -775,8 +775,9 @@ class gPodder(BuilderWidget, dbus.service.Object):
|
|||
# < 32 to intercept Delete and Tab events
|
||||
if unicode_char_id < 32:
|
||||
return False
|
||||
input_char = chr(unicode_char_id)
|
||||
self._search_podcasts.show_search(input_char)
|
||||
if self.config.ui.gtk.find_as_you_type:
|
||||
input_char = chr(unicode_char_id)
|
||||
self._search_podcasts.show_search(input_char)
|
||||
return True
|
||||
self.treeChannels.connect('key-press-event', on_key_press)
|
||||
|
||||
|
@ -998,8 +999,9 @@ class gPodder(BuilderWidget, dbus.service.Object):
|
|||
# < 32 to intercept Delete and Tab events
|
||||
if unicode_char_id < 32:
|
||||
return False
|
||||
input_char = chr(unicode_char_id)
|
||||
self._search_episodes.show_search(input_char)
|
||||
if self.config.ui.gtk.find_as_you_type:
|
||||
input_char = chr(unicode_char_id)
|
||||
self._search_episodes.show_search(input_char)
|
||||
return True
|
||||
self.treeAvailable.connect('key-press-event', on_key_press)
|
||||
|
||||
|
|
Loading…
Reference in New Issue