reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 350bbe4fa30073206ecb0906e20873c662980e44
parent 1da03cb552d134f8da4a6ee5d2c9de90ec741376
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sat,  2 Apr 2016 12:02:17 -0700

tiny bit of refactoring

Diffstat:
Msrc/about.cpp | 7+------
Msrc/config.cpp | 2--
Msrc/reapack.cpp | 11+++++------
3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/about.cpp b/src/about.cpp @@ -108,12 +108,7 @@ void About::onCommand(const int id, int) void About::onContextMenu(HWND target, const int x, const int y) { - if(target != m_packages->handle()) - return; - - const int packageIndex = m_packages->currentIndex(); - - if(packageIndex < 0) + if(target != m_packages->handle() || m_packages->currentIndex() < 0) return; Menu menu; diff --git a/src/config.cpp b/src/config.cpp @@ -26,8 +26,6 @@ #include <swell/swell.h> #endif -#include <reaper_plugin_functions.h> - using namespace std; static const char *GLOBAL_GRP = "reapack"; diff --git a/src/reapack.cpp b/src/reapack.cpp @@ -364,6 +364,10 @@ void ReaPack::fetchIndexes(const vector<Remote> &remotes, if(!parent) parent = m_mainWindow; + // I don't know why, but at least on OSX giving the manager window handle + // (in `parent`) to the progress dialog prevents it from being shown at all + // while still taking the focus away from the manager dialog. + DownloadQueue *queue = new DownloadQueue; Dialog *progress = Dialog::Create<Progress>(m_instance, m_mainWindow, queue); @@ -388,16 +392,11 @@ void ReaPack::fetchIndexes(const vector<Remote> &remotes, queue->onDone(load); - // I don't know why, but at least on OSX giving the manager window handle - // (in `parent`) to the progress dialog prevents it from being shown at all - // while still taking the focus away from the manager dialog. - for(const Remote &remote : remotes) fetchIndex(remote, queue, parent); - if(queue->idle()) { + if(queue->idle()) load(); - } } void ReaPack::fetchIndex(const Remote &remote, DownloadQueue *queue, HWND parent)