Commit Graph

577 Commits

Author SHA1 Message Date
Felix Queißner ce5a263f26
Adds qttools5-dev-tools to Ubuntu dependencies 2021-05-08 10:42:36 +02:00
Felix Queißner ad5683a135
Adds qt5-linguist as a Fedora dependency 2021-05-08 10:40:37 +02:00
Mike Skec b802f19599 Fix for #233 2021-05-02 10:17:17 +02:00
Karol Kosek 86959d55a0 BrowserTab: accept file drops 2021-04-21 22:07:17 +02:00
Karol Kosek 0e3d0b1a5e Push lazy-loaded links to the history
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
2021-04-18 21:06:18 +02:00
Karol Kosek 2f74b60d06 main.cpp: support sessions when multiple users have opened Kristall
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.
2021-04-17 08:36:10 +02:00
Karol Kosek 9ecc88dda3 Unwarp tr() from QStrings
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.
2021-04-16 10:27:47 +02:00
Karol Kosek 399a69c4a0 .gitattributes: fix GitHub language graph
This excludes third-party libraries from GitHub language detection,
so the project will be correctly labeled -- as C++ instead of C.

This also adds man-page generation scripts to the graph, since GitHub
automatically marks the doc/ folder as documentation, making them
not visible in the graph.

https://github.com/github/linguist/blob/master/docs/overrides.md

[skip ci]
2021-04-16 10:24:32 +02:00
Karol Kosek 9c883b55d4 BrowserTab: reset image scaling for small images
When you viewed a small image after the bigger one in the same tab, then
the graphics_browser was still trying to scale them to the window size.
2021-04-11 21:18:27 +02:00
Karol Kosek c740189bca BrowserTab: drop QString 2021-04-11 21:18:11 +02:00
Karol Kosek 9b148c919f BrowserTab: simplify unsupported media type error 2021-04-11 21:18:11 +02:00
Karol Kosek d9d624d010 BrowserTab: call the view source action from menu directly 2021-04-11 21:18:11 +02:00
Karol Kosek 4e9bd82562 GeminiRenderer: remove empty GeminiDocument class and unused includes 2021-04-11 21:18:11 +02:00
Karol Kosek 9a55d32e2c Save settings on exit
0d1fd25709 changed kristall::saveSettings()
to settings.sync() which caused bookmarks not to be saved.
2021-04-11 18:46:06 +02:00
Karol Kosek f181d989d6 BrowserTab: render image loading errors in a document 2021-04-10 22:58:25 +02:00
Karol Kosek 726e965a33 BrowserTab: add scrollbars to image view 2021-04-10 22:58:25 +02:00
Karol Kosek bbc7308f4c BrowserTab: scale images only when they are bigger than the window
Closes: #213
2021-04-10 22:58:25 +02:00
Karol Kosek c6b7ef61af BrowserTab: simplify image loading 2021-04-10 22:58:25 +02:00
tastytea 7074170f69 Respect *FLAGS environment variables.
This initializes QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS with the
corresponding environment variables on all OSs. The variables will be
expanded when qmake is run[1].

This is a generalization of #171.

[1] <https://doc.qt.io/archives/qt-4.8/qmake-advanced-usage.html#variables>
2021-04-10 10:03:03 +02:00
Karol Kosek 60d3e221c0 Show application version in the about dialog 2021-04-09 07:52:27 +02:00
Karol Kosek 55b0f37bad MarkdownRenderer: remove resetFormatting function from blockquotes
It caused some spacing issues with nested blockquotes.
2021-04-09 07:51:58 +02:00
Karol Kosek c8eae06657 MarkdownRenderer: suppress first block 2021-04-05 17:13:58 +02:00
Karol Kosek cda1243ae8 MarkdownRenderer: apply replacing quotes 2021-04-05 17:13:58 +02:00
Karol Kosek 4525eeb7ff Move replace_quotes to renderhelpers 2021-04-05 17:13:58 +02:00
Karol Kosek 1e2734f47d MarkdownRenderer: use blockquotes style from config 2021-04-05 17:13:58 +02:00
Karol Kosek abbe085b26 MarkdownRenderer: use bullet list style from config 2021-04-05 17:13:58 +02:00
Karol Kosek 033e93729d MarkdownRenderer: use unordered list style from config 2021-04-05 17:13:58 +02:00
Karol Kosek 6dfffb0a2a MarkdownRenderer: follow centering first header option 2021-04-05 17:13:58 +02:00
Karol Kosek d45aad2da4 MarkdownRenderer: use header formatting from config
Now, resetFormatting() between a header and a list block will add an empty block
(because that's what resetFormatting()'s doing), which might look a bit off.

I couldn't find a better way to this, since using
cursor.movePosition(QTextCursor::NextBlock) won't centre the first header
in the next commit. ://
2021-04-05 17:13:58 +02:00
Karol Kosek b7241b0c2c MarkdownRenderer: add default format parameter to resetFormatting() 2021-04-05 17:13:58 +02:00
Karol Kosek f1dc484fa7 MarkdownRenderer: move resetting format to a separate function 2021-04-05 17:13:58 +02:00
Karol Kosek 0e6bed958e MarkdownRenderer: move page_title to RenderState struct 2021-04-05 17:13:58 +02:00
omni 8d0eb55033 don't depend on bash 2021-04-03 10:47:53 +02:00
omni 5c59e94d94 make gem-to-man.awk portable 2021-04-03 10:47:29 +02:00
omni 06f3713aa9 update build requirements on Alpine linux 2021-04-03 10:47:15 +02:00
Karol Kosek 38b353ecc7 systemdialog.ui: set style buttons names
The text is hidden unless the user doesn't have that icon installed.
2021-04-02 10:35:00 +02:00
Mike Skec 12b69dee47 view source: remove question mark from title bar (#208) 2021-03-30 09:26:11 +02:00
Karol Kosek 62fe445a94 BrowserTab: set port on relative redirects 2021-03-28 22:00:34 +02:00
Felix (xq) Queißner eaee38bc03 Restores geometry from previous root window. 2021-03-17 09:49:58 +01:00
Mike Skec d2987e47b8 sessions: fix lazyload bug 2021-03-17 09:49:58 +01:00
Mike Skec 1b41d31c64 rename PageMetadata struct to NamedUrl
PageMetadata is a little misleading. NamedUrl sounds stupid but is a bit more accurate
2021-03-17 09:49:58 +01:00
Mike Skec 1f8ecb6d05 sessions: add 'lazyloading' for restored tabs 2021-03-17 09:49:58 +01:00
Mike Skec 489512210b sessions: save page titles and read them before loading page 2021-03-17 09:49:58 +01:00
Mike Skec 7321b9078c sessions: restore window tab indices 2021-03-17 09:49:58 +01:00
Felix (xq) Queißner f60dac9d7e Adds option to have old or new session behaviour. Closes #187 2021-03-17 09:49:58 +01:00
Felix (xq) Queißner 0d1fd25709 First draft of session management. Always restores the latest session. 2021-03-17 09:49:58 +01:00
Mike Skec 856924aa05 Strip carriage-returns in gemtext 2021-03-17 08:59:19 +01:00
OIS 8034cc3771 update Russian translation 2021-03-16 21:04:07 +01:00
OIS 2a7708b292 update .ts files 2021-03-16 21:04:07 +01:00
OIS 5022191031 mark more strings for translation 2021-03-16 21:04:07 +01:00