From bfbb19099839019c785dc81c83b07dadbd394168 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 27 May 2016 14:04:00 +0200 Subject: moved button to switch instance (and to portable mode) to the main window --- src/resources.qrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/resources.qrc') diff --git a/src/resources.qrc b/src/resources.qrc index 8434b367..d357801c 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -26,7 +26,6 @@ resources/software-update-available.png resources/emblem-important.png resources/check.png - mo_icon.ico resources/dialog-warning.png resources/symbol-backup.png resources/applications-accessories.png @@ -68,6 +67,8 @@ resources/status_active.png resources/status_awaiting.png resources/status_inactive.png + resources/mo_icon.png + resources/package.png resources/contents/jigsaw-piece.png -- cgit v1.3.1 From 3cf3de700eeac08867d509e478449e46d7ff9f12 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Wed, 8 Nov 2017 19:30:20 -0600 Subject: Add MCM detection (but doesn't fix loading issues :() --- src/modinfo.cpp | 1 + src/modinfo.h | 3 ++- src/modinforegular.cpp | 2 ++ src/modlist.cpp | 3 ++- src/resources.qrc | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/resources.qrc') diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 7cb4b4ba..5d3c1e41 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -99,6 +99,7 @@ QString ModInfo::getContentTypeName(int contentType) case CONTENT_SCRIPT: return tr("Scripts"); case CONTENT_SKSE: return tr("SKSE Plugins"); case CONTENT_SKYPROC: return tr("SkyProc Tools"); + case CONTENT_MCM: return tr("MCM Data"); default: throw MyException(tr("invalid content type %1").arg(contentType)); } } diff --git a/src/modinfo.h b/src/modinfo.h index 501588ec..1485a4b3 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -79,7 +79,8 @@ public: CONTENT_SOUND, CONTENT_SCRIPT, CONTENT_SKSE, - CONTENT_SKYPROC + CONTENT_SKYPROC, + CONTENT_MCM }; static const int NUM_CONTENT_TYPES = CONTENT_SKYPROC + 1; diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index 1194f604..c296d792 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -458,6 +458,8 @@ std::vector ModInfoRegular::getContents() const m_CachedContent.push_back(CONTENT_SCRIPT); if (dir.exists("SkyProc Patchers")) m_CachedContent.push_back(CONTENT_SKYPROC); + if (dir.exists("MCM")) + m_CachedContent.push_back(CONTENT_MCM); m_LastContentCheck = QTime::currentTime(); } diff --git a/src/modlist.cpp b/src/modlist.cpp index 0aea7a98..ffbdee95 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -60,7 +60,7 @@ ModList::ModList(QObject *parent) , m_FontMetrics(QFont()) , m_DropOnItems(false) { - m_ContentIcons[ModInfo::CONTENT_PLUGIN] = std::make_tuple(":/MO/gui/content/plugin", tr("Game plugins (esp/esm/esl)")); + m_ContentIcons[ModInfo::CONTENT_PLUGIN] = std::make_tuple(":/MO/gui/content/plugin", tr("Game Plugins (ESP/ESM/ESL)")); m_ContentIcons[ModInfo::CONTENT_INTERFACE] = std::make_tuple(":/MO/gui/content/interface", tr("Interface")); m_ContentIcons[ModInfo::CONTENT_MESH] = std::make_tuple(":/MO/gui/content/mesh", tr("Meshes")); m_ContentIcons[ModInfo::CONTENT_BSA] = std::make_tuple(":/MO/gui/content/bsa", tr("BSA")); @@ -69,6 +69,7 @@ ModList::ModList(QObject *parent) m_ContentIcons[ModInfo::CONTENT_SKYPROC] = std::make_tuple(":/MO/gui/content/skyproc", tr("SkyProc Patcher")); m_ContentIcons[ModInfo::CONTENT_SOUND] = std::make_tuple(":/MO/gui/content/sound", tr("Sound or Music")); m_ContentIcons[ModInfo::CONTENT_TEXTURE] = std::make_tuple(":/MO/gui/content/texture", tr("Textures")); + m_ContentIcons[ModInfo::CONTENT_MCM] = std::make_tuple(":/MO/gui/content/menu", tr("MCM Configuration")); m_LastCheck.start(); } diff --git a/src/resources.qrc b/src/resources.qrc index d357801c..e88eda06 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -82,6 +82,7 @@ resources/contents/breastplate.png resources/contents/conversation.png resources/contents/locked-chest.png + resources/contents/config.png qt.conf -- cgit v1.3.1 From 61898074fe87fc97b399fba67006339bbedf6950 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Sun, 18 Feb 2018 16:43:16 +0100 Subject: Changed switch instance icon and tooltip --- src/mainwindow.ui | 4 ++-- src/resources.qrc | 2 ++ src/resources/switch-instance-icon.png | Bin 0 -> 57516 bytes 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 src/resources/switch-instance-icon.png (limited to 'src/resources.qrc') diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 49f313ca..0f7560c3 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1540,13 +1540,13 @@ Right now this has very limited functionality - :/MO/gui/app_icon:/MO/gui/app_icon + :/MO/gui/instance_switch:/MO/gui/instance_switch Change Game - Open the game selection dialog + Open the Instance selection dialog to manage a different Game diff --git a/src/resources.qrc b/src/resources.qrc index e88eda06..9b66a38c 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -15,6 +15,7 @@ resources/document-properties.png resources/go-up.png resources/go-down.png + resources/switch-instance-icon.png resources/contact-new.png resources/preferences-system.png resources/application-x-executable.png @@ -69,6 +70,7 @@ resources/status_inactive.png resources/mo_icon.png resources/package.png + resources/switch-instance-icon.png resources/contents/jigsaw-piece.png diff --git a/src/resources/switch-instance-icon.png b/src/resources/switch-instance-icon.png new file mode 100644 index 00000000..b992babe Binary files /dev/null and b/src/resources/switch-instance-icon.png differ -- cgit v1.3.1 From c1421d07345617e7776dd8bdf0aec4dbef52a72a Mon Sep 17 00:00:00 2001 From: Al12rs Date: Wed, 28 Feb 2018 20:57:08 +0100 Subject: - Added Open Folders drop-down menu over the modlist (using new custom icon) and moved there all previuolsy added "open <> folder" menu options. - Added "Open MO install folder" option. --- src/mainwindow.cpp | 52 ++++++++++++++++++++++++------------- src/mainwindow.h | 3 +++ src/mainwindow.ui | 31 ++++++++++++++++++++-- src/resources.qrc | 3 ++- src/resources/open-Folder-Icon.png | Bin 0 -> 17646 bytes 5 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 src/resources/open-Folder-Icon.png (limited to 'src/resources.qrc') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index abac9317..fe93b546 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -301,6 +301,8 @@ MainWindow::MainWindow(QSettings &initSettings ui->listOptionsBtn->setMenu(modListContextMenu()); + ui->openFolderMenu->setMenu(openFolderMenu()); + updateDownloadListDelegate(); ui->savegameList->installEventFilter(this); @@ -3033,6 +3035,11 @@ void MainWindow::openInstanceFolder() ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.settings().getBaseDirectory()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); } +void MainWindow::openInstallFolder() +{ + ::ShellExecuteW(nullptr, L"explore", ToWString(qApp->applicationDirPath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); +} + void MainWindow::openProfileFolder() { ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.currentProfile()->absolutePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); @@ -3219,6 +3226,30 @@ static void addMenuAsPushButton(QMenu *menu, QMenu *subMenu) menu->addAction(action); } +QMenu *MainWindow::openFolderMenu() +{ + + QMenu *FolderMenu = new QMenu(this); + + + FolderMenu->addAction(tr("Open Instance folder"), this, SLOT(openInstanceFolder())); + + FolderMenu->addAction(tr("Open Profile folder"), this, SLOT(openProfileFolder())); + + FolderMenu->addAction(tr("Open Downloads folder"), this, SLOT(openDownloadsFolder())); + + FolderMenu->addAction(tr("Open MO Install folder"), this, SLOT(openInstallFolder())); + + FolderMenu->addSeparator(); + + FolderMenu->addAction(tr("Open Game folder"), this, SLOT(openGameFolder())); + + FolderMenu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder())); + + + return FolderMenu; +} + QMenu *MainWindow::modListContextMenu() { QMenu *menu = new QMenu(this); @@ -3237,24 +3268,6 @@ QMenu *MainWindow::modListContextMenu() menu->addAction(tr("Export to csv..."), this, SLOT(exportModListCSV())); - menu->addSeparator(); - - QMenu *openSubMenu = new QMenu(this); - - - openSubMenu->addAction(tr("Open Instance folder"), this, SLOT(openInstanceFolder())); - - openSubMenu->addAction(tr("Open Profile folder"), this, SLOT(openProfileFolder())); - - openSubMenu->addAction(tr("Open Downloads folder"), this, SLOT(openDownloadsFolder())); - - openSubMenu->addAction(tr("Open Game folder"), this, SLOT(openGameFolder())); - - openSubMenu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder())); - - openSubMenu->setTitle(tr("Open Folder...")); - - menu->addMenu(openSubMenu); return menu; } @@ -3698,6 +3711,9 @@ void MainWindow::languageChange(const QString &newLanguage) updateProblemsButton(); ui->listOptionsBtn->setMenu(modListContextMenu()); + + ui->openFolderMenu->setMenu(openFolderMenu()); + } void MainWindow::writeDataToFile(QFile &file, const QString &directory, const DirectoryEntry &directoryEntry) diff --git a/src/mainwindow.h b/src/mainwindow.h index b7eca72e..2c2e2723 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -277,6 +277,8 @@ private: QMenu *modListContextMenu(); + QMenu *openFolderMenu(); + std::set enabledArchives(); void scheduleUpdateButton(); @@ -485,6 +487,7 @@ private slots: void disableVisibleMods(); void exportModListCSV(); void openInstanceFolder(); + void openInstallFolder(); void openDownloadsFolder(); void openProfileFolder(); void openGameFolder(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index f9e64349..31522c03 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -176,7 +176,7 @@ 2 - + @@ -247,10 +247,34 @@ p, li { white-space: pre-wrap; } 16 16 + + + + + + + Quickly open in Explorer relevant Folders... + + + + + + + :/MO/gui/open_folder:/MO/gui/open_folder + + + + + + + + + + Restore Backup... @@ -439,7 +463,7 @@ p, li { white-space: pre-wrap; } - + @@ -944,6 +968,9 @@ p, li { white-space: pre-wrap; } + + + Archives diff --git a/src/resources.qrc b/src/resources.qrc index 9b66a38c..618d3cfc 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -70,7 +70,8 @@ resources/status_inactive.png resources/mo_icon.png resources/package.png - resources/switch-instance-icon.png + resources/switch-instance-icon.png + resources/open-Folder-Icon.png resources/contents/jigsaw-piece.png diff --git a/src/resources/open-Folder-Icon.png b/src/resources/open-Folder-Icon.png new file mode 100644 index 00000000..345671f7 Binary files /dev/null and b/src/resources/open-Folder-Icon.png differ -- cgit v1.3.1