diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-06-11 12:36:25 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-06-11 12:36:25 +0000 |
commit | 5e6083e752f7dd50571f87e5910dca6302ce8113 (patch) | |
tree | cdc7ff87cff8c2b0ebb67d6e10cda26d26e5b36d | |
parent | e6bec3515f2e7c3798dbcdf864fac16f538b8aa8 (diff) | |
parent | 325757997f6c4ddf6f6d2b25c186649832f68fc9 (diff) | |
download | ayatana-indicator-datetime-5e6083e752f7dd50571f87e5910dca6302ce8113.tar.gz ayatana-indicator-datetime-5e6083e752f7dd50571f87e5910dca6302ce8113.tar.bz2 ayatana-indicator-datetime-5e6083e752f7dd50571f87e5910dca6302ce8113.zip |
Use the Suru Arpeggio as the default alarm sound. Fixes: 1309063
-rw-r--r-- | debian/control | 1 | ||||
-rw-r--r-- | src/snap.cpp | 18 |
2 files changed, 2 insertions, 17 deletions
diff --git a/debian/control b/debian/control index 30b71e9..1e7b24e 100644 --- a/debian/control +++ b/debian/control @@ -39,6 +39,7 @@ Recommends: indicator-applet | indicator-renderer, evolution-data-server, geoclue-ubuntu-geoip | geoclue-provider, unity-control-center (>= 14.04.3) | ubuntu-system-settings, + ubuntu-touch-sounds, Suggests: click, Conflicts: indicator-datetime (<< 13.10.0) Replaces: indicator-datetime (<< 13.10.0) diff --git a/src/snap.cpp b/src/snap.cpp index 9b0abee..a087a75 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -30,7 +30,7 @@ #include <set> #include <string> -#define ALARM_SOUND_FILENAME "/usr/share/sounds/ubuntu/stereo/phone-incoming-call.ogg" +#define ALARM_SOUND_FILENAME "/usr/share/sounds/ubuntu/ringtones/Suru arpeggio.ogg" namespace unity { namespace indicator { @@ -50,7 +50,6 @@ namespace // arbitrary number, but we need a consistent id for play/cancel const int32_t alarm_ca_id = 1; -gboolean media_cached = FALSE; ca_context *c_context = nullptr; guint timeout_tag = 0; @@ -65,18 +64,6 @@ ca_context* get_ca_context() g_warning("Failed to create canberra context: %s\n", ca_strerror(rv)); c_context = nullptr; } - else - { - const char* filename = ALARM_SOUND_FILENAME; - rv = ca_context_cache(c_context, - CA_PROP_EVENT_ID, "alarm", - CA_PROP_MEDIA_FILENAME, filename, - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - media_cached = rv == CA_SUCCESS; - if (rv != CA_SUCCESS) - g_warning("Couldn't add '%s' to canberra cache: %s", filename, ca_strerror(rv)); - } } return c_context; @@ -106,8 +93,6 @@ void play_alarm_sound() ca_proplist* props = nullptr; ca_proplist_create(&props); - if (media_cached) - ca_proplist_sets(props, CA_PROP_EVENT_ID, "alarm"); ca_proplist_sets(props, CA_PROP_MEDIA_FILENAME, filename); const auto rv = ca_context_play_full(context, alarm_ca_id, props, on_alarm_play_done, nullptr); @@ -307,7 +292,6 @@ Snap::Snap() Snap::~Snap() { - media_cached = false; g_clear_pointer(&c_context, ca_context_destroy); } |