Changed TerminalStart quotes, Added Kill zLeave function

remotes/origin/HEAD
Tobias Weiss 9 years ago
parent 072bca9c2c
commit 910fe0ed55

@ -158,12 +158,12 @@ void lc::Client::OpenTerminal( const QString &argCommand, const bool &argOpenAsR
arguments = new QStringList; arguments = new QStringList;
if ( !argOpenAsRoot ) { if ( !argOpenAsRoot ) {
*arguments << "-e" *arguments << "-e"
<< QString{ "'" + settings->sshCmd + " -i " + settings->pkeyPathUser + " " << QString{ settings->sshCmd + " -i " + settings->pkeyPathUser + " "
+ settings->userNameOnClients + "@" + ip + "'"}; + settings->userNameOnClients + "@" + ip };
} else { } else {
*arguments << "-e" << *arguments << "-e" <<
QString{ "'" + settings->sshCmd + " -i " + settings->pkeyPathRoot QString{ settings->sshCmd + " -i " + settings->pkeyPathRoot
+ " " + "root@" + ip + "'"}; + " " + "root@" + ip};
} }
if ( !argCommand.isEmpty() ) { if ( !argCommand.isEmpty() ) {

@ -48,6 +48,7 @@ public:
const int defaultReceiptIndex = 0; const int defaultReceiptIndex = 0;
const QString browserCmd; const QString browserCmd;
const QString clientBrowserCmd;
const QString dvipsCmd; const QString dvipsCmd;
const QString fileMngr; const QString fileMngr;
const QString killallCmd; const QString killallCmd;
@ -84,7 +85,6 @@ public:
const QStringList installedLaTeXHeaders; const QStringList installedLaTeXHeaders;
const QStringList installedZTreeVersions; const QStringList installedZTreeVersions;
const quint16 clientHelpNotificationServerPort = 0; const quint16 clientHelpNotificationServerPort = 0;
const QString clientBrowserCmd;
private: private:
static bool CheckPathAndComplain( const QString &argPath, const QString &argVariableName, static bool CheckPathAndComplain( const QString &argPath, const QString &argVariableName,

@ -429,6 +429,7 @@ void lc::MainWindow::on_PBOpenFilesystem_clicked() {
delete userToBeUsed; delete userToBeUsed;
} }
// Issue open terminal call
void lc::MainWindow::on_PBOpenTerminal_clicked() { void lc::MainWindow::on_PBOpenTerminal_clicked() {
QString pkeyPathUser; QString pkeyPathUser;
if ( ui->RBUseUserRoot->isChecked() ) { if ( ui->RBUseUserRoot->isChecked() ) {
@ -816,6 +817,20 @@ void lc::MainWindow::GetNewDataTargetPath() {
} }
} }
// Dummy function for enabling anonymous receipts section in UI
void lc::MainWindow::on_CBReceiptsHeader_activated(int argIndex)
{
Q_UNUSED( argIndex );
ui->CBReceiptsHeader->setStyleSheet( "" );
}
// Anonymous receipients header check box
void lc::MainWindow::on_ChBPrintanonymousreceipts_clicked()
{
ui->LReplaceParticipantNames->setEnabled(true);
ui->CBReplaceParticipantNames->setEnabled(true);
}
// Start session button actions // Start session button actions
void lc::MainWindow::on_PBStartSession_clicked() { void lc::MainWindow::on_PBStartSession_clicked() {
@ -875,15 +890,13 @@ void lc::MainWindow::on_PBStartSession_clicked() {
ui->SBPort->setValue(newPort); ui->SBPort->setValue(newPort);
} }
// Anonymous receipients header check box void lc::MainWindow::on_PBKillzLeaf_clicked()
void lc::MainWindow::on_ChBPrintanonymousreceipts_clicked()
{ {
ui->LReplaceParticipantNames->setEnabled(true); QModelIndexList activated_items = ui->TVClients->selectionModel()->selectedIndexes();
ui->CBReplaceParticipantNames->setEnabled(true); for ( QModelIndexList::ConstIterator it = activated_items.cbegin(); it != activated_items.cend(); ++it ) {
if ( ( *it ).data( Qt::DisplayRole ).type() != 0 ) {
Client *client = static_cast< Client* >( ( *it ).data( Qt::UserRole ).value< void * >() );
client->KillZLeaf();
}
} }
void lc::MainWindow::on_CBReceiptsHeader_activated(int argIndex)
{
Q_UNUSED( argIndex );
ui->CBReceiptsHeader->setStyleSheet( "" );
} }

@ -128,6 +128,7 @@ private slots:
void on_CBDataTargetPath_activated( int argIndex ); void on_CBDataTargetPath_activated( int argIndex );
void on_CBReceiptsHeader_activated(int argIndex); void on_CBReceiptsHeader_activated(int argIndex);
void on_ChBPrintanonymousreceipts_clicked(); void on_ChBPrintanonymousreceipts_clicked();
void on_PBKillzLeaf_clicked();
}; };
} }

@ -64,7 +64,7 @@
</font> </font>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>2</number>
</property> </property>
<property name="usesScrollButtons"> <property name="usesScrollButtons">
<bool>true</bool> <bool>true</bool>
@ -1075,7 +1075,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<attribute name="horizontalHeaderVisible"> <attribute name="horizontalHeaderVisible">
<bool>true</bool> <bool>false</bool>
</attribute> </attribute>
<attribute name="horizontalHeaderCascadingSectionResizes"> <attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool> <bool>true</bool>
@ -1090,7 +1090,7 @@
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
<attribute name="verticalHeaderVisible"> <attribute name="verticalHeaderVisible">
<bool>true</bool> <bool>false</bool>
</attribute> </attribute>
<attribute name="verticalHeaderDefaultSectionSize"> <attribute name="verticalHeaderDefaultSectionSize">
<number>35</number> <number>35</number>

Loading…
Cancel
Save