diff --git a/README.md b/README.md index 4c9917ff9659de8d2b673e57d995555184bc00a5..5f13d490d2a8c4a7ec18b25261dc7e0b8ca96653 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,4 @@ desktop; the currently focused window; or an area of the screen. - GLib 2.36 - GTK+ 3.12 - - libcanberra-gtk3 - X11 diff --git a/meson.build b/meson.build index c09c5390fab345f43df1d8cb9f71b72a7e2d89e0..52d011a678c8d05598d4ee569de1bfefddccffc2 100644 --- a/meson.build +++ b/meson.build @@ -29,7 +29,6 @@ mathlib_dep = cc.find_library('m', required: false) x11_dep = [ dependency('x11'), dependency('xext') ] glib_dep = dependency('glib-2.0', version: glib_req_version) gtk_dep = dependency('gtk+-3.0', version: gtk_req_version) -canberra_dep = dependency('libcanberra-gtk3') config_h = configuration_data() config_h.set_quoted('VERSION', meson.project_version()) diff --git a/org.gnome.Screenshot.json b/org.gnome.Screenshot.json index 15e3934d68008fd55d444ddd42fe23eb43139c2e..86c7bc13bd19c9fe4f39541fb9252fff3a4bbdb5 100644 --- a/org.gnome.Screenshot.json +++ b/org.gnome.Screenshot.json @@ -29,23 +29,6 @@ "*.a" ], "modules": [ - { - "name": "libcanberra-gtk3", - "cleanup": [ - "/bin", - "/lib/gnome-settings-daemon-3.0", - "/share/doc", - "/share/gdm", - "/share/gnome" - ], - "sources": [ - { - "type": "archive", - "url": "http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz", - "sha256": "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72" - } - ] - }, { "name": "gnome-screenshot", "buildsystem": "meson", diff --git a/src/meson.build b/src/meson.build index 66b1fb138cccdf5b05993827eda70a20d30cbf07..1e989985b528e6f03ef53329110a8472b39421b8 100644 --- a/src/meson.build +++ b/src/meson.build @@ -22,7 +22,7 @@ resources = gnome.compile_resources('screenshot-resources', executable('gnome-screenshot', sources + resources, include_directories: [ root_inc, include_directories('.') ], - dependencies: [ mathlib_dep, x11_dep, glib_dep, gtk_dep, canberra_dep ], + dependencies: [ mathlib_dep, x11_dep, glib_dep, gtk_dep ], c_args: [ '-DLOCALEDIR="@0@"'.format(gnome_screenshot_localedir), '-DGLIB_DISABLE_DEPRECATION_WARNINGS', diff --git a/src/screenshot-application.c b/src/screenshot-application.c index 92134ab90c78dca4fd9b5b39f93f2098534ba9bb..960713f9d2ae6049023a8c482675d59ba38d3eab 100644 --- a/src/screenshot-application.c +++ b/src/screenshot-application.c @@ -170,7 +170,6 @@ save_pixbuf_handle_error (ScreenshotApplication *self, else { g_critical ("Unable to save the screenshot: %s", error->message); - screenshot_play_sound_effect ("dialog-error", _("Unable to capture a screenshot")); g_application_release (G_APPLICATION (self)); if (screenshot_config->file != NULL) exit (EXIT_FAILURE); @@ -427,7 +426,6 @@ build_filename_ready_cb (GObject *source, _("Error creating file")); else { - screenshot_play_sound_effect ("dialog-error", _("Unable to capture a screenshot")); if (screenshot_config->file != NULL) exit (EXIT_FAILURE); } @@ -435,8 +433,6 @@ build_filename_ready_cb (GObject *source, return; } - screenshot_play_sound_effect ("screen-capture", _("Screenshot taken")); - if (screenshot_config->interactive) { self->priv->dialog = screenshot_dialog_new (self->priv->screenshot, @@ -469,8 +465,6 @@ finish_prepare_screenshot (ScreenshotApplication *self, GTK_BUTTONS_OK, _("Unable to capture a screenshot"), _("All possible methods failed")); - else - screenshot_play_sound_effect ("dialog-error", _("Unable to capture a screenshot")); g_application_release (G_APPLICATION (self)); if (screenshot_config->file != NULL) @@ -503,8 +497,6 @@ finish_prepare_screenshot (ScreenshotApplication *self, if (screenshot_config->copy_to_clipboard) { screenshot_save_to_clipboard (self); - screenshot_play_sound_effect ("screen-capture", _("Screenshot taken")); - if (screenshot_config->file == NULL) { g_application_release (G_APPLICATION (self)); diff --git a/src/screenshot-utils.c b/src/screenshot-utils.c index 04c0c8ecf67ad2cc4f41940ae9d2a8474d812af8..20160369eea4982e3d9d38b4390ca61f8210f48c 100644 --- a/src/screenshot-utils.c +++ b/src/screenshot-utils.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #ifdef HAVE_X11_EXTENSIONS_SHAPE_H @@ -272,39 +271,6 @@ screenshot_fallback_get_window_rect_coords (GdkWindow *window, } } -void -screenshot_play_sound_effect (const gchar *event_id, - const gchar *event_desc) -{ - ca_context *c; - ca_proplist *p = NULL; - int res; - - c = ca_gtk_context_get (); - - res = ca_proplist_create (&p); - if (res < 0) - goto done; - - res = ca_proplist_sets (p, CA_PROP_EVENT_ID, event_id); - if (res < 0) - goto done; - - res = ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, event_desc); - if (res < 0) - goto done; - - res = ca_proplist_sets (p, CA_PROP_CANBERRA_CACHE_CONTROL, "permanent"); - if (res < 0) - goto done; - - ca_context_play_full (c, 0, p, NULL, NULL); - - done: - if (p != NULL) - ca_proplist_destroy (p); -} - static void screenshot_fallback_fire_flash (GdkWindow *window, GdkRectangle *rectangle) diff --git a/src/screenshot-utils.h b/src/screenshot-utils.h index 8562fbdf238754b5638e6551445f7beded699446..71fab58f0a74ebf79718d8e0cd2341f4fed4fa62 100644 --- a/src/screenshot-utils.h +++ b/src/screenshot-utils.h @@ -34,8 +34,6 @@ gint screenshot_show_dialog (GtkWindow *parent, GtkButtonsType buttons_type, const gchar *message, const gchar *detail); -void screenshot_play_sound_effect (const gchar *event_id, - const gchar *event_desc); void screenshot_display_help (GtkWindow *parent); G_END_DECLS