diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2009-08-30 21:44:26 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2009-08-31 01:06:25 +0400 |
commit | 6742f2b8d7b049c6f248216970bcb6ff19347bfa (patch) | |
tree | e8876b06b0f9f21dc1433483af35e6d69717b5d4 /src/mumble/ACLEditor.cpp | |
parent | 4393235b48413021123a4a3fbd7580deeeb60225 (diff) |
Add Channel position QSpinBox to advanced ACL editor.
Diffstat (limited to 'src/mumble/ACLEditor.cpp')
-rw-r--r-- | src/mumble/ACLEditor.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mumble/ACLEditor.cpp b/src/mumble/ACLEditor.cpp index 638c15221..62c6615dc 100644 --- a/src/mumble/ACLEditor.cpp +++ b/src/mumble/ACLEditor.cpp @@ -48,10 +48,17 @@ ACLEditor::ACLEditor(int channelparentid, QWidget *p) : QDialog(p) { setupUi(this); + qsbChannelPosition->setRange(INT_MIN, INT_MAX); + setWindowTitle(tr("Mumble - Add channel")); qtwTab->removeTab(2); qtwTab->removeTab(1); + if (!g.s.bAdvancedACLCfg) { + qsbChannelPosition->hide(); + qlChannelPosition->hide(); + } + // Until I come around implementing it hide the password fields qleChannelPassword->hide(); qlChannelPassword->hide(); @@ -82,6 +89,8 @@ ACLEditor::ACLEditor(int channelid, const MumbleProto::ACL &mea, QWidget *p) : Q if (!g.s.bAdvancedACLCfg) { qtwTab->removeTab(2); qtwTab->removeTab(1); + qsbChannelPosition->hide(); + qlChannelPosition->hide(); } qcbChannelTemporary->hide(); @@ -93,6 +102,9 @@ ACLEditor::ACLEditor(int channelid, const MumbleProto::ACL &mea, QWidget *p) : Q qteChannelDescription->setPlainText(pChannel->qsDesc); + qsbChannelPosition->setRange(INT_MIN, INT_MAX); + qsbChannelPosition->setValue(pChannel->iPosition); + QGridLayout *grid = new QGridLayout(qgbACLpermissions); l=new QLabel(tr("Deny"), qgbACLpermissions); @@ -243,6 +255,7 @@ void ACLEditor::accept() { mpcs.set_name(u8(qleChannelName->text())); mpcs.set_description(u8(qteChannelDescription->toPlainText())); mpcs.set_parent(iChannel); + mpcs.set_position(qsbChannelPosition->value()); mpcs.set_temporary(qcbChannelTemporary->isChecked()); g.sh->sendMessage(mpcs); } else { @@ -260,6 +273,10 @@ void ACLEditor::accept() { mpcs.set_description(u8(qteChannelDescription->toPlainText())); b = true; } + if (pChannel->iPosition != qsbChannelPosition->value()) { + mpcs.set_position(qsbChannelPosition->value()); + b = true; + } if (b) g.sh->sendMessage(mpcs); // Update ACL |