Changeset View
Changeset View
Standalone View
Standalone View
src/source.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | |||||
64 | 64 | | |||
65 | bool Source::isDefault() const | 65 | bool Source::isDefault() const | ||
66 | { | 66 | { | ||
67 | return context()->server()->defaultSource() == this; | 67 | return context()->server()->defaultSource() == this; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | void Source::setDefault(bool enable) | 70 | void Source::setDefault(bool enable) | ||
71 | { | 71 | { | ||
72 | if (enable) { | 72 | if (!isDefault() && enable) { | ||
73 | context()->server()->setDefaultSource(this); | 73 | context()->server()->setDefaultSource(this); | ||
74 | } | 74 | } | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | } // QPulseAudio | 77 | } // QPulseAudio |