Revision 1795 trunk/client/gui_qt/mainwindow.cpp
| mainwindow.cpp (revision 1795) | ||
|---|---|---|
| 16 | 16 |
#include "icon_64x64.xpm" |
| 17 | 17 |
#pragma GCC diagnostic warning "-Wwrite-strings" |
| 18 | 18 |
|
| 19 |
MainWindow::MainWindow(QNNTPGrabGlue *glue, QtSingleApplication *app, QWidget *parent) : |
|
| 19 |
MainWindow::MainWindow(QNNTPGrabGlue *glue, NGApplication *app, QWidget *parent) : |
|
| 20 | 20 |
QMainWindow(parent), |
| 21 | 21 |
ui(new Ui::MainWindow) |
| 22 | 22 |
{
|
| ... | ... | |
| 71 | 71 |
|
| 72 | 72 |
this->setWindowIcon(icon); |
| 73 | 73 |
|
| 74 |
#ifdef Q_OS_MAC |
|
| 75 |
/* Register the file association for OSX (other platforms use a different method) */ |
|
| 76 |
connect(app, SIGNAL(loadFile(QString)), SLOT(loadNZBFile(QString))); |
|
| 77 |
#endif |
|
| 78 |
|
|
| 74 | 79 |
connect(ui->actionImportNZBFile, SIGNAL(triggered(void)), |
| 75 | 80 |
SLOT(actionImportNZB_activated(void))); |
| 76 | 81 |
connect(ui->actionPauseDownloadQueue, SIGNAL(triggered(void)), |
| ... | ... | |
| 145 | 150 |
QFile f(arg); |
| 146 | 151 |
if (f.exists()) {
|
| 147 | 152 |
/* Try to open it */ |
| 148 |
DialogImportNZB d(glue); |
|
| 149 |
d.readNZBFile(arg); |
|
| 150 |
d.exec(); |
|
| 153 |
loadNZBFile(arg); |
|
| 151 | 154 |
} |
| 152 | 155 |
} |
| 153 | 156 |
} |
| ... | ... | |
| 363 | 366 |
} |
| 364 | 367 |
} |
| 365 | 368 |
|
| 369 |
void MainWindow::loadNZBFile(QString filename) |
|
| 370 |
{
|
|
| 371 |
DialogImportNZB d(glue); |
|
| 372 |
d.readNZBFile(filename); |
|
| 373 |
d.exec(); |
|
| 374 |
} |
|
| 375 |
|
|
| 366 | 376 |
void MainWindow::showTrayIcon() |
| 367 | 377 |
{
|
| 368 | 378 |
QPixmap pixmap(icon_64x64_xpm); |
Also available in: Unified diff
NNTPGrab

