mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Add elide mode for the audio devices, and store configdialog geometry.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1476 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
parent
048343f81e
commit
b4258dc586
@ -79,6 +79,8 @@ AudioInputDialog::AudioInputDialog(Settings &st) : ConfigWidget(st) {
|
||||
abSpeech->qcInside = Qt::yellow;
|
||||
abSpeech->qcAbove = Qt::green;
|
||||
|
||||
qcbDevice->view()->setTextElideMode(Qt::ElideRight);
|
||||
|
||||
on_Tick_timeout();
|
||||
}
|
||||
|
||||
@ -270,9 +272,14 @@ void AudioInputDialog::on_qcbSystem_currentIndexChanged(int) {
|
||||
AudioInputRegistrar *air = AudioInputRegistrar::qmNew->value(qcbSystem->currentText());
|
||||
ql = air->getDeviceChoices();
|
||||
|
||||
int idx = 0;
|
||||
|
||||
foreach(audioDevice d, ql) {
|
||||
qcbDevice->addItem(d.first, d.second);
|
||||
qcbDevice->setItemData(idx, d.first, Qt::ToolTipRole);
|
||||
++idx;
|
||||
}
|
||||
|
||||
qcbEcho->setEnabled(air->canEcho(s.qsAudioOutput));
|
||||
}
|
||||
|
||||
@ -313,6 +320,8 @@ AudioOutputDialog::AudioOutputDialog(Settings &st) : ConfigWidget(st) {
|
||||
qcbLoopback->addItem(tr("None"), Settings::None);
|
||||
qcbLoopback->addItem(tr("Local"), Settings::Local);
|
||||
qcbLoopback->addItem(tr("Server"), Settings::Server);
|
||||
|
||||
qcbDevice->view()->setTextElideMode(Qt::ElideRight);
|
||||
}
|
||||
|
||||
QString AudioOutputDialog::title() const {
|
||||
@ -389,8 +398,12 @@ void AudioOutputDialog::on_qcbSystem_currentIndexChanged(int) {
|
||||
AudioOutputRegistrar *aor = AudioOutputRegistrar::qmNew->value(qcbSystem->currentText());
|
||||
ql = aor->getDeviceChoices();
|
||||
|
||||
int idx = 0;
|
||||
|
||||
foreach(audioDevice d, ql) {
|
||||
qcbDevice->addItem(d.first, d.second);
|
||||
qcbDevice->setItemData(idx, d.first, Qt::ToolTipRole);
|
||||
++idx;
|
||||
}
|
||||
bool canmute = aor->canMuteOthers();
|
||||
qsOtherVolume->setEnabled(canmute);
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>304</width>
|
||||
<height>649</height>
|
||||
<width>340</width>
|
||||
<height>555</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -32,7 +32,7 @@
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="qcbSystem" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -74,8 +74,8 @@
|
||||
<item row="0" column="4" >
|
||||
<widget class="QComboBox" name="qcbDevice" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
@ -85,6 +85,12 @@
|
||||
<property name="whatsThis" >
|
||||
<string><b>This is the output method to use for audio.</b><br />Most likely you want to use DirectSound.</string>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy" >
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength" >
|
||||
<number>16</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" >
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>383</width>
|
||||
<height>543</height>
|
||||
<width>321</width>
|
||||
<height>504</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -32,7 +32,7 @@
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="qcbSystem" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -74,8 +74,8 @@
|
||||
<item row="0" column="4" >
|
||||
<widget class="QComboBox" name="qcbDevice" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
@ -85,6 +85,12 @@
|
||||
<property name="whatsThis" >
|
||||
<string><b>This is the output method to use for audio.</b><br />Most likely you want to use DirectSound.</string>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy" >
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength" >
|
||||
<number>16</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" >
|
||||
@ -187,23 +193,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="text" >
|
||||
<string>Other Applications</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>qsVolume</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QLabel" name="qlOtherVolume" >
|
||||
<property name="text" >
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
@ -243,6 +232,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QLabel" name="qlOtherVolume" >
|
||||
<property name="text" >
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="text" >
|
||||
<string>Other Applications</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>qsVolume</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QSlider" name="qsOtherVolume" >
|
||||
<property name="toolTip" >
|
||||
@ -263,18 +269,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>label_17</zorder>
|
||||
<zorder>qsJitter</zorder>
|
||||
<zorder>qlJitter</zorder>
|
||||
<zorder>label_7</zorder>
|
||||
<zorder>qsVolume</zorder>
|
||||
<zorder>qlVolume</zorder>
|
||||
<zorder>label_6</zorder>
|
||||
<zorder>qsDelay</zorder>
|
||||
<zorder>qlDelay</zorder>
|
||||
<zorder>qlOtherVolume</zorder>
|
||||
<zorder>label_12</zorder>
|
||||
<zorder>qsOtherVolume</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@ -126,6 +126,9 @@ ConfigDialog::ConfigDialog(QWidget *p) : QDialog(p) {
|
||||
restoreButton->setWhatsThis(tr("This button will restore the settings for the current page only to their defaults. Other pages will be not be changed.<br />"
|
||||
"To restore all settings to their defaults, you will have to use this button on every page."
|
||||
));
|
||||
|
||||
if (! g.s.qbaConfigGeometry.isEmpty())
|
||||
restoreGeometry(g.s.qbaConfigGeometry);
|
||||
}
|
||||
|
||||
void ConfigDialog::addPage(ConfigWidget *cw, unsigned int idx) {
|
||||
@ -246,5 +249,6 @@ void ConfigDialog::apply() {
|
||||
|
||||
void ConfigDialog::accept() {
|
||||
apply();
|
||||
g.s.qbaConfigGeometry=saveGeometry();
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>449</width>
|
||||
<height>108</height>
|
||||
<width>600</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
|
||||
@ -276,6 +276,7 @@ void Settings::load() {
|
||||
SAVELOAD(qbaMainWindowGeometry, "ui/geometry");
|
||||
SAVELOAD(qbaMainWindowState, "ui/state");
|
||||
SAVELOAD(qbaMinimalViewGeometry, "ui/minimalviewgeometry");
|
||||
SAVELOAD(qbaConfigGeometry, "ui/ConfigGeometry");
|
||||
SAVELOAD(qbaSplitterState, "ui/splitter");
|
||||
SAVELOAD(qbaHeaderState, "ui/header");
|
||||
SAVELOAD(qsUsername, "ui/username");
|
||||
@ -412,6 +413,7 @@ void Settings::save() {
|
||||
SAVELOAD(qbaMainWindowGeometry, "ui/geometry");
|
||||
SAVELOAD(qbaMainWindowState, "ui/state");
|
||||
SAVELOAD(qbaMinimalViewGeometry, "ui/minimalviewgeometry");
|
||||
SAVELOAD(qbaConfigGeometry, "ui/ConfigGeometry");
|
||||
SAVELOAD(qbaSplitterState, "ui/splitter");
|
||||
SAVELOAD(qbaHeaderState, "ui/header");
|
||||
SAVELOAD(qsUsername, "ui/username");
|
||||
|
||||
@ -117,6 +117,7 @@ struct Settings {
|
||||
QString qsSkin;
|
||||
bool bFirstTime;
|
||||
QByteArray qbaMainWindowGeometry, qbaMainWindowState, qbaMinimalViewGeometry, qbaSplitterState, qbaHeaderState;
|
||||
QByteArray qbaConfigGeometry;
|
||||
ChannelExpand ceExpand;
|
||||
ChannelDrag ceChannelDrag;
|
||||
bool bMinimalView;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user