use fallback icon scheme for stream icons, too
This commit is contained in:
parent
d98588b665
commit
b373c000ea
|
@ -37,34 +37,35 @@
|
||||||
|
|
||||||
/* Used for profile sorting */
|
/* Used for profile sorting */
|
||||||
struct profile_prio_compare {
|
struct profile_prio_compare {
|
||||||
bool operator() (const pa_card_profile_info& lhs, const pa_card_profile_info& rhs) const {
|
bool operator() (const pa_card_profile_info& lhs, const pa_card_profile_info& rhs) const {
|
||||||
|
|
||||||
if (lhs.priority == rhs.priority)
|
if (lhs.priority == rhs.priority)
|
||||||
return strcmp(lhs.name, rhs.name) > 0;
|
return strcmp(lhs.name, rhs.name) > 0;
|
||||||
|
|
||||||
return lhs.priority > rhs.priority;
|
return lhs.priority > rhs.priority;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sink_port_prio_compare {
|
struct sink_port_prio_compare {
|
||||||
bool operator() (const pa_sink_port_info& lhs, const pa_sink_port_info& rhs) const {
|
bool operator() (const pa_sink_port_info& lhs, const pa_sink_port_info& rhs) const {
|
||||||
|
|
||||||
if (lhs.priority == rhs.priority)
|
if (lhs.priority == rhs.priority)
|
||||||
return strcmp(lhs.name, rhs.name) > 0;
|
return strcmp(lhs.name, rhs.name) > 0;
|
||||||
|
|
||||||
return lhs.priority > rhs.priority;
|
return lhs.priority > rhs.priority;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct source_port_prio_compare {
|
struct source_port_prio_compare {
|
||||||
bool operator() (const pa_source_port_info& lhs, const pa_source_port_info& rhs) const {
|
bool operator() (const pa_source_port_info& lhs, const pa_source_port_info& rhs) const {
|
||||||
|
|
||||||
if (lhs.priority == rhs.priority)
|
if (lhs.priority == rhs.priority)
|
||||||
return strcmp(lhs.name, rhs.name) > 0;
|
return strcmp(lhs.name, rhs.name) > 0;
|
||||||
|
|
||||||
return lhs.priority > rhs.priority;
|
return lhs.priority > rhs.priority;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
|
MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
|
||||||
Gtk::Window(cobject),
|
Gtk::Window(cobject),
|
||||||
showSinkInputType(SINK_INPUT_CLIENT),
|
showSinkInputType(SINK_INPUT_CLIENT),
|
||||||
|
@ -236,12 +237,12 @@ void MainWindow::updateSink(const pa_sink_info &info) {
|
||||||
|
|
||||||
port_priorities.clear();
|
port_priorities.clear();
|
||||||
for (uint32_t i=0; i<info.n_ports; ++i) {
|
for (uint32_t i=0; i<info.n_ports; ++i) {
|
||||||
port_priorities.insert(*info.ports[i]);
|
port_priorities.insert(*info.ports[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
w->ports.clear();
|
w->ports.clear();
|
||||||
for (std::set<pa_sink_port_info>::iterator i = port_priorities.begin(); i != port_priorities.end(); ++i)
|
for (std::set<pa_sink_port_info>::iterator i = port_priorities.begin(); i != port_priorities.end(); ++i)
|
||||||
w->ports.push_back(std::pair<Glib::ustring,Glib::ustring>(i->name, i->description));
|
w->ports.push_back(std::pair<Glib::ustring,Glib::ustring>(i->name, i->description));
|
||||||
|
|
||||||
w->activePort = info.active_port ? info.active_port->name : "";
|
w->activePort = info.active_port ? info.active_port->name : "";
|
||||||
|
|
||||||
|
@ -398,12 +399,12 @@ void MainWindow::updateSource(const pa_source_info &info) {
|
||||||
|
|
||||||
port_priorities.clear();
|
port_priorities.clear();
|
||||||
for (uint32_t i=0; i<info.n_ports; ++i) {
|
for (uint32_t i=0; i<info.n_ports; ++i) {
|
||||||
port_priorities.insert(*info.ports[i]);
|
port_priorities.insert(*info.ports[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
w->ports.clear();
|
w->ports.clear();
|
||||||
for (std::set<pa_source_port_info>::iterator i = port_priorities.begin(); i != port_priorities.end(); ++i)
|
for (std::set<pa_source_port_info>::iterator i = port_priorities.begin(); i != port_priorities.end(); ++i)
|
||||||
w->ports.push_back(std::pair<Glib::ustring,Glib::ustring>(i->name, i->description));
|
w->ports.push_back(std::pair<Glib::ustring,Glib::ustring>(i->name, i->description));
|
||||||
|
|
||||||
w->activePort = info.active_port ? info.active_port->name : "";
|
w->activePort = info.active_port ? info.active_port->name : "";
|
||||||
|
|
||||||
|
@ -453,7 +454,7 @@ void MainWindow::setIconFromProplist(Gtk::Image *icon, pa_proplist *l, const cha
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
|
|
||||||
icon->set_from_icon_name(t, Gtk::ICON_SIZE_SMALL_TOOLBAR);
|
set_icon_name_fallback(icon, t, Gtk::ICON_SIZE_SMALL_TOOLBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateSinkInput(const pa_sink_input_info &info) {
|
void MainWindow::updateSinkInput(const pa_sink_input_info &info) {
|
||||||
|
@ -721,8 +722,8 @@ void MainWindow::reallyUpdateDeviceVisibility() {
|
||||||
w->directionLabel->show();
|
w->directionLabel->show();
|
||||||
w->deviceButton->show();
|
w->deviceButton->show();
|
||||||
} else {
|
} else {
|
||||||
w->directionLabel->hide();
|
w->directionLabel->hide();
|
||||||
w->deviceButton->hide();
|
w->deviceButton->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showSinkInputType == SINK_INPUT_ALL || w->type == showSinkInputType) {
|
if (showSinkInputType == SINK_INPUT_ALL || w->type == showSinkInputType) {
|
||||||
|
@ -746,11 +747,11 @@ void MainWindow::reallyUpdateDeviceVisibility() {
|
||||||
SourceOutputWidget* w = i->second;
|
SourceOutputWidget* w = i->second;
|
||||||
|
|
||||||
if (sourceWidgets.size() > 1) {
|
if (sourceWidgets.size() > 1) {
|
||||||
w->directionLabel->show();
|
w->directionLabel->show();
|
||||||
w->deviceButton->show();
|
w->deviceButton->show();
|
||||||
} else {
|
} else {
|
||||||
w->directionLabel->hide();
|
w->directionLabel->hide();
|
||||||
w->deviceButton->hide();
|
w->deviceButton->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showSourceOutputType == SOURCE_OUTPUT_ALL || w->type == showSourceOutputType) {
|
if (showSourceOutputType == SOURCE_OUTPUT_ALL || w->type == showSourceOutputType) {
|
||||||
|
|
Loading…
Reference in New Issue