Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 1 | From 87992a57e5f517d5ceb5dfabaea662ac64983720 Mon Sep 17 00:00:00 2001 |
| 2 | From: Markus Volk <f_l_k@t-online.de> |
| 3 | Date: Fri, 27 May 2022 18:37:53 +0200 |
| 4 | Subject: [PATCH] pavucontrol: remove canberra-gtk support |
| 5 | |
| 6 | libcanberra-gtk3 module isn't buildable for wayland. |
| 7 | Remove its dpendency. |
| 8 | |
| 9 | Signed-off-by: Markus Volk <f_l_k@t-online.de> |
| 10 | |
| 11 | Upstream-Status: Inappropriate |
| 12 | --- |
| 13 | configure.ac | 2 +- |
| 14 | src/pavuapplication.cc | 2 -- |
| 15 | src/pavucontrol.cc | 4 ---- |
| 16 | src/sinkwidget.cc | 17 ----------------- |
| 17 | 4 files changed, 1 insertion(+), 24 deletions(-) |
| 18 | |
| 19 | diff --git a/configure.ac b/configure.ac |
| 20 | index 056ba5e..e857563 100644 |
| 21 | --- a/configure.ac |
| 22 | +++ b/configure.ac |
| 23 | @@ -41,7 +41,7 @@ AC_TYPE_SIGNAL |
| 24 | AC_HEADER_STDC |
| 25 | AX_CXX_COMPILE_STDCXX_11 |
| 26 | |
| 27 | -PKG_CHECK_MODULES(GUILIBS, [ gtkmm-3.0 >= 3.22 sigc++-2.0 libcanberra-gtk3 >= 0.16 json-glib-1.0 ]) |
| 28 | +PKG_CHECK_MODULES(GUILIBS, [ gtkmm-3.0 >= 3.22 sigc++-2.0 json-glib-1.0 ]) |
| 29 | AC_SUBST(GUILIBS_CFLAGS) |
| 30 | AC_SUBST(GUILIBS_LIBS) |
| 31 | |
| 32 | diff --git a/src/pavuapplication.cc b/src/pavuapplication.cc |
| 33 | index 6773b53..60c016c 100644 |
| 34 | --- a/src/pavuapplication.cc |
| 35 | +++ b/src/pavuapplication.cc |
| 36 | @@ -24,8 +24,6 @@ |
| 37 | |
| 38 | #include "i18n.h" |
| 39 | |
| 40 | -#include <canberra-gtk.h> |
| 41 | - |
| 42 | #include "pavuapplication.h" |
| 43 | #include "pavucontrol.h" |
| 44 | #include "mainwindow.h" |
| 45 | diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc |
| 46 | index 18d5400..10ab646 100644 |
| 47 | --- a/src/pavucontrol.cc |
| 48 | +++ b/src/pavucontrol.cc |
| 49 | @@ -29,8 +29,6 @@ |
| 50 | #include <json-glib/json-glib.h> |
| 51 | #endif |
| 52 | |
| 53 | -#include <canberra-gtk.h> |
| 54 | - |
| 55 | #include "pavucontrol.h" |
| 56 | #include "i18n.h" |
| 57 | #include "minimalstreamwidget.h" |
| 58 | @@ -916,8 +914,6 @@ MainWindow* pavucontrol_get_window(pa_glib_mainloop *m, bool maximize, bool _ret |
| 59 | tab_number = _tab_number; |
| 60 | retry = _retry; |
| 61 | |
| 62 | - ca_context_set_driver(ca_gtk_context_get(), "pulse"); |
| 63 | - |
| 64 | mainWindow = MainWindow::create(maximize); |
| 65 | |
| 66 | api = pa_glib_mainloop_get_api(m); |
| 67 | diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc |
| 68 | index f30bd37..482fd1f 100644 |
| 69 | --- a/src/sinkwidget.cc |
| 70 | +++ b/src/sinkwidget.cc |
| 71 | @@ -24,7 +24,6 @@ |
| 72 | |
| 73 | #include "sinkwidget.h" |
| 74 | |
| 75 | -#include <canberra-gtk.h> |
| 76 | #if HAVE_EXT_DEVICE_RESTORE_API |
| 77 | # include <pulse/format.h> |
| 78 | # include <pulse/ext-device-restore.h> |
| 79 | @@ -111,7 +110,6 @@ SinkWidget* SinkWidget::create(MainWindow* mainWindow) { |
| 80 | void SinkWidget::executeVolumeUpdate() { |
| 81 | pa_operation* o; |
| 82 | char dev[64]; |
| 83 | - int playing = 0; |
| 84 | |
| 85 | if (!(o = pa_context_set_sink_volume_by_index(get_context(), index, &volume, NULL, NULL))) { |
| 86 | show_error(_("pa_context_set_sink_volume_by_index() failed")); |
| 87 | @@ -120,22 +118,7 @@ void SinkWidget::executeVolumeUpdate() { |
| 88 | |
| 89 | pa_operation_unref(o); |
| 90 | |
| 91 | - ca_context_playing(ca_gtk_context_get(), 2, &playing); |
| 92 | - if (playing) |
| 93 | - return; |
| 94 | - |
| 95 | snprintf(dev, sizeof(dev), "%lu", (unsigned long) index); |
| 96 | - ca_context_change_device(ca_gtk_context_get(), dev); |
| 97 | - |
| 98 | - ca_gtk_play_for_widget(GTK_WIDGET(gobj()), |
| 99 | - 2, |
| 100 | - CA_PROP_EVENT_DESCRIPTION, _("Volume Control Feedback Sound"), |
| 101 | - CA_PROP_EVENT_ID, "audio-volume-change", |
| 102 | - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", |
| 103 | - CA_PROP_CANBERRA_ENABLE, "1", |
| 104 | - NULL); |
| 105 | - |
| 106 | - ca_context_change_device(ca_gtk_context_get(), NULL); |
| 107 | } |
| 108 | |
| 109 | void SinkWidget::onMuteToggleButton() { |
| 110 | -- |
| 111 | 2.25.1 |
| 112 | |