mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Backed out changeset 2a88239c2640 (don't change critical stuff during a beta phase)
This commit is contained in:
parent
97cfff3ef2
commit
c69499246d
@ -19,7 +19,7 @@ void AddLibraryDialog::setupUI()
|
|||||||
textLabel->setBuddy(path);
|
textLabel->setBuddy(path);
|
||||||
connect(path,SIGNAL(textChanged(QString)),this,SLOT(pathSetted(QString)));
|
connect(path,SIGNAL(textChanged(QString)),this,SLOT(pathSetted(QString)));
|
||||||
|
|
||||||
nameLabel = new QLabel(tr("Library name : "));
|
nameLabel = new QLabel(tr("Library Name : "));
|
||||||
nameEdit = new QLineEdit;
|
nameEdit = new QLineEdit;
|
||||||
nameLabel->setBuddy(nameEdit);
|
nameLabel->setBuddy(nameEdit);
|
||||||
connect(nameEdit,SIGNAL(textChanged(QString)),this,SLOT(nameSetted(QString)));
|
connect(nameEdit,SIGNAL(textChanged(QString)),this,SLOT(nameSetted(QString)));
|
||||||
@ -60,7 +60,7 @@ void AddLibraryDialog::setupUI()
|
|||||||
imgLabel->setPixmap(p);
|
imgLabel->setPixmap(p);
|
||||||
imgMainLayout->addWidget(imgLabel);//,0,Qt::AlignTop);
|
imgMainLayout->addWidget(imgLabel);//,0,Qt::AlignTop);
|
||||||
imgMainLayout->addLayout(mainLayout);
|
imgMainLayout->addLayout(mainLayout);
|
||||||
|
|
||||||
setLayout(imgMainLayout);
|
setLayout(imgMainLayout);
|
||||||
|
|
||||||
setModal(true);
|
setModal(true);
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#ifndef NO_OPENGL
|
#ifndef NO_OPENGL
|
||||||
#include <QGLFormat>
|
#include <QGLFormat>
|
||||||
#endif
|
#endif
|
||||||
|
#include <QHeaderView>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
@ -87,6 +88,10 @@
|
|||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
//#include <QtMacExtras>
|
||||||
|
#endif
|
||||||
|
|
||||||
LibraryWindow::LibraryWindow()
|
LibraryWindow::LibraryWindow()
|
||||||
:QMainWindow(),fullscreen(false),fetching(false),previousFilter(""),removeError(false),status(LibraryWindow::Normal)
|
:QMainWindow(),fullscreen(false),fetching(false),previousFilter(""),removeError(false),status(LibraryWindow::Normal)
|
||||||
{
|
{
|
||||||
@ -119,17 +124,17 @@ void LibraryWindow::setupUI()
|
|||||||
settings = new QSettings(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creación del fichero de config con el servidor
|
settings = new QSettings(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creación del fichero de config con el servidor
|
||||||
settings->beginGroup("libraryConfig");
|
settings->beginGroup("libraryConfig");
|
||||||
|
|
||||||
historyController = new YACReaderHistoryController(this);
|
historyController = new YACReaderHistoryController(this);
|
||||||
|
|
||||||
createActions();
|
createActions();
|
||||||
doModels();
|
doModels();
|
||||||
|
|
||||||
doDialogs();
|
doDialogs();
|
||||||
doLayout();
|
doLayout();
|
||||||
createToolBars();
|
createToolBars();
|
||||||
createMenus();
|
createMenus();
|
||||||
|
|
||||||
navigationController = new YACReaderNavigationController(this, comicsViewsManager);
|
navigationController = new YACReaderNavigationController(this, comicsViewsManager);
|
||||||
|
|
||||||
createConnections();
|
createConnections();
|
||||||
|
|
||||||
@ -1773,6 +1778,9 @@ void LibraryWindow::openComic()
|
|||||||
//Invoke YACReader comicPath comicId libraryId NO-->currentPage bookmark1 bookmark2 bookmark3 brightness contrast gamma
|
//Invoke YACReader comicPath comicId libraryId NO-->currentPage bookmark1 bookmark2 bookmark3 brightness contrast gamma
|
||||||
bool yacreaderFound = false;
|
bool yacreaderFound = false;
|
||||||
|
|
||||||
|
QString comicIdS = QString("--comicId=") + QString("%1").arg(comicId);
|
||||||
|
QString libraryIdS = QString("--libraryId=") + QString("%1").arg(libraryId);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
QStringList possiblePaths;
|
QStringList possiblePaths;
|
||||||
|
|
||||||
@ -1784,32 +1792,25 @@ void LibraryWindow::openComic()
|
|||||||
if(QFileInfo(yacreaderPath).exists())
|
if(QFileInfo(yacreaderPath).exists())
|
||||||
{
|
{
|
||||||
yacreaderFound = true;
|
yacreaderFound = true;
|
||||||
QStringList parameters = QStringList() << "-n" << yacreaderPath << path << (QString("--comicId=") + QString::number(comicId)) << (QString("--libraryId=") + QString::number(libraryId));
|
QProcess::startDetached("open", QStringList() << "-n" << yacreaderPath << "--args" << path << comicIdS << libraryIdS ); /*<< page << bookmark1 << bookmark2 << bookmark3 << brightness << contrast << gamma*///,QStringList() << path);
|
||||||
QProcess::startDetached("open", parameters);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN /* \"%4\" \"%5\" \"%6\" \"%7\" \"%8\" \"%9\" \"%10\" */
|
||||||
QStringList parameters = QStringList() << path << (QString("--comicId=") + QString::number(comicId)) << (QString("--libraryId=") + QString::number(libraryId));
|
yacreaderFound = QProcess::startDetached(QDir::cleanPath(QCoreApplication::applicationDirPath())+QString("/YACReader \"%1\" \"%2\" \"%3\"").arg(path).arg(QString("--comicId=") + QString::number(comicId)).arg(QString("--libraryId=") + QString::number(libraryId))/*.arg(page).arg(bookmark1).arg(bookmark2).arg(bookmark3).arg(brightness).arg(contrast).arg(gamma)*/,QStringList());
|
||||||
yacreaderFound = QProcess::startDetached(QDir::cleanPath(QCoreApplication::applicationDirPath()), parameters);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||||
QStringList parameters = QStringList() << path << (QString("--comicId=") + QString::number(comicId)) << (QString("--libraryId=") + QString::number(libraryId));
|
QStringList parameters = QStringList() << path << (QString("--comicId=") + QString::number(comicId)) << (QString("--libraryId=") + QString::number(libraryId));
|
||||||
yacreaderFound = QProcess::startDetached(QString("YACReader"),parameters);
|
yacreaderFound = QProcess::startDetached(QString("YACReader"),parameters);
|
||||||
#endif
|
#endif
|
||||||
if(!yacreaderFound)
|
if(!yacreaderFound)
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
QMessageBox::critical(this,tr("YACReader not found"),tr("YACReader not found, YACReader should be installed in the same folder as YACReaderLibrary."));
|
QMessageBox::critical(this,tr("YACReader not found"),tr("YACReader not found, YACReader should be installed in the same folder as YACReaderLibrary."));
|
||||||
#else
|
|
||||||
QMessageBox::critical(this,tr("YACReader not found"),tr("YACReader not found. There might be a problem with your YACReader installation."));
|
setCurrentComicOpened();
|
||||||
#endif
|
}
|
||||||
}
|
|
||||||
setCurrentComicOpened();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::setCurrentComicsStatusReaded(YACReaderComicReadStatus readStatus) {
|
void LibraryWindow::setCurrentComicsStatusReaded(YACReaderComicReadStatus readStatus) {
|
||||||
|
Loading…
Reference in New Issue
Block a user