From 4dc3538a7d14dd0f1aaa2e6c172745b63e251c86 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 4 Jan 2014 15:57:14 +0100 Subject: - nxmhandler will now ask before registering itself - downloads from nexus are now displayed before file information is retrieved - logging from the ui is now a bit more informative - download list now scrolls to bottom automatically --- src/mainwindow.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3a543e0b..ee7ee139 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -230,9 +230,9 @@ MainWindow::MainWindow(const QString &exeName, QSettings &initSettings, QWidget ui->savegameList->installEventFilter(this); ui->savegameList->setMouseTracking(true); - connect(&m_DownloadManager, SIGNAL(showMessage(QString)), this, SLOT(showMessage(QString))); connect(&m_DownloadManager, SIGNAL(downloadSpeed(QString,int)), this, SLOT(downloadSpeed(QString,int))); + connect(&m_DownloadManager, SIGNAL(downloadAdded()), ui->downloadView, SLOT(scrollToBottom())); connect(ui->savegameList, SIGNAL(itemEntered(QListWidgetItem*)), this, SLOT(saveSelectionChanged(QListWidgetItem*))); @@ -780,6 +780,8 @@ void MainWindow::showEvent(QShowEvent *event) ui->groupCombo->setCurrentIndex(grouping); allowListResize(); + + m_Settings.registerAsNXMHandler(false); } @@ -4024,15 +4026,10 @@ void MainWindow::on_actionSettings_triggered() NexusInterface::instance()->setNMMVersion(m_Settings.getNMMVersion()); } + void MainWindow::on_actionNexus_triggered() { - std::wstring nxmPath = ToWString(QApplication::applicationDirPath() + "/nxmhandler.exe"); - std::wstring executable = ToWString(QApplication::applicationFilePath()); - ::ShellExecuteW(NULL, L"open", nxmPath.c_str(), - (std::wstring(L"reg ") + GameInfo::instance().getGameShortName() + L" \"" + executable + L"\"").c_str(), NULL, SW_SHOWNORMAL); - ::ShellExecuteW(NULL, L"open", GameInfo::instance().getNexusPage(false).c_str(), NULL, NULL, SW_SHOWNORMAL); - ui->tabWidget->setCurrentIndex(4); } @@ -4052,6 +4049,7 @@ void MainWindow::linkClicked(const QString &url) void MainWindow::downloadRequestedNXM(const QString &url) { QString username, password; + qDebug("download requested: %s", qPrintable(url)); if (!m_LoginAttempted && !NexusInterface::instance()->getAccessManager()->loggedIn() && (m_Settings.getNexusLogin(username, password) || -- cgit v1.3.1