Recent commits allowed multi-line input while reusing the QInputDialog
object already defined by Kristall. However, QInputDialog lacks a way to
access its QPlainTextEdit directly, and therefore set the wrap mode.
Since QInputDialog does no wrapping, it is inconvenient for writing a
long text (think of social media sites such as BBS or Station).
Therefore, a custom QDialog-derived class, namely QueryDialog, has been
provided.
This would allow smaller screens (think of mobile devices such as the
PinePhone or Librem 5) to be able to fit the settings dialog, and
therefore use it.
Paths in Gophermaps that start with “URL:” should be interpreted as direct
URLs, rather than references to files or directories on the Gopher server
itself.
An excerpt from the standard document:
```
Links to URLs from a gopher directory shall be defined as follows:
Type -- the appropriate character corresponding to the type of the
document on the remote end; h if HTML.
Path -- the full URL, preceeded by "URL:". For instance:
URL:http://www.complete.org/
Host, Port -- pointing back to the gopher server that provided
the directory for compatibility reasons.
Name -- as usual for a Gopher directory entry.
```
Source: gopher://quux.org/0/Archives/Mailing Lists/gopher/gopher.2002-02?/MBOX-MESSAGE/34
An example of this in the wild can be seen at gopher://gopher.floodgap.com ,
at the bottom of the page.
Note that above link carries a fallback for clients that do not support it,
as described by the Bucktooth server software:
```
[...] most people will want to add web links to their
gophers anyway. In 0.1-pr4 and up, this is supported in a protocol independent
fashion; simply specify any URL and an 'h' item type, like so:
hYour Web Link<TAB>URL:http://www.floodgap.com/
Note that the URL must be preceded by a literal "URL:" and that the itemtype
is h. Smart clients will automatically take the URL portion and use it, but
even if they do not, Bucktooth will generate an HTML page with a Refresh:
header and forward them on automatically.
```
Other clients supporting this standard include the OverbiteWX extension.
(Most likely, there will be others, but I haven’t tested them all.)
printf is recommended instead of echo because it has a more predictable
behavior than echo (tip from the POSIX standard ;-). Using it allow us
to generate the _same_ manpage using sh, dash or bash.
sh and, consequently, dash interpret some escaped characters as control
sequences, so an echo '\f' outputs a form feed. To avoid this problem
in manpage generation, we have to escape "\f" sequences.
This change allows the user to start scrolling with the keyboard instantly,
without having to focus the browsing area first, after a page has loaded.
This happens for example when opening a new tab, and when entering an
address manually.
If text is selected, middle-click will not be forwarded to the function
that opens the link in a new tab. So this change will deselect any
selected text before trying to open a new tab.
Fixes#253
Only call setPosition() on the QMediaPlayer object when the user has manually
dragged the slider position slider.
Otherwise the slider and player will call each other, probably causing a
feedback loop which causes stuttering.
usage of the "-i" feature of sed is not entirely portable across
different operating systems. -i has an optional extension to save
a backup of the edited file, and different systems parse this option
in a different manner.
the sed in GNU, busybox, NetBSD, and OpenBSD expects the argument
to be immediately after, like `-i.bak`, if it is present.
the sed in macOS and FreeBSD expects the argument to follow after
a space, like `-i .bak`, but will accept the `-i.bak` form as well.
the issue is that when no backup is specified, the first requires
just `-i`, where the second requires `-i ''`. the easiest way around
this is to just add a backup, which is what i chose to do here. i
also added the .bak extension to the .gitignore.
additionally, all aforementioned seds except for GNU require the file
to be the final argument, and will not accept it between other options.
the + and - syntax on head and tail are only present, as far as i know,
in GNU coreutils, and are not present on any other UNIX or BSD systems.
this patch replaces those with a more portable processing chain, which
is tested to work on GNU coreutils, NetBSD, macOS, and busybox.
Homebrew installs to a different directory on macOS/arm64.
this adds checks in the Makefile and in kristall.pro, and sets
the correct paths to Homebrew depending on whether the build is
targeting arm64 or not.