Skip to content

Commit

Permalink
Merge pull request #8356 from MilhouseVH/fix_export_dialog
Browse files Browse the repository at this point in the history
Fix inversion of export library dialogs, fix #16317, fix #16358
  • Loading branch information
Paxxi committed Nov 18, 2015
2 parents 5097981 + de6207b commit 46130fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions xbmc/dialogs/GUIDialogYesNo.cpp
Expand Up @@ -146,6 +146,7 @@ int CGUIDialogYesNo::ShowAndGetInput(const KODI::MESSAGING::HELPERS::DialogYesNo
SetChoice(1, options.yesLabel);
if (options.autoclose > 0)
SetAutoClose(options.autoclose);
m_bCanceled = false;

for (size_t i = 0; i < 3; ++i)
{
Expand Down
8 changes: 4 additions & 4 deletions xbmc/interfaces/builtins/LibraryBuiltins.cpp
Expand Up @@ -89,7 +89,7 @@ static int ExportLibrary(const std::vector<std::string>& params)
bool cancelled=false;

if (params.size() > 1)
singleFile = StringUtils::EqualsNoCase(params[1], "true");
singleFile = StringUtils::EqualsNoCase(params[1], "false");
else
{
HELPERS::DialogResponse result = HELPERS::ShowYesNoDialogText(CVariant{iHeading}, CVariant{20426}, CVariant{20428}, CVariant{20429});
Expand All @@ -100,7 +100,7 @@ static int ExportLibrary(const std::vector<std::string>& params)
if (cancelled)
return -1;

if (singleFile)
if (!singleFile)
{
if (params.size() > 2)
thumbs = StringUtils::EqualsNoCase(params[2], "true");
Expand Down Expand Up @@ -130,7 +130,7 @@ static int ExportLibrary(const std::vector<std::string>& params)
if (cancelled)
return -1;

if (singleFile)
if (!singleFile)
{
if (params.size() > 3)
overwrite = StringUtils::EqualsNoCase(params[3], "true");
Expand All @@ -147,7 +147,7 @@ static int ExportLibrary(const std::vector<std::string>& params)

if (params.size() > 2)
path=params[2];
if ((singleFile && !path.empty()) ||
if (!singleFile || !path.empty() ||
CGUIDialogFileBrowser::ShowAndGetDirectory(shares, g_localizeStrings.Get(661),
path, true))
{
Expand Down

0 comments on commit 46130fc

Please sign in to comment.