Commit Graph

151 Commits

Author SHA1 Message Date
Luis Ángel San Martín
0cf40e06eb Add new action to delete all the metadata from the selected comics 2022-10-24 18:58:18 +02:00
Luis Ángel San Martín
21461ce8a0 Update context menu(s) icons to svg 2022-10-23 14:36:11 +02:00
Luis Ángel San Martín
31c4ae6561 More left side bar png to svg assets conversion 2022-10-23 10:43:37 +02:00
Luis Ángel San Martín
c7a1a73432 Convert more icons to SVG 2022-10-22 16:26:10 +02:00
Luis Ángel San Martín
75c08885be Replace more icons with svg 2022-10-22 11:40:49 +02:00
Luis Ángel San Martín
4c66b8ecad Use SVG icons in YACReader's toolbar (windows/linux) and in shortcuts dialog 2022-10-20 17:51:22 +02:00
Luis Ángel San Martín
ebcb3d8a91 Implement LibraryWindow::showContinueReadingContextMenu 2022-10-17 21:17:04 +02:00
Luis Ángel San Martín
60c650d820 Remove TODO 2022-10-17 20:51:05 +02:00
Luis Ángel San Martín
569a699c1d Typo 2022-10-15 13:55:37 +02:00
Luis Ángel San Martín
e8f31b39ee Update the current comic model when the server gets a syn request
Sadly the grid view resets its scroll to origin. Not sure if it is going to bother anyone, we'll see.
2022-10-15 12:53:02 +02:00
Luis Ángel San Martín
928afa4675 Wrap functionality 2022-10-15 12:46:17 +02:00
Luis Ángel San Martín
2093c072b6 Remove commented code 2022-10-15 12:34:56 +02:00
Luis Ángel San Martín
75b2daac76 Fix call to renamed method 2022-10-15 12:34:23 +02:00
Luis Ángel San Martín
d8a35d767c Update the UI when a client synchronizes back the libraries
Only the top banners for now. 

TODO: ComicModel should also be updated.
2022-10-15 11:52:34 +02:00
Luis Ángel San Martín
e7b6f46cd3 Update the UI when a comic is updated using the http api 2022-10-15 11:42:46 +02:00
Luis Ángel San Martín
a4a2b3ce6c Rename method 2022-10-14 20:59:43 +02:00
Luis Ángel San Martín
f4656ad210 Update if needed the continue reading list whenever we get an update about a comic 2022-10-14 20:56:03 +02:00
Luis Ángel San Martín
f1dd6d339d Fix comicsViewsManager -> contentViewsManager renaming 2022-10-14 13:11:59 +02:00
Luis Ángel San Martín
374758fd41 Move header and declaration to the top of the file 2022-10-13 23:34:08 +02:00
Luis Ángel San Martín
05a3172012 Rename s to httpServer 2022-10-13 23:30:04 +02:00
Luis Ángel San Martín
be0c0ff341 Rename Startup class to YACReaderHttpServer 2022-10-13 23:24:35 +02:00
Luis Ángel San Martín
59639ad68c Rename instance name to match class name 2022-10-13 23:23:18 +02:00
Luis Ángel San Martín
7317467a13 Rename class 2022-10-13 21:11:13 +02:00
Luis Ángel San Martín
00f7d92c9a Make sure that the changes made to folders are propagated to the subfolder model in FolderContentView 2022-10-13 19:28:55 +02:00
Luis Ángel San Martín
abfa03fa16 Use the new widget instead of EmptyFolderWidget 2022-10-09 11:32:06 +02:00
Luis Ángel San Martín
2de84f5780 Fix connection by registering the types used in the signal 2022-09-16 19:38:45 +02:00
Luis Ángel San Martín Rodríguez
e026f25617 QMacToolBar is not available in Qt6
This commit adds new qt pure versions of the mac toolbar to be used in qt6.
2022-09-12 19:24:56 +02:00
Luis Ángel San Martín
c37bc33161 Update properties dialog to be able to edit comics sequentially 2022-08-26 21:05:26 +02:00
Luis Ángel San Martín
77c96de0ea Remove unused resources 2022-01-15 15:51:59 +01:00
Luis Ángel San Martín
d8f224645d Remove YACReader::SearchModifiers
They are no longer used
2021-12-29 14:58:03 +01:00
Igor Kushnir
ea2c90011a Library: exit search mode before creating a folder
Creating a folder in search mode selects it and makes the UI look
half-way between Normal and Searching navigation statuses.

An alternative fix is to disable addFolderAction in search mode. But
this is more difficult to implement and inconsistent with the other
always-enabled folder and reading list actions.
2021-12-29 11:02:01 +01:00
Igor Kushnir
40ca07f8f8 Extract YACReaderNavigationController::exitSearchMode() 2021-12-29 11:01:35 +01:00
Luis Ángel San Martín
c5d3ebebc8 Remove commented code 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
86a31c0ea5 Use QRegularExpression 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
2c0dccd764 Use constructor explicitly 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
47e7eb3801 Remove unused includes 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
8173f9f94c Use setContentsMargins instead of setMargin 2021-10-19 00:00:09 +02:00
Luis Ángel San Martín
5aa02a19bb clang-format 2021-10-18 21:56:52 +02:00
Luis Ángel San Martín
def1cd56d0 Fix macos build 2021-09-27 17:45:29 +02:00
Luis Ángel San Martín
b4c90a8920 Add support for scanning xml info from the libraries context menu
This will let people to rescan their existing libraries.
2021-09-27 15:40:48 +02:00
Felix Kauselmann
f1e4396dc5 YACReaderLibrary: Convert a bunch of widgets/dialogs to new slot syntax 2021-06-29 13:53:12 +02:00
Felix Kauselmann
485ce1c9d8 Convert Mac toolbar to new slot syntax 2021-06-29 13:53:12 +02:00
Felix Kauselmann
8377de7c3e Clazy: Use fixits to refactor some old style signal connections 2021-06-29 13:53:12 +02:00
Luis Ángel San Martín
85677afc7b
Merge pull request #203 from vedgy/fix-library-crash-at-exit-after-deletion
Library: don't crash at exit after a folder or a comic is deleted
2021-06-19 18:13:51 +02:00
Luis Ángel San Martín
91c9375dc1 Fix opening a comic from the current/next comic banner in the grid view 2021-06-19 07:24:29 +02:00
Igor Kushnir
2acfbbfac7 Library: add Quit shortcut
The Ctrl+Q shortcut is assigned to Quit action in most applications on
GNU/Linux. Command+Q is used on macOS. The added shortcut should be
automatically mapped to Command+Q on macOS judging by the following
quote from QKeySequence class documentation:
Note: On macOS, references to "Ctrl", Qt::CTRL, Qt::Key_Control and
Qt::ControlModifier correspond to the Command keys on the Macintosh
keyboard

QKeySequence::Quit could be used as the default key sequence in place of
`Qt::CTRL | Qt::Key_Q`. This would leave the shortcut unassigned by
default on Windows. But YACReader doesn't use QKeySequence::StandardKey
anywhere, so perhaps this shortcut should be hard-coded too.

The shortcut is particularly useful when Close to tray option is
enabled, because in this case closing the Library window with a system
window manager shortcut simply hides it.
2021-05-28 19:34:24 +02:00
Luis Ángel San Martín
945b24a8f8 Extract opening a comic from YACReaderLibrary to its own file
And send a new param `--readingListId` to tell YACReader that the comic is opened from a reading list.
2021-05-27 18:48:52 +02:00
Luis Ángel San Martín
e2483217d9 Configure OpenGL settings earlier to avoid wrong state in the options dialog 2021-05-16 09:37:05 +02:00
Luis Ángel San Martín
13d0f5fc75 Do not show the what's new dialog when there are no libraries
No libraries probably means fresh installation.
2021-05-16 09:21:42 +02:00
Luis Ángel San Martín
13a29e2657 Make "delete" icon work properly in the "Reading" list
Only the "Favorites" special list was handled.
2021-05-16 09:01:35 +02:00
Luis Ángel San Martín
84c43e456e
Merge pull request #209 from vedgy/add-focus-shortcuts
Add focus shortcuts
2021-03-13 17:09:46 +01:00
Luis Ángel San Martín
06814d066a
Merge pull request #200 from vedgy/rename-processor-class-typo
Fix a typo in ComicQueryResultProcessor class name
2021-03-13 15:54:22 +01:00
Igor Kushnir
8a54100804 Library: allow configuring a shortcut to focus comics view
Focusing the current comics view allows to use keyboard arrow keys to
choose among the visible comics.

The shortcut for this new action should not be a single character
without modifiers because it won't work when the search line has focus.

The Qt::FocusReason parameter in ComicsView::focusComicsNavigation()
allows to reuse this function for other keyboard navigation features.
For instance the search line can transfer focus to comics navigation
when the user presses Return or Enter key. In this case
Qt::OtherFocusReason can be used (an application-specific reason).
2021-03-13 15:08:33 +02:00
Igor Kushnir
81e40dabec Library: add a shortcut to focus search line
The Ctrl+F shortcut gives focus to a search bar in many applications.
In this case it allows to search the library without touching a mouse.

YACReaderMacOSXSearchLineEdit::setFocus() will have to be implemented to
make the shortcut work on macOS.
2021-03-13 14:59:29 +02:00
Igor Kushnir
3c9ed6ef8f Deprecated qSort => std::sort
This change gets rid of some GCC's -Wdeprecated-declarations warnings.
2021-03-09 21:32:23 +01:00
Igor Kushnir
3fcf31d936 Enable/disable comics actions after updating search results
Before this commit starting a search when an empty folder or an empty
reading list was selected left all comics actions disabled. Fixes #213.

When search mode is exited, we always call either
YACReaderNavigationController::loadFolderInfo() or
YACReaderNavigationController::loadListInfo(). Both of them call
LibraryWindow::disableComicsActions(), so the enabled/disabled state of
the comics actions stays up-to-date at all times.
2021-03-06 21:01:20 +01:00
Igor Kushnir
c4333915c9 Library: don't leak DB model objects at exit
Currently these objects are created once at program startup and are
never destroyed. Printing debug messages in the models' destructors
confirms the leaks and proves that with this fix the objects are
destroyed at Library exit.
2021-03-06 21:00:31 +01:00
Igor Kushnir
aa9dd95d5d LibraryWindow: remove a duplicate signal-slot connection
QSqlDatabase::commit() in ComicModel::finishTransaction() returned false
(failed) when this slot was invoked the second time in a row.
2021-02-07 20:16:20 +02:00
Igor Kushnir
5257dc88d6 Library: destroy the temporary thread when deleting finishes
finished() signal of both FoldersRemover and ComicsRemover was not
connected to their QThread's quit() slot. So the thread kept running
after the deletion completed. The QThread's parent is LibraryWindow.
Thus LibraryWindow's ~QObject() invokes the QThread's destructor.

As a result, when the user exited YACReader Library after deleting at
least one folder or comic, it printed the following FATAL message and
crashed at exit: "QThread: Destroyed while thread is still running".

Extract signal-slot connections between a remover and a QThread into
moveAndConnectRemoverToThread() to reduce code duplication.

Remove always true (thread != NULL) checks.
2021-02-07 19:46:15 +02:00
Igor Kushnir
12c2ff027a ComicQueryResultProcessor: fix a typo in the class name 2021-02-06 20:08:44 +02:00
Igor Kushnir
64d0e22fb5 Library: don't leak folderQueryResultProcessor at exit
FolderQueryResultProcessor has a ConcurrentQueue data member. The leak
meant that the thread was not joined before exit.
2021-02-04 17:58:33 +02:00
Luis Ángel San Martín
58fdf0af23 Add what's new dialog 2021-01-21 21:39:22 +01:00
Luis Ángel San Martín
20c772797b Fix typo 2021-01-16 18:59:53 +01:00
Luis Ángel San Martín
6461a4014e Add actions for setting folders as manga/normal 2021-01-16 18:31:48 +01:00
Luis Ángel San Martín
97c7723b17 Add support for setting issues as manga/normal in the comics view 2021-01-16 14:25:47 +01:00
Luis Ángel San Martín
5343d24f26 Run folder search filtering in the background
It uses the same approach used by the comics search filter
2021-01-14 11:37:17 +01:00
Luis Ángel San Martín
ccc382df7d Use ComicQueryResultProcesor 2021-01-14 09:17:18 +01:00
Luis Ángel San Martín
e1b0e7c96f Fix full screen mode in windows with qt 5.12.4+ 2019-09-28 10:11:44 +02:00
Luis Ángel San Martín
ef8216b338 Make closeApp work with no event
And exit using QApplication.exit so we don't mess with window events to exit the app
2019-09-21 12:11:03 +02:00
Luis Ángel San Martín
8e99d9e59f Extract the system tray functionality to its own class
LibraryWindow is already a monster, so we'll try to not make it bigger.
2019-09-21 10:47:01 +02:00
Luis Ángel San Martín
403e657062 A new trayicon is needed for macos 2019-09-20 13:41:26 +02:00
Luis Ángel San Martín
6031c81d81 Add better icons for the system tray in macos and windows
I would like to design specific icons for the system tray at some point, but for now this is what we have.
2019-09-20 10:07:20 +02:00
Luis Ángel San Martín
a0f682be7b Merge went bad
Hopefully this is all that got messed up
2019-09-19 22:32:07 +02:00
Luis Ángel San Martín
a632480422 Format 2019-09-19 21:16:56 +02:00
Felix Kauselmann
e587f59ddb Add support for minimize and start to tray. 2019-09-19 20:22:14 +02:00
Luis Ángel San Martín
bb334cfd50 Use auto to avoid duplicating the type name 2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
e3ec56aa43 Format code using clang-format 2019-05-30 19:46:37 +02:00
Igor Kushnir
c1810b9e54 Library: do not needlessly retrieve all comics from the DB
The siblings variable is unused. So the ComicModel::getAllComics() call
is redundant unless there is some unobvious side effect (I hope not).
2019-05-24 14:53:52 +03:00
François Gannaz
c044e93446 Library: typecast in comparison of int and quint64 2019-04-01 11:25:16 +02:00
François Gannaz
f7b4b7a5d1 Library: add missing 'case' to a 'switch' 2019-04-01 11:25:16 +02:00
François Gannaz
3062d8826e Library: reorder initialization of LibraryWindow 2019-04-01 11:25:16 +02:00
Felix Kauselmann
d5a11fb16b Add .gitattributes rules for text and binary handling 2018-07-30 15:04:04 +02:00
Luis Ángel San Martín
229afbc9a9 Fix crash caused by accessing the UI thread from a background thread.
ComicVineDialog was calling close from background, plus accepted is emmited from a background thread, so it needs a QueuedConnection.
2018-05-31 18:09:41 +02:00
Luis Ángel San Martín
6faea2b5a7 Disabled minimize to system tray for now.
App icon needs some work to look ok in Windows 10 system tray and macos is not ready yet to fully support this.
2018-05-23 17:24:04 +02:00
Luis Ángel San Martín
f6d389ff35 Add current/next comic view to GridView. 2018-04-23 19:22:51 +02:00
Luis Ángel San Martín
b41884d5db Merge 2018-04-14 10:24:19 +02:00
Felix Kauselmann
d9d94b103a Fix YACReader launch on MacOS 2018-03-30 14:14:43 +02:00
Luis Ángel San Martín
049081960f Run the library upgrade in background. 2018-03-12 21:22:00 +01:00
Felix Kauselmann
827a76413b Sanitize YACReader launch code 2018-03-11 20:13:19 +01:00
Felix Kauselmann
3654b6b527 Backed out changeset 84d6af62bc15, restore previously removed QProcess improvements for launching YACReader 2018-02-20 16:31:06 +01:00
Felix Kauselmann
e6c4e92e01 YACReaderLibrary: Activate and rise window on tray icon clicks 2018-02-19 13:54:12 +01:00
Felix Kauselmann
1815ba64a1 YACReaderLibrary: Add a tray icon 2018-02-17 13:40:04 +01:00
Felix Kauselmann
2cbbf8d433 Headless server: simplify system config logger 2018-01-28 13:32:56 +01:00
Luis Ángel San Martín
e8c6f60c13 Merge 2017-11-26 07:39:08 +01:00
Luis Ángel San Martín
d5f167b670 Don't set the window icon, let windows use the app icon. 2017-11-20 21:37:26 +01:00
Felix Kauselmann
c69499246d Backed out changeset 2a88239c2640 (don't change critical stuff during a beta phase) 2017-11-14 18:05:17 +01:00
Felix Kauselmann
97cfff3ef2 QProcess: always use proper process arguments when opening YACReader from the library 2017-11-12 12:08:22 +01:00
Felix Kauselmann
caf53f0442 Fix spelling errors reported by stevepusser 2017-11-11 08:55:16 +01:00
Luis Ángel San Martín
02e7caf5c5 Bug fix. Updates through the server didn't update the read field in the DB. 2017-10-20 17:42:25 +02:00
Luis Ángel San Martín
f149f314e0 Merge 2017-08-26 16:54:10 +02:00