Skip to content

Commit

Permalink
Merge pull request #386 from YACReader/develop
Browse files Browse the repository at this point in the history
9.13
  • Loading branch information
luisangelsm authored Jul 9, 2023
2 parents fb85df7 + 9313f7f commit 83e0ab2
Show file tree
Hide file tree
Showing 131 changed files with 3,366 additions and 1,333 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ Version counting is based on semantic versioning (Major.Feature.Patch)

## WIP

### YACReaderLibrary
* Avoid showing stale information in the server config dialog by updating the connection information when the dialog is opened.
* Add new metadata support, it improves compatibility with ComicInfo.xml
* Add support for showing a "recently added/updated" indicator. The number of days to consider something recent can be configured in the settings.
* Improved comic metadata dialog.
* Add textual tags support that can be queried through the search engine.
* Make = in the search engine work as : does.
* Add new operators to the search engine: exact match ==, <, >, <=, >=.
* Support filtering by since/before dates in the search engine. e.g. `added > 7` means recent content added since 7 days ago, and `added < 30` means content added before the last 30 days.
* Show the full library path in the dialog shown to warn about missing libraries.
* Fix scroll bar in the info comics view in Qt6 builds.
* New `Recent` smart list, it will show recent comics added.
* Try to detect changed files with the same name on libraries updates, there is also a new setting to decide if the modified date of a file should be used as an indicator to know if the file has been changed since it was added (disabled by default).
* Fix alphanumeric navigation in the folders tree view. Shortcuts were interfering the default behaviour, now some shortcuts will be ignored if the folders tree has the focus.
* Fix sorting in the Comic Vine series selection dialog.
* Fix getting only distinct rows when querying folders through the search engine.

### YACReader
* Add shortcuts for moving by one the double page mode to the left/right, by default CTRL + SHIFT + LEFT, and, CTRL + SHIFT + RIGHT. Remember that you can change any shortcut in the shortcuts dialog. You can also achieve this functionality using the "Go to page flow" and chossing the page you want to be on the left/right (depending on the reading mode comic/manga).

### All Apps
* New icons for macos.

## 9.12

### YACReaderLibrary
Expand Down
Binary file modified YACReader/YACReader.icns
Binary file not shown.
2 changes: 0 additions & 2 deletions YACReader/YACReader.pro
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ HEADERS += ../common/comic.h \
../common/bookmarks.h \
bookmarks_dialog.h \
render.h \
shortcuts_dialog.h \
translator.h \
goto_flow_widget.h \
page_label_widget.h \
Expand Down Expand Up @@ -125,7 +124,6 @@ SOURCES += ../common/comic.cpp \
../common/bookmarks.cpp \
bookmarks_dialog.cpp \
render.cpp \
shortcuts_dialog.cpp \
translator.cpp \
goto_flow_widget.cpp \
page_label_widget.cpp \
Expand Down
2 changes: 1 addition & 1 deletion YACReader/bookmarks_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ BookmarksDialog::BookmarksDialog(QWidget *parent)

l->addWidget(new QLabel("<font color=\"#FFFFFF\">" + tr("Click on any image to go to the bookmark") + "</font>"), 0, Qt::AlignCenter);
l->addLayout(layout);
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
l->addLayout(buttons);
#endif

Expand Down
2 changes: 0 additions & 2 deletions YACReader/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include <QStringList>
#include <QMessageBox>

#include "yacreader_global.h"

Configuration::Configuration()
{
}
Expand Down
2 changes: 1 addition & 1 deletion YACReader/goto_flow.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "goto_flow.h"
#include "configuration.h"
#include "comic.h"

#include <QVBoxLayout>
#include <QSize>
Expand All @@ -21,6 +20,7 @@
#include <QEvent>
#include <QKeyEvent>
#include <QLabel>
#include <QTimer>

#include "yacreader_flow.h"

Expand Down
1 change: 0 additions & 1 deletion YACReader/magnifying_glass.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "magnifying_glass.h"
#include "viewer.h"
#include "configuration.h"
#include "shortcuts_manager.h"

#include <QScrollBar>

Expand Down
8 changes: 4 additions & 4 deletions YACReader/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace QsLogging;
#define new DEBUG_NEW
#endif

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <QEvent>
#include <QFileOpenEvent>
class YACReaderApplication : public QApplication
Expand Down Expand Up @@ -106,7 +106,7 @@ int main(int argc, char *argv[])
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
YACReaderApplication app(argc, argv);
#else
QApplication app(argc, argv);
Expand Down Expand Up @@ -178,7 +178,7 @@ int main(int argc, char *argv[])
logger.addDestination(std::move(fileDestination));

QTranslator translator;
#if defined Q_OS_UNIX && !defined Q_OS_MAC
#if defined Q_OS_UNIX && !defined Q_OS_MACOS
translator.load(QLocale(), "yacreader", "_", QString(DATADIR) + "/yacreader/languages");
#else
translator.load(QLocale(), "yacreader", "_", "languages");
Expand All @@ -202,7 +202,7 @@ int main(int argc, char *argv[])
mwv->openComicFromPath(arglist.at(0));
}

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
app.setWindow(mwv);
#endif
mwv->show();
Expand Down
42 changes: 26 additions & 16 deletions YACReader/main_window_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "check_new_version.h"
#include "comic.h"
#include "bookmarks_dialog.h"
#include "shortcuts_dialog.h"
#include "width_slider.h"
#include "qnaturalsorting.h"
#include "help_about_dialog.h"
Expand Down Expand Up @@ -188,7 +187,7 @@ void MainWindowViewer::createActions()
openAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_ACTION_Y));
connect(openAction, &QAction::triggered, this, QOverload<>::of(&MainWindowViewer::open));

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
newInstanceAction = new QAction(tr("New instance"), this);
newInstanceAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(NEW_INSTANCE_ACTION_Y));
connect(newInstanceAction, &QAction::triggered,
Expand Down Expand Up @@ -473,7 +472,7 @@ QAction *MainWindowViewer::addActionWithShortcut(const QString &text, const QStr

void MainWindowViewer::createToolBars()
{
#ifdef Q_OS_MAC
#ifdef Y_MAC_UI
comicToolBar = new YACReaderMacOSXToolbar(this);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
comicToolBar->setIconSize(QSize(18, 18));
Expand All @@ -482,12 +481,12 @@ void MainWindowViewer::createToolBars()
comicToolBar = addToolBar(tr("&File"));
#endif

#ifndef Q_OS_MAC
#ifndef Y_MAC_UI
comicToolBar->setStyleSheet("QToolBar{border:none;}");
comicToolBar->setIconSize(QSize(18, 18));
#endif

#ifdef Q_OS_MAC
#ifdef Y_MAC_UI
comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/open")), openAction));
comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/openFolder")), openFolderAction));
#else
Expand Down Expand Up @@ -565,7 +564,7 @@ void MainWindowViewer::createToolBars()
comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/flow")), showFlowAction));
comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/info")), showInfoAction));

#ifdef Q_OS_MAC
#ifdef Y_MAC_UI
comicToolBar->addStretch();
#else
comicToolBar->addWidget(new YACReaderToolBarStretch());
Expand All @@ -575,7 +574,7 @@ void MainWindowViewer::createToolBars()
comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/options")), optionsAction));
comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/help")), helpAboutAction));

#ifndef Q_OS_MAC
#ifndef Y_MAC_UI
comicToolBar->setMovable(false);
#endif

Expand Down Expand Up @@ -625,7 +624,7 @@ void MainWindowViewer::createToolBars()
viewer->setContextMenuPolicy(Qt::ActionsContextMenu);

// MacOSX app menus
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
auto menuBar = this->menuBar();
// about / preferences
// TODO
Expand Down Expand Up @@ -799,8 +798,12 @@ void MainWindowViewer::open(QString path, ComicDB &comic, QList<ComicDB> &siblin
else
setWindowTitle("YACReader - " + fi.fileName());

viewer->setMangaWithoutStoringSetting(comic.info.manga.toBool());
doubleMangaPageAction->setChecked(comic.info.manga.toBool());
auto type = comic.info.type.value<YACReader::FileType>();
// TODO: support comic.info.type by adjusting the scrolling and double page mode behaviour depending on the actual type, for now type is mapped to manga mode
auto isManga = type == YACReader::FileType::Manga;

viewer->setMangaWithoutStoringSetting(isManga);
doubleMangaPageAction->setChecked(isManga);

viewer->open(path, comic);
enableActions();
Expand Down Expand Up @@ -940,7 +943,7 @@ void MainWindowViewer::saveImage()
void MainWindowViewer::enableActions()
{
setActionsEnabled(true);
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
activateWindow();
raise();
#endif
Expand Down Expand Up @@ -1062,7 +1065,7 @@ void MainWindowViewer::toggleToolBars()
toolbars ? hideToolBars() : showToolBars();

Configuration::getConfiguration().setShowToolbars(toolbars);
#ifndef Q_OS_MAC
#ifndef Y_MAC_UI
comicToolBar->setMovable(false);
#endif
}
Expand Down Expand Up @@ -1159,7 +1162,7 @@ void MainWindowViewer::setUpShortcutsManagement()
<< toggleFullScreenAction
<< toggleToolbarsAction
<< showEditShortcutsAction
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
<< newInstanceAction
#endif
);
Expand Down Expand Up @@ -1249,6 +1252,11 @@ void MainWindowViewer::setUpShortcutsManagement()
auto *const goToLastPageAction = addActionWithShortcut(tr("Go to the last page"), GO_TO_LAST_PAGE_ACTION_Y);
connect(goToLastPageAction, &QAction::triggered, viewer, &Viewer::goToLastPage);

auto *const offsetDoublePageToTheLeft = addActionWithShortcut(tr("Offset double page to the left"), OFFSET_DOUBLE_PAGE_TO_THE_LEFT_Y);
connect(offsetDoublePageToTheLeft, &QAction::triggered, viewer, &Viewer::offsetDoublePageToTheLeft);
auto *const offsetDoublePageToTheRight = addActionWithShortcut(tr("Offset double page to the right"), OFFSET_DOUBLE_PAGE_TO_THE_RIGHT_Y);
connect(offsetDoublePageToTheRight, &QAction::triggered, viewer, &Viewer::offsetDoublePageToTheRight);

loadedComicActions = { autoScrollForwardAction,
autoScrollBackwardAction,
autoScrollForwardHorizontalFirstAction,
Expand All @@ -1260,7 +1268,9 @@ void MainWindowViewer::setUpShortcutsManagement()
moveLeftAction,
moveRightAction,
goToFirstPageAction,
goToLastPageAction };
goToLastPageAction,
offsetDoublePageToTheLeft,
offsetDoublePageToTheRight };

editShortcutsDialog->addActionsGroup(tr("Reading"), QIcon(":/images/shortcuts_group_reading.svg"),
tmpList = QList<QAction *>()
Expand Down Expand Up @@ -1290,7 +1300,7 @@ void MainWindowViewer::toggleFitToWidthSlider()
{
int y;

#ifdef Q_OS_MAC
#ifdef Y_MAC_UI
y = 0;
#else
y = this->comicToolBar->frameSize().height();
Expand Down Expand Up @@ -1576,7 +1586,7 @@ void MainWindowViewer::sendComic()
auto client = new YACReaderLocalClient;

connect(client, &YACReaderLocalClient::finished, client, &YACReaderLocalClient::deleteLater);
currentComicDB.info.lastTimeOpened = QDateTime::currentMSecsSinceEpoch() / 1000;
currentComicDB.info.lastTimeOpened = QDateTime::currentSecsSinceEpoch();

viewer->updateComic(currentComicDB);

Expand Down
9 changes: 5 additions & 4 deletions YACReader/main_window_viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
#include <QCloseEvent>
#include <QSettings>

#ifdef Q_OS_MAC
#include "yacreader_global.h"

#ifdef Y_MAC_UI
#include "yacreader_macosx_toolbar.h"
#endif

#include "comic_db.h"
#include "yacreader_global.h"

class Comic;
class Viewer;
Expand Down Expand Up @@ -102,15 +103,15 @@ public slots:
EditShortcutsDialog *editShortcutsDialog;

//! ToolBars
#ifdef Q_OS_MAC
#ifdef Y_MAC_UI
YACReaderMacOSXToolbar *comicToolBar;
#else
QToolBar *comicToolBar;
#endif

//! Actions
QAction *openAction;
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
QAction *newInstanceAction; // needed in macos
#endif
QAction *openFolderAction;
Expand Down
4 changes: 2 additions & 2 deletions YACReader/notifications_label_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ NotificationsLabelWidget::NotificationsLabelWidget(QWidget *parent)

textLabel->setFixedSize(200, 120);

// TODO check if the effects still be broken in OSX yet
#ifndef Q_OS_MAC
// TODO check if the effects are still broken in OSX
#ifndef Q_OS_MACOS
this->setGraphicsEffect(effect);
#endif

Expand Down
64 changes: 0 additions & 64 deletions YACReader/shortcuts_dialog.cpp

This file was deleted.

Loading

0 comments on commit 83e0ab2

Please sign in to comment.