Skip to content
Permalink
Browse files

Add hidden option to disable pubserver list (FR #1120)

Added ui/disablepubliclist which if set to true removes the
public server list in the connect dialog. This option isn't
available in the UI and is meant for customizing setups in
specific deployments.

On windows you can enable the option by creating a string key
disablepubliclist under HKEY_CURRENT_USER\Software\Mumble\Mumble\ui
with the value true.
  • Loading branch information...
hacst committed Mar 13, 2014
1 parent f2bfe2f commit fd5a9b12e082e6292b3fded923c15efc6efe7ade
Showing with 39 additions and 20 deletions.
  1. +24 −14 src/mumble/ConnectDialog.cpp
  2. +8 −4 src/mumble/Settings.cpp
  3. +7 −2 src/mumble/Settings.h
@@ -93,18 +93,25 @@ ServerView::ServerView(QWidget *p) : QTreeWidget(p) {
siLAN = NULL;
#endif

siPublic = new ServerItem(tr("Public Internet"), ServerItem::PublicType);
siPublic->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator);
addTopLevelItem(siPublic);

siPublic->setExpanded(false);

qmContinentNames.insert(QLatin1String("af"), tr("Africa"));
qmContinentNames.insert(QLatin1String("as"), tr("Asia"));
qmContinentNames.insert(QLatin1String("na"), tr("North America"));
qmContinentNames.insert(QLatin1String("sa"), tr("South America"));
qmContinentNames.insert(QLatin1String("eu"), tr("Europe"));
qmContinentNames.insert(QLatin1String("oc"), tr("Oceania"));
if (!g.s.disablePublicList) {
siPublic = new ServerItem(tr("Public Internet"), ServerItem::PublicType);
siPublic->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator);
addTopLevelItem(siPublic);


siPublic->setExpanded(false);

qmContinentNames.insert(QLatin1String("af"), tr("Africa"));
qmContinentNames.insert(QLatin1String("as"), tr("Asia"));
qmContinentNames.insert(QLatin1String("na"), tr("North America"));
qmContinentNames.insert(QLatin1String("sa"), tr("South America"));
qmContinentNames.insert(QLatin1String("eu"), tr("Europe"));
qmContinentNames.insert(QLatin1String("oc"), tr("Oceania"));
} else {
qWarning()<< "Public list disabled";

siPublic = NULL;
}
}

ServerView::~ServerView() {
@@ -878,8 +885,11 @@ ConnectDialog::ConnectDialog(QWidget *p, bool autoconnect) : QDialog(p), bAutoCo
connect(qusSocket4, SIGNAL(readyRead()), this, SLOT(udpReply()));
connect(qusSocket6, SIGNAL(readyRead()), this, SLOT(udpReply()));

if (qtwServers->siFavorite->isHidden() && (!qtwServers->siLAN || qtwServers->siLAN->isHidden()))
if (qtwServers->siFavorite->isHidden()
&& (!qtwServers->siLAN || qtwServers->siLAN->isHidden())
&& qtwServers->siPublic != NULL) {
qtwServers->siPublic->setExpanded(true);
}

iPingIndex = -1;
qtPingTick->start(50);
@@ -1147,7 +1157,7 @@ void ConnectDialog::on_qtwServers_currentItemChanged(QTreeWidgetItem *item, QTre
}

void ConnectDialog::on_qtwServers_itemExpanded(QTreeWidgetItem *item) {
if (item == qtwServers->siPublic) {
if (qtwServers->siPublic != NULL && item == qtwServers->siPublic) {
initList();
fillList();
}
@@ -384,9 +384,10 @@ Settings::Settings() {
rmRecordingMode = RecordingMixdown;
iRecordingFormat = 0;

// Codec kill-switch
// Special configuration options not exposed to UI
bDisableCELT = false;

disablePublicList = false;

// Config updates
uiUpdateCounter = 0;

@@ -690,8 +691,10 @@ void Settings::load(QSettings* settings_ptr) {
LOADENUM(rmRecordingMode, "recording/mode");
SAVELOAD(iRecordingFormat, "recording/format");

// Codec kill-switch
// Special configuration options not exposed to UI
SAVELOAD(bDisableCELT, "audio/disablecelt");
SAVELOAD(disablePublicList, "ui/disablepubliclist");


// LCD
SAVELOAD(iLCDUserViewMinColWidth, "lcd/userview/mincolwidth");
@@ -977,8 +980,9 @@ void Settings::save() {
SAVELOAD(rmRecordingMode, "recording/mode");
SAVELOAD(iRecordingFormat, "recording/format");

// Codec kill-switch
// Special configuration options not exposed to UI
SAVELOAD(bDisableCELT, "audio/disablecelt");
SAVELOAD(disablePublicList, "ui/disablepubliclist");

// LCD
SAVELOAD(iLCDUserViewMinColWidth, "lcd/userview/mincolwidth");
@@ -305,9 +305,14 @@ struct Settings {
RecordingMode rmRecordingMode;
int iRecordingFormat;

// Codec kill-switch
// Special configuration options not exposed to UI

/// Codec kill-switch
bool bDisableCELT;


/// Disables the "Public Internet" section in the connect dialog if set.
bool disablePublicList;

// Config updates
unsigned int uiUpdateCounter;

1 comment on commit fd5a9b1

@Tarun80

This comment has been minimized.

Copy link

commented on fd5a9b1 Mar 26, 2014

Please make this an option available in the GUI configuration options. That will keep unexperienced users out of the registry and risking messing something up.

Please sign in to comment.
You can’t perform that action at this time.