mirror of
https://github.com/YACReader/yacreader
synced 2025-11-12 21:12:43 -05:00
fixed some dialogs in MacOSX, now they are shown as sheets
This commit is contained in:
@ -77,8 +77,8 @@ void GoToDialog::setNumPages(unsigned int numPages)
|
|||||||
v->setTop(numPages);
|
v->setTop(numPages);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GoToDialog::show()
|
void GoToDialog::open()
|
||||||
{
|
{
|
||||||
pageNumber->setFocus();
|
pageNumber->setFocus();
|
||||||
QDialog::show();
|
QDialog::open();
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@
|
|||||||
public slots:
|
public slots:
|
||||||
void goTo();
|
void goTo();
|
||||||
void setNumPages(unsigned int numPages);
|
void setNumPages(unsigned int numPages);
|
||||||
void show();
|
void open();
|
||||||
signals:
|
signals:
|
||||||
void goToPage(unsigned int page);
|
void goToPage(unsigned int page);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -240,7 +240,7 @@ void Viewer::prev()
|
|||||||
}
|
}
|
||||||
void Viewer::showGoToDialog()
|
void Viewer::showGoToDialog()
|
||||||
{
|
{
|
||||||
goToDialog->show();
|
goToDialog->open();
|
||||||
}
|
}
|
||||||
void Viewer::goTo(unsigned int page)
|
void Viewer::goTo(unsigned int page)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -75,10 +75,10 @@ void CreateLibraryDialog::setupUI()
|
|||||||
setWindowTitle(tr("Create new library"));
|
setWindowTitle(tr("Create new library"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateLibraryDialog::show(const YACReaderLibraries & libs)
|
void CreateLibraryDialog::open(const YACReaderLibraries & libs)
|
||||||
{
|
{
|
||||||
libraries = libs;
|
libraries = libs;
|
||||||
QDialog::show();
|
QDialog::open();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateLibraryDialog::create()
|
void CreateLibraryDialog::create()
|
||||||
@ -153,7 +153,7 @@ void CreateLibraryDialog::setDataAndStart(QString name, QString path)
|
|||||||
{
|
{
|
||||||
this->path->setText(path);
|
this->path->setText(path);
|
||||||
this->nameEdit->setText(name);
|
this->nameEdit->setText(name);
|
||||||
QDialog::show();
|
QDialog::open();
|
||||||
create();
|
create();
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
void setDataAndStart(QString name, QString paht);
|
void setDataAndStart(QString name, QString paht);
|
||||||
void nameSetted(const QString & text);
|
void nameSetted(const QString & text);
|
||||||
void pathSetted(const QString & text);
|
void pathSetted(const QString & text);
|
||||||
void show(const YACReaderLibraries &libraries);
|
void open(const YACReaderLibraries &libraries);
|
||||||
signals:
|
signals:
|
||||||
void createLibrary(QString source, QString target, QString name);
|
void createLibrary(QString source, QString target, QString name);
|
||||||
void cancelCreate();
|
void cancelCreate();
|
||||||
|
|||||||
@ -86,10 +86,10 @@ void ImportLibraryDialog::setupUI()
|
|||||||
setModal(true);
|
setModal(true);
|
||||||
setWindowTitle(tr("Extract a catalog"));
|
setWindowTitle(tr("Extract a catalog"));
|
||||||
}
|
}
|
||||||
void ImportLibraryDialog::show(const YACReaderLibraries &libs)
|
void ImportLibraryDialog::open(const YACReaderLibraries &libs)
|
||||||
{
|
{
|
||||||
libraries = libs;
|
libraries = libs;
|
||||||
QDialog::show();
|
QDialog::open();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportLibraryDialog::add()
|
void ImportLibraryDialog::add()
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
void findDestination();
|
void findDestination();
|
||||||
void close();
|
void close();
|
||||||
void nameEntered();
|
void nameEntered();
|
||||||
void show(const YACReaderLibraries & libs);
|
void open(const YACReaderLibraries & libs);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void unpackCLC(QString clc,QString targetFolder, QString name);
|
void unpackCLC(QString clc,QString targetFolder, QString name);
|
||||||
|
|||||||
@ -998,7 +998,7 @@ void LibraryWindow::createConnections()
|
|||||||
|
|
||||||
//actions
|
//actions
|
||||||
connect(createLibraryAction,SIGNAL(triggered()),this,SLOT(createLibrary()));
|
connect(createLibraryAction,SIGNAL(triggered()),this,SLOT(createLibrary()));
|
||||||
connect(exportLibraryAction,SIGNAL(triggered()),exportLibraryDialog,SLOT(show()));
|
connect(exportLibraryAction,SIGNAL(triggered()),exportLibraryDialog,SLOT(open()));
|
||||||
connect(importLibraryAction,SIGNAL(triggered()),this,SLOT(importLibraryPackage()));
|
connect(importLibraryAction,SIGNAL(triggered()),this,SLOT(importLibraryPackage()));
|
||||||
|
|
||||||
connect(openLibraryAction,SIGNAL(triggered()),this,SLOT(showAddLibrary()));
|
connect(openLibraryAction,SIGNAL(triggered()),this,SLOT(showAddLibrary()));
|
||||||
@ -1560,7 +1560,7 @@ void LibraryWindow::setCurrentComicUnreaded() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::createLibrary() {
|
void LibraryWindow::createLibrary() {
|
||||||
createLibraryDialog->show(libraries);
|
createLibraryDialog->open(libraries);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::create(QString source, QString dest, QString name)
|
void LibraryWindow::create(QString source, QString dest, QString name)
|
||||||
@ -1598,7 +1598,7 @@ void LibraryWindow::openLastCreated()
|
|||||||
|
|
||||||
void LibraryWindow::showAddLibrary()
|
void LibraryWindow::showAddLibrary()
|
||||||
{
|
{
|
||||||
addLibraryDialog->show();
|
addLibraryDialog->open();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::openLibrary(QString path, QString name)
|
void LibraryWindow::openLibrary(QString path, QString name)
|
||||||
@ -1675,6 +1675,8 @@ void LibraryWindow::removeLibrary()
|
|||||||
QString currentLibrary = selectedLibrary->currentText();
|
QString currentLibrary = selectedLibrary->currentText();
|
||||||
QMessageBox * messageBox = new QMessageBox(tr("Are you sure?"),tr("Do you want remove ")+currentLibrary+tr(" library?"),QMessageBox::Question,QMessageBox::Yes,QMessageBox::YesToAll,QMessageBox::No);
|
QMessageBox * messageBox = new QMessageBox(tr("Are you sure?"),tr("Do you want remove ")+currentLibrary+tr(" library?"),QMessageBox::Question,QMessageBox::Yes,QMessageBox::YesToAll,QMessageBox::No);
|
||||||
messageBox->button(QMessageBox::YesToAll)->setText(tr("Remove and delete metadata"));
|
messageBox->button(QMessageBox::YesToAll)->setText(tr("Remove and delete metadata"));
|
||||||
|
messageBox->setParent(this);
|
||||||
|
messageBox->setWindowModality(Qt::WindowModal);
|
||||||
int ret = messageBox->exec();
|
int ret = messageBox->exec();
|
||||||
if(ret == QMessageBox::Yes)
|
if(ret == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
@ -1700,7 +1702,7 @@ void LibraryWindow::removeLibrary()
|
|||||||
|
|
||||||
void LibraryWindow::renameLibrary()
|
void LibraryWindow::renameLibrary()
|
||||||
{
|
{
|
||||||
renameLibraryDialog->show();
|
renameLibraryDialog->open();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::rename(QString newName) //TODO replace
|
void LibraryWindow::rename(QString newName) //TODO replace
|
||||||
@ -2136,13 +2138,13 @@ void LibraryWindow::hideComicFlow(bool hide)
|
|||||||
void LibraryWindow::showExportComicsInfo()
|
void LibraryWindow::showExportComicsInfo()
|
||||||
{
|
{
|
||||||
exportComicsInfoDialog->source = currentPath() + "/.yacreaderlibrary/library.ydb";
|
exportComicsInfoDialog->source = currentPath() + "/.yacreaderlibrary/library.ydb";
|
||||||
exportComicsInfoDialog->show();
|
exportComicsInfoDialog->open();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::showImportComicsInfo()
|
void LibraryWindow::showImportComicsInfo()
|
||||||
{
|
{
|
||||||
importComicsInfoDialog->dest = currentPath() + "/.yacreaderlibrary/library.ydb";
|
importComicsInfoDialog->dest = currentPath() + "/.yacreaderlibrary/library.ydb";
|
||||||
importComicsInfoDialog->show();
|
importComicsInfoDialog->open();
|
||||||
}
|
}
|
||||||
#include "startup.h"
|
#include "startup.h"
|
||||||
extern Startup * s;
|
extern Startup * s;
|
||||||
@ -2345,7 +2347,7 @@ void LibraryWindow::libraryAlreadyExists(const QString & name)
|
|||||||
|
|
||||||
void LibraryWindow::importLibraryPackage()
|
void LibraryWindow::importLibraryPackage()
|
||||||
{
|
{
|
||||||
importLibraryDialog->show(libraries);
|
importLibraryDialog->open(libraries);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::updateComicsView(quint64 libraryId, const ComicDB & comic)
|
void LibraryWindow::updateComicsView(quint64 libraryId, const ComicDB & comic)
|
||||||
|
|||||||
Reference in New Issue
Block a user