mirror of
https://github.com/YACReader/yacreader
synced 2025-07-17 20:44:32 -04:00
YACReaderLibrary opens now its own viewer windows
This commit is contained in:
@ -55,7 +55,7 @@
|
||||
#include "comics_remover.h"
|
||||
#include "yacreader_library_list_widget.h"
|
||||
#include "yacreader_treeview.h"
|
||||
|
||||
#include "main_window_viewer.h"
|
||||
//#include "yacreader_social_dialog.h"
|
||||
//
|
||||
|
||||
@ -1006,19 +1006,25 @@ void LibraryWindow::openComic()
|
||||
{
|
||||
ComicDB comic = dmCV->getComic(comicView->currentIndex());
|
||||
QString path = currentPath() + comic.path;
|
||||
MainWindowViewer * viewer = new MainWindowViewer();
|
||||
QList<ComicDB> siblings = dmCV->getAllComics();
|
||||
viewer->open(path,comic,siblings);
|
||||
viewer->show();
|
||||
|
||||
connect(viewer,SIGNAL(closed()),viewer,SLOT(deleteLater()));
|
||||
/*quint64 comicId = comic.id;
|
||||
//TODO generate IDS for libraries...
|
||||
quint64 libraryId = selectedLibrary->currentIndex();
|
||||
int page = *(comic.info.numPages) / 2;*/
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
QProcess::startDetached("open", QStringList() << "-n" << QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app") << "--args" << path /*<< comicId << libraryId << page*/);//,QStringList() << path);
|
||||
//Comic is readed
|
||||
#else
|
||||
|
||||
QProcess::startDetached(QDir::cleanPath(QCoreApplication::applicationDirPath())+QString("/YACReader \"%1\"").arg(path)/*.arg(comicId).arg(libraryId).arg(page)*/,QStringList());
|
||||
#endif
|
||||
//#ifdef Q_OS_MAC
|
||||
//
|
||||
// QProcess::startDetached("open", QStringList() << "-n" << QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app") << "--args" << path /*<< comicId << libraryId << page*/);//,QStringList() << path);
|
||||
// //Comic is readed
|
||||
//#else
|
||||
//
|
||||
// QProcess::startDetached(QDir::cleanPath(QCoreApplication::applicationDirPath())+QString("/YACReader \"%1\"").arg(path)/*.arg(comicId).arg(libraryId).arg(page)*/,QStringList());
|
||||
//#endif
|
||||
//Comic is readed
|
||||
setCurrentComicReaded();
|
||||
}
|
||||
|
Reference in New Issue
Block a user