[calls] account-widget: Actually use the selected protocol
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] account-widget: Actually use the selected protocol
- Date: Thu, 2 Sep 2021 07:35:36 +0000 (UTC)
commit 9faac7e7893ea65f7fb6e6e13b5cfb23c6563031
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Thu Aug 26 21:52:36 2021 +0200
account-widget: Actually use the selected protocol
instead of using the hardcoded UDP value.
plugins/sip/calls-sip-account-widget.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sip/calls-sip-account-widget.c b/plugins/sip/calls-sip-account-widget.c
index 5d44ffeb..df765be0 100644
--- a/plugins/sip/calls-sip-account-widget.c
+++ b/plugins/sip/calls-sip-account-widget.c
@@ -325,6 +325,21 @@ edit_form (CallsSipAccountWidget *self,
}
+static const char *
+get_selected_protocol (CallsSipAccountWidget *self)
+{
+ g_autoptr (HdyValueObject) obj = NULL;
+ const char *protocol = NULL;
+ gint i;
+
+ if ((i = hdy_combo_row_get_selected_index (self->protocol)) != -1) {
+ obj = g_list_model_get_item (G_LIST_MODEL (self->protocols_store), i);
+ protocol = hdy_value_object_get_string (obj);
+ }
+ return protocol;
+}
+
+
static void
on_login_clicked (CallsSipAccountWidget *self)
{
@@ -337,7 +352,7 @@ on_login_clicked (CallsSipAccountWidget *self)
gtk_entry_get_text (GTK_ENTRY (self->user)),
gtk_entry_get_text (GTK_ENTRY (self->password)),
gtk_entry_get_text (GTK_ENTRY (self->display_name)),
- "UDP",
+ get_selected_protocol (self),
0,
TRUE);
@@ -370,7 +385,7 @@ on_apply_clicked (CallsSipAccountWidget *self)
gtk_entry_get_text (self->user),
gtk_entry_get_text (self->password),
gtk_entry_get_text (self->display_name),
- "UDP",
+ get_selected_protocol (self),
0,
TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]