[recipes] Remove dialog sound again



commit 14f3adb3f6b59ea5fe840f161b6e0fea554b5c58
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 15 19:29:36 2017 -0400

    Remove dialog sound again
    
    It was deemed too unexpected and distracting.

 data/meson.build     |    1 -
 data/sounds/tada.wav |  Bin 291276 -> 0 bytes
 src/gr-window.c      |   29 -----------------------------
 3 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 478d65a..00fb0a8 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -31,7 +31,6 @@ install_data(   'images/american.png',
                 install_dir: join_paths([pkgdatadir,'images']))
 
 install_data('sounds/complete.oga',
-             'sounds/tada.wav',
              install_dir: join_paths([pkgdatadir,'sounds']))
 
 install_data('chefs.db',
diff --git a/src/gr-window.c b/src/gr-window.c
index 51f79c4..fb507f9 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -48,10 +48,6 @@
 #include "gr-appdata.h"
 #include "gr-settings.h"
 
-#ifdef ENABLE_CANBERRA
-#include <canberra.h>
-#endif
-
 
 struct _GrWindow
 {
@@ -1583,30 +1579,6 @@ should_show_surprise (void)
         return FALSE;
 }
 
-static void
-play_tada_sound (GtkWindow *win)
-{
-#ifdef ENABLE_CANBERRA
-        g_autofree char *path;
-        ca_context *c;
-
-        ca_context_create (&c);
-        g_object_set_data_full (G_OBJECT (win), "ca-context", c, (GDestroyNotify) ca_context_destroy);
-        ca_context_change_props (c,
-                                 CA_PROP_APPLICATION_NAME, _("GNOME Recipes"),
-                                 CA_PROP_APPLICATION_ID, "org.gnome.Recipes",
-                                 CA_PROP_APPLICATION_ICON_NAME, "org.gnome.Recipes",
-                                 NULL);
-        path = g_build_filename (get_pkg_data_dir (), "sounds", "tada.wav", NULL);
-        ca_context_play (c, 0,
-                         CA_PROP_MEDIA_ROLE, "alert",
-                         CA_PROP_MEDIA_FILENAME, path,
-                         /* Translators: there is a thin space before the !, on purpose */
-                         CA_PROP_MEDIA_NAME, _("GNOME turns 20 !"),
-                         NULL);
-#endif
-}
-
 void
 surprise_dialog_closed (GtkWidget *window)
 {
@@ -1633,5 +1605,4 @@ gr_window_show_surprise (GrWindow *window)
         gtk_window_set_transient_for (dialog, GTK_WINDOW (window));
         gr_window_present_dialog (window, dialog);
         pango_layout_set_spacing (gtk_label_get_layout (GTK_LABEL (label)), - pango_units_from_double 
(10.0));
-        play_tada_sound (dialog);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]