fix bash-completion (uuid) + connect/disconnect error message (to/from) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Wed, 14 Oct 2020 17:45:48 +0200
branchv_0
changeset 16 79520ded76f0
parent 15 463ce61415f1
child 17 4e6b33312c5a
fix bash-completion (uuid) + connect/disconnect error message (to/from)
bash-completion.sh
src/JackCommand.h
--- a/bash-completion.sh	Sun Oct 11 17:13:02 2020 +0200
+++ b/bash-completion.sh	Wed Oct 14 17:45:48 2020 +0200
@@ -19,7 +19,7 @@
 	if type relpipe-in-jack &> /dev/null && type relpipe-out-nullbyte &> /dev/null; then
 		relpipe-in-jack --list-ports true --list-midi-messages false 2>/dev/null \
 			| relpipe-out-nullbyte \
-			| while _relpipe_in_jack_completion_read_nullbyte "name" "input" "output" "physical" "terminal" "mine" "midi" "type"; do
+			| while _relpipe_in_jack_completion_read_nullbyte "name" "uuid" "input" "output" "physical" "terminal" "mine" "midi" "type"; do
 				 if [[ "$midi" = "true" && "${!1}" = "true" && "$mine" = "false" ]]; then echo "$name"; fi; done
 	fi
 }
--- a/src/JackCommand.h	Sun Oct 11 17:13:02 2020 +0200
+++ b/src/JackCommand.h	Wed Oct 14 17:45:48 2020 +0200
@@ -290,7 +290,7 @@
 		for (Configuration::ConnectionRecipe recipe : configuration.connectionRecipes) {
 			auto operation = recipe.connected ? jack_connect : jack_disconnect;
 			int result = operation(realTimeContext.jackClient, convertor.to_bytes(recipe.sourcePort).c_str(), convertor.to_bytes(recipe.destinationPort).c_str());
-			if (result != 0 && result != EEXIST) std::wcerr << L"Unable to " << (recipe.connected ? L"connect" : L"disconnect") << L": „" << recipe.sourcePort << L"“ to: „" << recipe.destinationPort << L"“." << std::endl;
+			if (result != 0 && result != EEXIST) std::wcerr << L"Unable to " << (recipe.connected ? L"connect" : L"disconnect") << L": „" << recipe.sourcePort << (recipe.connected ? L"“ to: „" : L"“ from: „") << recipe.destinationPort << L"“." << std::endl;
 		}
 	}