[evolution/gnome-3-38] M!65 - Resolve build failure with ENABLE_CANBERRA set to OFF



commit 5ecdb58ac6aa40feeb80114219ac3fffc719279c
Author: David Ward <david ward ll mit edu>
Date:   Tue Sep 29 12:38:56 2020 -0400

    M!65 - Resolve build failure with ENABLE_CANBERRA set to OFF
    
    Related to commit c9e7d068e4e99a55653055be396a7f06fec8251f
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/merge_requests/65

 src/mail/e-mail-ui-session.c                      | 9 +++++----
 src/plugins/mail-notification/mail-notification.c | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/mail/e-mail-ui-session.c b/src/mail/e-mail-ui-session.c
index 54ed8d329f..df9ac111a0 100644
--- a/src/mail/e-mail-ui-session.c
+++ b/src/mail/e-mail-ui-session.c
@@ -65,9 +65,10 @@
 
 #ifdef HAVE_CANBERRA
 static ca_context *cactx = NULL;
-static gint eca_debug = -1;
 #endif
 
+static gint eca_debug = -1;
+
 typedef struct _SourceContext SourceContext;
 
 struct _EMailUISessionPrivate {
@@ -183,13 +184,13 @@ get_folder (CamelFilterDriver *d,
 static gboolean
 session_play_sound_cb (const gchar *filename)
 {
+       if (eca_debug == -1)
+               eca_debug = g_strcmp0 (g_getenv ("ECA_DEBUG"), "1") == 0 ? 1 : 0;
+
 #ifdef HAVE_CANBERRA
        if (filename && *filename) {
                gint err;
 
-               if (eca_debug == -1)
-                       eca_debug = g_strcmp0 (g_getenv ("ECA_DEBUG"), "1") == 0 ? 1 : 0;
-
                if (!cactx) {
                        ca_context_create (&cactx);
                        ca_context_change_props (cactx,
diff --git a/src/plugins/mail-notification/mail-notification.c 
b/src/plugins/mail-notification/mail-notification.c
index 371b4af2fb..b5f66c0c2c 100644
--- a/src/plugins/mail-notification/mail-notification.c
+++ b/src/plugins/mail-notification/mail-notification.c
@@ -629,21 +629,22 @@ read_notify_status (EMEventTargetMessage *t)
 
 #ifdef HAVE_CANBERRA
 static ca_context *mailnotification = NULL;
-static gint eca_debug = -1;
 #endif
 
+static gint eca_debug = -1;
+
 static void
 do_play_sound (gboolean beep,
                gboolean use_theme,
                const gchar *file)
 {
+       if (eca_debug == -1)
+               eca_debug = g_strcmp0 (g_getenv ("ECA_DEBUG"), "1") == 0 ? 1 : 0;
+
        if (!beep) {
 #ifdef HAVE_CANBERRA
                gint err;
 
-               if (eca_debug == -1)
-                       eca_debug = g_strcmp0 (g_getenv ("ECA_DEBUG"), "1") == 0 ? 1 : 0;
-
                if (!use_theme && file && *file)
                        err = ca_context_play (
                                mailnotification, 0,


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