Skip to content

Commit

Permalink
Add toggle for enabling/disabling autocomplete (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Apr 1, 2024
1 parent a752c4b commit 363c406
Show file tree
Hide file tree
Showing 21 changed files with 1,175 additions and 882 deletions.
5 changes: 5 additions & 0 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 4.20

- **NEW**: Add new autocomplete setting to disable/enable autocomplete. Mainly for Linux systems where autocomplete
functionality can sometimes work well or not so well depending on the distro.

## 4.19

- **NEW**: Drop support for Python 3.7.
Expand Down
Binary file modified docs/src/markdown/images/settings_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 15 additions & 3 deletions docs/src/markdown/preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Language
- Rummage has internal support to display dialog labels in different languages. Currently Rummage has English. Russian
is outdated but includes a fair bit of the needed translations. See [Localization](./extras.md#localization) to
learn more about improving current translations or adding additional translations.
///

Updates

Expand All @@ -34,7 +33,7 @@ Updates
The check is only a check for new versions and doesn't perform an upgrade. Rummage must be upgraded via `pip` from
command line.

/// info | Update Issues: Python 3.6+ on macOS
//// info | Update Issues: Python 3.6+ on macOS
There is a small issue on macOS with Python 3.6+: Python 3.6 changed how it gets the default certificates
required to properly check URLs. The details are actually documented here: https://bugs.python.org/issue28150#msg276516.

Expand All @@ -44,13 +43,26 @@ Updates
will use `pip` to install `certifi` and creates a symlink in the OpenSSL directory to `certifi`'s installed
bundle location. If you are using something like macports, then you'll probably have to research to find out how
to do the same thing.
///
////

International Time

- Rummage displays file creation and modified time in the form `Jul 01, 2018, 03:00:00 AM`, but you can enable this
option to display the times in international format: `2018-07-01 03:00:00`.

Alternate Row Colors

- In search results, Rummage can show alternating colors for each row. This can be enabled/disabled.

Autocomplete

- For certain text boxes that retain a history of previous inputs, Rummage will employ an autocomplete feature.
Unfortunately, in some Linux distros, this autocomplete doesn't work quite right. Autocomplete can be
enabled/disabled for those who are having trouble with the feature.

///


## Search

![Preferences: Search](images/settings_search.png)
Expand Down
123 changes: 123 additions & 0 deletions gui.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -7615,6 +7615,129 @@
<event name="OnCheckBox">on_alt_row_toggle</event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline15</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Enable autocomplete</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_autocomplete_checkbox</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnCheckBox">on_autocomplete_toggle</event>
</object>
</object>
</object>
</object>
</object>
Expand Down
2 changes: 1 addition & 1 deletion rummage/lib/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def parse_version(ver):


# (major, minor, micro, release type, pre-release build, post-release build, development-release)
__version_info__ = Version(4, 19, 0, 'final')
__version_info__ = Version(4, 20, 0, 'final')
__version__ = __version_info__._get_canonical()
__app__ = "Rummage"
__status__ = __version_info__[3]
Expand Down
10 changes: 10 additions & 0 deletions rummage/lib/gui/controls/autocomplete_combo.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def __init__(self, parent, wx_id, choices=None, load_last=False, changed_callbac
choices = []

self.focusing = False
self.enable_autocomplete = True

wx.ComboCtrl.__init__(
self, parent, wx_id,
Expand Down Expand Up @@ -59,6 +60,11 @@ def __init__(self, parent, wx_id, choices=None, load_last=False, changed_callbac
# Add choices
self.update_choices(choices, load_last)

def set_autocomplete(self, option):
"""Set autocomplete."""

self.enable_autocomplete = option

def set_changed_callback(self, callback):
"""Set changed callback."""

Expand Down Expand Up @@ -200,6 +206,10 @@ def on_key_down(self, event):
def on_text_change(self, event):
"""Autocomplete on text change event."""

if not self.enable_autocomplete:
event.Skip()
return

found = False
if not self.update_semaphore:
tc = self.GetTextCtrl()
Expand Down
2 changes: 1 addition & 1 deletion rummage/lib/gui/data/docs/.dochash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01d5f62e2ad9980caa0ef1549633e71c
80ff7fa784847671e760dfc915724ae1
5 changes: 5 additions & 0 deletions rummage/lib/gui/data/docs/about/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@

<!-- Table of Content (Don't show for static sites) -->
<h1 id="changelog">Changelog</h1>
<h2 id="420">4.20</h2>
<ul>
<li><strong>NEW</strong>: Add new autocomplete setting to disable/enable autocomplete. Mainly for Linux systems where autocomplete
functionality can sometimes work well or not so well depending on the distro.</li>
</ul>
<h2 id="419">4.19</h2>
<ul>
<li><strong>NEW</strong>: Drop support for Python 3.7.</li>
Expand Down
2 changes: 1 addition & 1 deletion rummage/lib/gui/data/docs/about/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<ul class="__toc_list_3">

</ul>
<li class="__toc_level_3"><a href="#become-a-sponsor">Become a Sponsor </a></li>
<li class="__toc_level_3"><a href="#become-a-sponsor">Become a Sponsor</a></li>
<ul class="__toc_list_3">

</ul>
Expand Down
Binary file modified rummage/lib/gui/data/docs/images/settings_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions rummage/lib/gui/data/docs/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</div>
<h1 id="settings">Settings</h1>
<h2 id="overview">Overview</h2>
<p>The <strong>Preference</strong> dialog is found in the menu at <strong>File&rarr;Preferences</strong> and contains all of the global options that can
<p>The <strong>Preference</strong> dialog is found in the menu at <strong>File&ndash;&gt;Preferences</strong> and contains all of the global options that can
be configured.</p>
<h2 id="general">General</h2>
<p><img alt="Preferences: General" src="images/settings_general.png" /></p>
Expand All @@ -90,10 +90,8 @@ <h2 id="general">General</h2>
<dd>Rummage has internal support to display dialog labels in different languages. Currently Rummage has English. Russian
is outdated but includes a fair bit of the needed translations. See <a href="extras.html#localization">Localization</a> to
learn more about improving current translations or adding additional translations.</dd>
</dl>
<p>Updates</p>
<ul>
<li>
<dt>Updates</dt>
<dd>
<p>Controls whether Rummage will check for new updates daily and allows controlling whether you want to be notified of
prereleases as well. A button has also been provided to check for updates right away after configuring your update
settings.</p>
Expand All @@ -110,13 +108,17 @@ <h2 id="general">General</h2>
bundle location. If you are using something like macports, then you'll probably have to research to find out how
to do the same thing.</p>
</div>
</li>
</ul>
<p>International Time</p>
<ul>
<li>Rummage displays file creation and modified time in the form <code>Jul 01, 2018, 03:00:00 AM</code>, but you can enable this
option to display the times in international format: <code>2018-07-01 03:00:00</code>.</li>
</ul>
</dd>
<dt>International Time</dt>
<dd>Rummage displays file creation and modified time in the form <code>Jul 01, 2018, 03:00:00 AM</code>, but you can enable this
option to display the times in international format: <code>2018-07-01 03:00:00</code>.</dd>
<dt>Alternate Row Colors</dt>
<dd>In search results, Rummage can show alternating colors for each row. This can be enabled/disabled.</dd>
<dt>Autocomplete</dt>
<dd>For certain text boxes that retain a history of previous inputs, Rummage will employ an autocomplete feature.
Unfortunately, in some Linux distros, this autocomplete doesn't work quite right. Autocomplete can be
enabled/disabled for those who are having trouble with the feature.</dd>
</dl>
<h2 id="search">Search</h2>
<p><img alt="Preferences: Search" src="images/settings_search.png" /></p>
<p>The <strong>Regular Expression</strong> panel is where the desired regular expression engine that Rummage uses can be selected and
Expand Down
Loading

0 comments on commit 363c406

Please sign in to comment.