Skip to content

Commit

Permalink
feat: Remove underlines from quick-open targets when quick-open disabled
Browse files Browse the repository at this point in the history
Fixes #2225
  • Loading branch information
chrhansk authored and Davidy22 committed May 31, 2024
1 parent 0a99c9c commit bb76160
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/source/contributing/hacking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ building the distribution packages.

Same goes for the `ChangeLog` file.

Versionning
Versioning
-----------

Versioning is automatically done using git tags. When a semver tag is pushed, a new version
Expand Down
21 changes: 13 additions & 8 deletions guake/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ def __init__(self, guake):
super().__init__()
self.guake = guake
self.configure_terminal()
self.add_matches()

if self.guake.settings.general.get_boolean("quick-open-enable"):
self.add_matches()

self.handler_ids = []
self.handler_ids.append(self.connect("button-press-event", self.button_press))
self.connect("child-exited", self.on_child_exited) # Call on_child_exited, don't remove it
Expand Down Expand Up @@ -347,13 +350,15 @@ def button_press(self, terminal, event):
handle the matched resource uri.
"""
self.matched_value = ""
if (Vte.MAJOR_VERSION, Vte.MINOR_VERSION) >= (0, 46):
matched_string = self.match_check_event(event)
else:
matched_string = self.match_check(
int(event.x / self.get_char_width()),
int(event.y / self.get_char_height()),
)

if self.guake.settings.general.get_boolean("quick-open-enable"):
if (Vte.MAJOR_VERSION, Vte.MINOR_VERSION) >= (0, 46):
matched_string = self.match_check_event(event)
else:
matched_string = self.match_check(
int(event.x / self.get_char_width()),
int(event.y / self.get_char_height()),
)

self.found_link = None

Expand Down
2 changes: 2 additions & 0 deletions releasenotes/notes/disable-underline-8848025f0ec292d4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
release_summary: >
Added code to remove underlines from quick-open targets when quick-open disabled

0 comments on commit bb76160

Please sign in to comment.