From 28f32c5d9eea4bfac4a2576f548356794e9480b2 Mon Sep 17 00:00:00 2001 From: esoleyman Date: Wed, 5 Aug 2020 15:58:56 -0500 Subject: [PATCH] Remove libcanberra dependency Given that libcanberra has been removed from the GNOME Flatpak SDK 3.38 runtime, it is prudent to remove the dependency from cheese. --- src/cheese-window.vala | 7 +------ src/meson.build | 5 +---- src/vapi/libcanberra-gtk3.vapi | 38 ---------------------------------- 3 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 src/vapi/libcanberra-gtk3.vapi diff --git a/src/cheese-window.vala b/src/cheese-window.vala index ff069808..d07ff339 100644 --- a/src/cheese-window.vala +++ b/src/cheese-window.vala @@ -26,7 +26,6 @@ using Clutter; using Config; using Eog; using Gst; -using CanberraGtk; const int FULLSCREEN_TIMEOUT_INTERVAL = 5 * 1000; const uint EFFECTS_PER_PAGE = 9; @@ -685,11 +684,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow { this.flash.fire (); } - CanberraGtk.play_for_widget (this.main_vbox, 0, - Canberra.PROP_EVENT_ID, "camera-shutter", - Canberra.PROP_MEDIA_ROLE, "event", - Canberra.PROP_EVENT_DESCRIPTION, _("Shutter sound"), - null); + this.camera.take_photo (file_name); } diff --git a/src/meson.build b/src/meson.build index 74f62b16..edad25d2 100644 --- a/src/meson.build +++ b/src/meson.build @@ -7,8 +7,7 @@ sources = files( 'cheese-window.vala', 'thumbview/cheese-thumbnail.c', 'thumbview/cheese-thumb-view.c', - 'thumbview/eog-thumb-nav.c', - 'vapi/libcanberra-gtk3.vapi' + 'thumbview/eog-thumb-nav.c' ) deps = [ @@ -17,8 +16,6 @@ deps = [ config_dep, gnome_desktop_dep, eogthumbnav_dep, - libcanberra_dep, - libcanberra_gtk3_dep, libcheese_gtk_dep, posix_dep, ] diff --git a/src/vapi/libcanberra-gtk3.vapi b/src/vapi/libcanberra-gtk3.vapi deleted file mode 100644 index 94add4ea..00000000 --- a/src/vapi/libcanberra-gtk3.vapi +++ /dev/null @@ -1,38 +0,0 @@ -/*** - This file is part of libcanberra. - - Copyright 2009 Lennart Poettering - - libcanberra is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 2.1 of the - License, or (at your option) any later version. - - libcanberra is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with libcanberra. If not, see - . -***/ - -using Canberra; -using Gdk; -using Gtk; - -[CCode (cprefix = "CA_GTK_", lower_case_cprefix = "ca_gtk_", cheader_filename = "canberra-gtk.h")] -namespace CanberraGtk { - - public unowned Context? context_get(); - public unowned Context? context_get_for_screen(Gdk.Screen? screen); - - public int proplist_set_for_widget(Proplist p, Gtk.Widget w); - public int play_for_widget(Gtk.Widget w, uint32 id, ...); - public int proplist_set_for_event(Proplist p, Gdk.Event e); - public int play_for_event(Gdk.Event e, uint32 id, ...); - - public void widget_disable_sounds(Gtk.Widget w, bool enable = false); -} - -- GitLab