From 74e0c35f56cc3d04f0e82a3d979520f21ff581b4 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 30 Oct 2019 12:11:44 -0700 Subject: Move the screenshot sound effects to gnome-shell Companion patches: * gnome-shell https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658 * g-s-d https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/223 Since it can take some time to compress a PNG image, at very high resolutions there was a noticeable delay before the audiovisual feedback on screenshots. To keep from complicating the interface for the shell screenshot service, moving the sound effects into the service (which already did the visual effects) so it can trigger them after capture and before compression. Note this removes the canberra dependency for gnome-screenshot. --- src/screenshot-application.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/screenshot-application.c') diff --git a/src/screenshot-application.c b/src/screenshot-application.c index 4cc64c8..ccc5eac 100644 --- a/src/screenshot-application.c +++ b/src/screenshot-application.c @@ -175,7 +175,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); @@ -429,7 +428,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); } @@ -437,8 +435,6 @@ build_filename_ready_cb (GObject *source, return; } - screenshot_play_sound_effect ("screen-capture", _("Screenshot taken")); - if (screenshot_config->interactive) { self->dialog = screenshot_dialog_new (GTK_APPLICATION (self), @@ -473,8 +469,6 @@ finish_take_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) @@ -488,8 +482,6 @@ finish_take_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)); -- cgit v1.2.1