Added Gnome Calls
This commit is contained in:
36
net-voip/gnome-calls/files/0001-use-at-cmds-to-mute.patch
Normal file
36
net-voip/gnome-calls/files/0001-use-at-cmds-to-mute.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
diff --git a/src/calls-call-display.c b/src/calls-call-display.c
|
||||
index bf98958..c8b1bc4 100644
|
||||
--- a/src/calls-call-display.c
|
||||
+++ b/src/calls-call-display.c
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include <libcallaudio.h>
|
||||
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
struct _CallsCallDisplay
|
||||
{
|
||||
GtkOverlay parent_instance;
|
||||
@@ -103,11 +105,17 @@ mute_toggled_cb (GtkToggleButton *togglebutton,
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
want_mute = gtk_toggle_button_get_active (togglebutton);
|
||||
- ret = call_audio_mute_mic (want_mute, &error);
|
||||
- if (!ret && error)
|
||||
- g_warning ("Failed to %smute microphone: %s",
|
||||
- want_mute ? "" : "un",
|
||||
- error->message);
|
||||
+
|
||||
+ gchar* command = g_strdup_printf("/usr/bin/mmcli -m 0 --command=AT+CMUT=%d",want_mute?1:0);
|
||||
+
|
||||
+ int exit_code;
|
||||
+
|
||||
+ ret = g_spawn_command_line_sync(command, NULL,NULL,&exit_code, &error);
|
||||
+
|
||||
+ if(!ret || error || exit_code != 0){
|
||||
+ g_warning ("Failed to %smute microphone (mmcli exit code: %d)",
|
||||
+ want_mute ? "" : "un", exit_code);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user