Codebase list tilix / acdcf1a
Add version constants gnunn1 6 years ago
2 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
110110
111111 // Constants used to version VTE features
112112 int[2] VTE_VERSION_COPY_AS_HTML = [0, 49];
113 int[2] VTE_VERSION_HYPERLINK = [0, 49];
114 int[2] VTE_VERSION_REGEX = [0, 46];
113115
114116 // Constants used for the various variables permitted when defining
115117 // the terminal title.
877877 vte.setVexpand(true);
878878 //Search Properties
879879 vte.searchSetWrapAround(gsSettings.getValue(SETTINGS_SEARCH_DEFAULT_WRAP_AROUND).getBoolean());
880 if (checkVTEVersionNumber(0, 49)) {
880 if (checkVTEVersionNumber(VTE_VERSION_HYPERLINK[0], VTE_VERSION_HYPERLINK[1])) {
881881 vte.setAllowHyperlink(true);
882 trace("Custom hyperlinks enabled for VTE 0.49");
883882 }
884883 //URL Regex Experessions
885884 try {
886 if (checkVTEVersionNumber(0, 46)) {
885 if (checkVTEVersionNumber(VTE_VERSION_REGEX[0], VTE_VERSION_REGEX[1])) {
887886 foreach (i, regex; compiledVRegex) {
888887 int id = vte.matchAddRegex(cast(VRegex) regex, 0);
889888 regexTag[id] = URL_REGEX_PATTERNS[i];
17351734 }
17361735
17371736 public void checkHyperlinkMatch(Event event) {
1738 if (!checkVTEVersionNumber(0, 49)) return;
1737 if (!checkVTEVersionNumber(VTE_VERSION_HYPERLINK[0], VTE_VERSION_HYPERLINK[1])) return;
17391738 string uri = vte.hyperlinkCheckEvent(event);
17401739 if (uri.length == 0) return;
17411740 match.match = uri;
24012400 }
24022401 TerminalRegex regex = TerminalRegex(value[0], TerminalURLFlavor.CUSTOM, caseInsensitive, value[1]);
24032402 try {
2404 if (checkVTEVersionNumber(0, 46)) {
2403 if (checkVTEVersionNumber(VTE_VERSION_REGEX[0], VTE_VERSION_REGEX[1])) {
24052404 VRegex compiledRegex = compileVRegex(regex);
24062405 if (compiledRegex !is null) {
24072406 int id = vte.matchAddRegex(compiledRegex, 0);