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.)
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.
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.
When lazy-loaded links were making a new tab, they wasn't calling
tab->navigateTo(url, BrowserTab::PushImmediate). What's important is only
it can push urls to the history and making a new function just for that
seemed like it'd just complicate things.
So I've changed it to call tab->navigateTo() on every loading type.
Unfortunately, that fixed our issue partly.
Sure, links are now put into the history, but lazy-loaded tabs stopped
being lazy-loaded anymore. Moreover, they were also reloading a page on first
tab switch.
So I've made also a check that stops requesting lazy-loaded urls,
which made lazy-loading work as intended again, and moved the unsetting
lazy-loaded boolean on reload instead of right after it to be able to request
the file, which finally...
Closes: #214
Before this change, only the first user who had opened kristall had working ipc.
The easiest fix was to prepend an username to the socket
and that's exactly what it does on Windows.
On Linux and other UNIX systems, we could do that too, but I came up with a bit
different approach. I didn't like the fact that Qt puts sockets in /tmp,
but luckily we can provide the full path for the socket (Windows uses pipes,
so that's why it has its own case). I've changed it to put sockets in
the runtime directory, because it's designed for that type of files
and it's user-specific, so we don't even have to prepend the username to it.
We don't need to wrap tr() with QString, because it returns QString anyway.
Although it doesn't change the binary size (mostly because compilers were
smart to remove that already), it helps to make the code a little bit cleaner.
It's a somewhat continuation of c740189bca,
but I thought back then it happened only there, so now I've removed it from
all places.