diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 41bc64db..d68605f6 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -2,7 +2,8 @@ Before opening a new issue, please read the following: - for **feature requests**, please use [FeatHub](https://feathub.com/Guake/guake). This allow us to spot directly which are the most requested features. -- before opening **a new bug**, please search for a similar one in the GitHub issue. +- before opening **a new bug**, please search for a similar one in the + [GitHub issue](https://github.com/Guake/guake/issues). - to **report a bug**, please give the following information: - **Guake Version**: see in about box. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index df578b9b..fba6146c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,7 +10,7 @@ Please follow these steps before submitting a new Pull Request to Guake: - execute the code styling, checks and unit tests using: ```bash - $ make style check test + $ make style check reno-lint test ``` - add a slug in release note using: @@ -18,8 +18,9 @@ Please follow these steps before submitting a new Pull Request to Guake: ```bash $ make reno SLUG= ``` + and edit the created file in `releasenotes/notes/`. You can see how `reno` works using `pipenv run reno --help`. - Please use a generic slug (for translation update, use `translation`) + Please use a generic slug (eg, for translation update, use `translation`) diff --git a/.travis.yml b/.travis.yml index 956fd113..e3518562 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ python: install: + # https://docs.openstack.org/reno/latest/user/usage.html#within-travis-ci + - git fetch --unshallow --tags - sudo ./bootstrap-dev-debian.sh - ./bootstrap-dev-pip.sh system diff --git a/guake/terminal.py b/guake/terminal.py index 07adc7ad..aec50005 100644 --- a/guake/terminal.py +++ b/guake/terminal.py @@ -176,13 +176,28 @@ class GuakeTerminal(Vte.Terminal): tag = self.match_add_regex(Vte.Regex.new_for_match(match, 0, 0), 0) self.match_set_cursor_type(tag, Gdk.CursorType.HAND2) except GLib.Error as e: - g_pcre2_enabled = False - log.error( - "ERROR: PCRE2 does not seems to be enabled on your system. " - "Quick Edit and other Ctrl+click features are disabled. " - "Please update your VTE package or contact your distribution to ask " - "to enable regular expression support in VTE. Exception: '%s'", str(e) - ) + log.info("PCRE2 disabled on your current VTE, fallback with glib regex") + try: + compile_flag = 0 + if (Vte.MAJOR_VERSION, Vte.MINOR_VERSION) >= (0, 44): + compile_flag = GLib.RegexCompileFlags.MULTILINE + for expr in TERMINAL_MATCH_EXPRS: + # TODO PORT next line throws a Vte-WARNIN but works: runtime check failed + tag = self.match_add_gregex(GLib.Regex.new(expr, compile_flag, 0), 0) + self.match_set_cursor_type(tag, Gdk.CursorType.HAND2) + + for _useless, match, _otheruseless in QUICK_OPEN_MATCHERS: + # TODO PORT next line throws a Vte-WARNIN but works: runtime check failed + tag = self.match_add_gregex(GLib.Regex.new(match, compile_flag, 0), 0) + self.match_set_cursor_type(tag, Gdk.CursorType.HAND2) + except GLib.Error as e: + g_pcre2_enabled = False + log.error( + "ERROR: PCRE2 does not seems to be enabled on your system. " + "Quick Edit and other Ctrl+click features are disabled. " + "Please update your VTE package or contact your distribution to ask " + "to enable regular expression support in VTE. Exception: '%s'", str(e) + ) def get_current_directory(self): directory = os.path.expanduser('~') @@ -284,7 +299,7 @@ class GuakeTerminal(Vte.Terminal): g = re.compile(extractor).match(value) if g and g.groups(): filename = g.group(1).strip() - (fp, _, _) = self.is_file_on_local_server(filename) + (filepath, _, _) = self.is_file_on_local_server(filename) line_number = g.group(2) if line_number is None: line_number = "1" diff --git a/releasenotes/notes/quick_open-bb22f82761ad564b.yaml b/releasenotes/notes/quick_open-bb22f82761ad564b.yaml index ec52e4cf..0af43146 100644 --- a/releasenotes/notes/quick_open-bb22f82761ad564b.yaml +++ b/releasenotes/notes/quick_open-bb22f82761ad564b.yaml @@ -3,9 +3,11 @@ fixes: Fix several issues on Quick Edit: - quick open freezes guake - - support system with PCRE2 (regular expression in terminal) disabled, like Ubuntu 17.10. - This disables quick open and open url on direct Ctrl+click. User can still select the wanted - url or text and Cltr+click or use contextual menu. + - support for systems with PCRE2 (regular expression in terminal) disabled for VTE, like + Ubuntu 17.10 and +. + + This might disable quick open and open url on direct Ctrl+click. + User can still select the wanted url or text and Cltr+click or use contextual menu. See this `discussion on Tilix `_, another Terminal emulator that suffurs the same issue.