Commit f659af27 authored by jcaceres's avatar jcaceres
Browse files

add option DisconnectAll

parent ba330b59
......@@ -60,6 +60,7 @@ void main_dialog( int argc, char* argv[] )
opt->addUsage(" -c --connect inputfile.xml Load the connections specified at inputfile.xml");
opt->addUsage(" -s --save outputfile.xml Save current connections in output.xml");
opt->addUsage(" -d --disconnectall Disconnect all the connections");
opt->addUsage(" -D --DisconnectAll Disconnect all the connections without confirmation");
opt->addUsage("" );
//4. SET THE OPTION STRINGS/CHARACTERS
......@@ -70,6 +71,7 @@ void main_dialog( int argc, char* argv[] )
opt->setCommandOption("connect", 'c'); // an option (takes an argument)
opt->setCommandOption("save", 's');
opt->setCommandFlag( "disconnectall", 'd');
opt->setCommandFlag( "DisconnectAll", 'D');
// 5. PROCESS THE COMMANDLINE
......@@ -84,6 +86,7 @@ void main_dialog( int argc, char* argv[] )
return;
}
//6. GET THE VALUES
if(opt->getFlag("help"))
opt->printUsage();
......@@ -103,6 +106,9 @@ void main_dialog( int argc, char* argv[] )
}
}
if(opt->getValue("DisconnectAll"))
jmessClient.disconnectAll();
if(opt->getValue("connect") != NULL)
jmessClient.connectPorts(opt->getValue("connect"));
......
......@@ -21,7 +21,7 @@ qmake -project -o $APP_NAME.pro
echo "qmake .pro built."
#Create Makefile
qmake -makefile -o Makefile \
qmake -spec macx-g++ -o Makefile \
"CONFIG += release" \
"CONFIG -= app_bundle" \
"QT += xml" \
......@@ -33,6 +33,7 @@ qmake -makefile -o Makefile \
"QMAKE_CLEAN += ../bin/$APP_NAME" \
"target.path = /usr/bin" \
"INSTALLS += target" \
"QMAKE_CXXFLAGS += -D__MACOSX_CORE__" \
$APP_NAME.pro
echo "done"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment