allow disabling call and chat notifications
Adds two new settings which allow enabling/disabling of the
call and chat notifications (individually). They are both enabled
by default.
Change-Id: Ic6996d53740e3f87f348ca8614ecd130495a65eb
Tuleap: #926
diff --git a/src/ringnotify.cpp b/src/ringnotify.cpp
index dd7b74d..8511ab5 100644
--- a/src/ringnotify.cpp
+++ b/src/ringnotify.cpp
@@ -379,9 +379,18 @@
delete idx;
}
-static void
-ring_notify_message(ContactMethod *cm, Media::TextRecording *t, RingClient *client)
+#endif
+
+void
+ring_notify_message(
+#if !USE_LIBNOTIFY
+ ContactMethod*, Media::TextRecording*, RingClient*)
+#else
+ ContactMethod *cm, Media::TextRecording *t, RingClient *client)
+#endif
{
+
+#if USE_LIBNOTIFY
g_return_if_fail(cm && t && client);
// get the message
@@ -405,28 +414,8 @@
}
}
+#endif
}
-#endif
-
-void
-ring_notify_monitor_chat_notifications(
-#if !USE_LIBNOTIFY
- G_GNUC_UNUSED
-#endif
- RingClient *client)
-{
-#if USE_LIBNOTIFY
-
- QObject::connect(
- &Media::RecordingModel::instance(),
- &Media::RecordingModel::newTextMessage,
- [client] (Media::TextRecording* t, ContactMethod* cm)
- {
- ring_notify_message(cm, t, client);
- }
- );
-#endif
- }
gboolean
ring_notify_close_chat_notification(