Skip to content

Commit 7f49733

Browse files
committed
uncrustify
1 parent 44f38e9 commit 7f49733

1 file changed

Lines changed: 30 additions & 27 deletions

File tree

src/panel/widgets/wireplumber.cpp

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111

1212
namespace WpCommon
1313
{
14-
WpCore *core = nullptr;
15-
WpObjectManager *object_manager;
16-
WpPlugin *mixer_api;
17-
WpPlugin *default_nodes_api;
18-
19-
std::vector<WayfireWireplumber*> widgets;
20-
21-
void init_wp();
22-
void catch_up_to_current_state(WayfireWireplumber *widget);
23-
void on_mixer_plugin_loaded(WpCore *core, GAsyncResult *res, gpointer data);
24-
void on_default_nodes_plugin_loaded(WpCore *core, GAsyncResult *res, gpointer data);
25-
void on_all_plugins_loaded();
26-
void on_om_installed(WpObjectManager *manager, gpointer data);
27-
void add_object_to_widget(WpPipewireObject* object, WayfireWireplumber* widget);
28-
void on_object_added(WpObjectManager *manager, gpointer object, gpointer data);
29-
void on_mixer_changed(gpointer mixer_api, guint id, gpointer data);
30-
void on_default_nodes_changed(gpointer default_nodes_api, gpointer data);
31-
void on_object_removed(WpObjectManager *manager, gpointer node, gpointer data);
14+
WpCore *core = nullptr;
15+
WpObjectManager *object_manager;
16+
WpPlugin *mixer_api;
17+
WpPlugin *default_nodes_api;
18+
19+
std::vector<WayfireWireplumber*> widgets;
20+
21+
void init_wp();
22+
void catch_up_to_current_state(WayfireWireplumber *widget);
23+
void on_mixer_plugin_loaded(WpCore *core, GAsyncResult *res, gpointer data);
24+
void on_default_nodes_plugin_loaded(WpCore *core, GAsyncResult *res, gpointer data);
25+
void on_all_plugins_loaded();
26+
void on_om_installed(WpObjectManager *manager, gpointer data);
27+
void add_object_to_widget(WpPipewireObject *object, WayfireWireplumber *widget);
28+
void on_object_added(WpObjectManager *manager, gpointer object, gpointer data);
29+
void on_mixer_changed(gpointer mixer_api, guint id, gpointer data);
30+
void on_default_nodes_changed(gpointer default_nodes_api, gpointer data);
31+
void on_object_removed(WpObjectManager *manager, gpointer node, gpointer data);
3232
}
3333

3434
enum class FaceChoice
@@ -506,9 +506,9 @@ void WayfireWireplumber::reload_config()
506506
void WayfireWireplumber::handle_config_reload()
507507
{
508508
reload_config();
509-
for (auto &entry : objects_to_controls)
509+
for (auto & entry : objects_to_controls)
510510
{
511-
auto &control = entry.second;
511+
auto & control = entry.second;
512512
control->handle_config_reload();
513513
}
514514
}
@@ -754,18 +754,19 @@ void WpCommon::on_all_plugins_loaded()
754754
wp_core_install_object_manager(core, object_manager);
755755
}
756756

757-
void WpCommon::add_object_to_widget(WpPipewireObject* object, WayfireWireplumber* widget){
757+
void WpCommon::add_object_to_widget(WpPipewireObject *object, WayfireWireplumber *widget)
758+
{
758759
// adds a new widget to the appropriate section
759760

760-
const std::string_view type {wp_pipewire_object_get_property(object, PW_KEY_MEDIA_CLASS)};
761+
const std::string_view type{wp_pipewire_object_get_property(object, PW_KEY_MEDIA_CLASS)};
761762

762763
WfWpControl *control;
763764
Gtk::Box *which_box;
764765
if (type == "Audio/Sink")
765766
{
766767
which_box = &(widget->sinks_box);
767768

768-
control = new WfWpControlDevice(object, widget);
769+
control = new WfWpControlDevice(object, widget);
769770
} else if (type == "Audio/Source")
770771
{
771772
which_box = &(widget->sources_box);
@@ -923,18 +924,18 @@ void WpCommon::on_default_nodes_changed(gpointer default_nodes_api, gpointer dat
923924
// if the control is not for a sink or source (non WfWpControlDevice), don’t try to set status
924925
const std::string_view type{wp_pipewire_object_get_property(obj, PW_KEY_MEDIA_CLASS)};
925926

926-
if (type == "Audio/Sink" || type == "Audio/Source")
927+
if ((type == "Audio/Sink") || (type == "Audio/Source"))
927928
{
928929
ctrl->set_def_status_no_callbk(false);
929930
}
930931

931932
if ( // if the settings call for it, refresh the face
932933
(
933934
(widget->face_choice == FaceChoice::DEFAULT_SINK) &&
934-
(type == "Audio/Sink")
935+
(type == "Audio/Sink")
935936
||
936937
(widget->face_choice == FaceChoice::DEFAULT_SOURCE) &&
937-
(type == "Audio/Source")
938+
(type == "Audio/Source")
938939
)
939940
&&
940941
(widget->face->object == ctrl->object))
@@ -959,10 +960,12 @@ void WpCommon::on_object_removed(WpObjectManager *manager, gpointer object, gpoi
959960
WfWpControl *control = it->second.get();
960961
auto *box = (Gtk::Box*)control->get_parent();
961962
if (box)
963+
{
962964
box->remove(*control);
965+
}
963966

964967
// if face points to the removed control we should handle it.
965-
if (widget->face && widget->face->object == it->first)
968+
if (widget->face && (widget->face->object == it->first))
966969
{
967970
// reset face to nullptr
968971
widget->face = nullptr;

0 commit comments

Comments
 (0)