Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
ddb37ca7
Commit
ddb37ca7
authored
Jan 15, 2016
by
Gautier Pelloux-Prayer
Browse files
gtk: disable encryption mandatory requirement if encryption is disabled
parent
afd3c2f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
gtk/propertybox.c
View file @
ddb37ca7
...
...
@@ -1285,19 +1285,21 @@ static void linphone_gtk_media_encryption_changed(GtkWidget *combo){
char
*
selected
=
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
combo
));
LinphoneCore
*
lc
=
linphone_gtk_get_core
();
GtkWidget
*
toplevel
=
gtk_widget_get_toplevel
(
combo
);
GtkWidget
*
mandatory_box
=
linphone_gtk_get_widget
(
toplevel
,
"media_encryption_mandatory"
);
if
(
selected
!=
NULL
){
if
(
strcasecmp
(
selected
,
"SRTP"
)
==
0
){
linphone_core_set_media_encryption
(
lc
,
LinphoneMediaEncryptionSRTP
);
linphone_gtk_set_media_encryption_mandatory_sensitive
(
toplevel
,
TRUE
);
gtk_widget_set_sensitive
(
mandatory_box
,
TRUE
);
}
else
if
(
strcasecmp
(
selected
,
"DTLS"
)
==
0
){
linphone_core_set_media_encryption
(
lc
,
LinphoneMediaEncryptionDTLS
);
linphone_gtk_set_media_encryption_mandatory_sensitive
(
toplevel
,
FALSE
);
gtk_widget_set_sensitive
(
mandatory_box
,
FALSE
);
}
else
if
(
strcasecmp
(
selected
,
"ZRTP"
)
==
0
){
linphone_core_set_media_encryption
(
lc
,
LinphoneMediaEncryptionZRTP
);
linphone_gtk_set_media_encryption_mandatory_sensitive
(
toplevel
,
FALSE
);
gtk_widget_set_sensitive
(
mandatory_box
,
FALSE
);
}
else
{
linphone_core_set_media_encryption
(
lc
,
LinphoneMediaEncryptionNone
);
linphone_gtk_set_media_encryption_mandatory_sensitive
(
toplevel
,
FALSE
);
gtk_widget_set_sensitive
(
mandatory_box
,
FALSE
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
mandatory_box
),
FALSE
);
}
g_free
(
selected
);
}
else
g_warning
(
"gtk_combo_box_get_active_text() returned NULL"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment