reapack

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

commit 1a7f399c5982624d4aaf7ea1a3fa104e4a4580e2
parent da20cd8d37bfffb8682dead5fe8c035810440161
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Wed,  6 Apr 2016 21:34:38 -0400

always show the repository name in post-import message boxes

and s/remote/repository

Diffstat:
Msrc/reapack.cpp | 24+++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/reapack.cpp b/src/reapack.cpp @@ -134,7 +134,7 @@ void ReaPack::synchronizeAll() const vector<Remote> &remotes = m_config->remotes()->getEnabled(); if(remotes.empty()) { - ShowMessageBox("No remote repository enabled, nothing to do!", + ShowMessageBox("No repository enabled, nothing to do!", "ReaPack", 0); return; @@ -237,24 +237,23 @@ void ReaPack::import(const Remote &remote) if(!existing.isNull()) { if(existing.isProtected()) { ShowMessageBox( - "This remote is protected and cannot be overwritten.", Import::TITLE, MB_OK); + "This repository is protected and cannot be overwritten.", Import::TITLE, MB_OK); return; } else if(existing.url() != remote.url()) { - const int button = ShowMessageBox( - "This remote is already configured.\r\n" - "Do you want to overwrite the current remote?" - , Import::TITLE, MB_YESNO); + const string msg = remote.name() + + " is already configured with a different URL.\r\n" + "Do you want to overwrite it?"; - if(button != IDYES) + if(ShowMessageBox(msg.c_str(), Import::TITLE, MB_YESNO) != IDYES) return; } else if(existing.isEnabled()) { - ShowMessageBox( - "This remote is already configured.\r\n" - "Nothing to do!" - , Import::TITLE, MB_OK); + const string msg = remote.name() + + " is already configured.\r\nNothing to do!"; + + ShowMessageBox(msg.c_str(), Import::TITLE, MB_OK); return; } @@ -264,6 +263,9 @@ void ReaPack::import(const Remote &remote) m_config->write(); + const string msg = remote.name() + " has been enabled."; + ShowMessageBox(msg.c_str(), Import::TITLE, MB_OK); + return; } }