Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
ba38ebbc
Commit
ba38ebbc
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#2623] Make sure manual publishied address is sync with interface changes
parent
b4633195
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-client-gnome/src/config/accountconfigdialog.c
+31
-1
31 additions, 1 deletion
sflphone-client-gnome/src/config/accountconfigdialog.c
with
31 additions
and
1 deletion
sflphone-client-gnome/src/config/accountconfigdialog.c
+
31
−
1
View file @
ba38ebbc
...
@@ -489,6 +489,25 @@ static void use_sip_tls_cb(GtkWidget *widget, gpointer data)
...
@@ -489,6 +489,25 @@ static void use_sip_tls_cb(GtkWidget *widget, gpointer data)
}
}
}
}
static
local_interface_changed_cb
(
GtkWidget
*
widget
,
gpointer
data
UNUSED
)
{
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
sameAsLocalRadioButton
)))
{
gchar
*
local_interface
;
gchar
*
local_address
;
local_interface
=
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
localAddressCombo
));
local_address
=
dbus_get_address_from_interface_name
(
local_interface
);
gtk_entry_set_text
(
GTK_ENTRY
(
publishedAddressEntry
),
local_address
);
// gchar * local_port = (gchar *) gtk_entry_get_text(GTK_ENTRY(localPortSpinBox));
// gtk_spin_button_set_value(GTK_SPIN_BUTTON(publishedPortSpinBox), g_ascii_strtod(local_port, NULL));
}
}
static
set_published_addr_manually_cb
(
GtkWidget
*
widget
,
gpointer
data
UNUSED
)
static
set_published_addr_manually_cb
(
GtkWidget
*
widget
,
gpointer
data
UNUSED
)
{
{
DEBUG
(
"set_published_addr_manually_cb"
);
DEBUG
(
"set_published_addr_manually_cb"
);
...
@@ -510,6 +529,9 @@ static set_published_addr_manually_cb(GtkWidget * widget, gpointer data UNUSED)
...
@@ -510,6 +529,9 @@ static set_published_addr_manually_cb(GtkWidget * widget, gpointer data UNUSED)
static
use_stun_cb
(
GtkWidget
*
widget
,
gpointer
data
UNUSED
)
static
use_stun_cb
(
GtkWidget
*
widget
,
gpointer
data
UNUSED
)
{
{
gchar
*
local_interface
;
gchar
*
local_address
;
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
)))
{
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
)))
{
DEBUG
(
"Showing stun options, hiding Local/Published info"
);
DEBUG
(
"Showing stun options, hiding Local/Published info"
);
gtk_widget_show
(
stunServerLabel
);
gtk_widget_show
(
stunServerLabel
);
...
@@ -531,6 +553,14 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED)
...
@@ -531,6 +553,14 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED)
gtk_widget_show
(
publishedPortLabel
);
gtk_widget_show
(
publishedPortLabel
);
gtk_widget_show
(
publishedAddressEntry
);
gtk_widget_show
(
publishedAddressEntry
);
gtk_widget_show
(
publishedPortSpinBox
);
gtk_widget_show
(
publishedPortSpinBox
);
// Since stun callback is called at initialization, we cannot reinit published address
// TODO: find a way so that if stun is unchecked, reinit published address entry
// in case local address changedd
// local_interface = (gchar *) gtk_combo_box_get_active_text(GTK_COMBO_BOX(localAddressCombo));
// local_address = dbus_get_address_from_interface_name(local_interface);
// gtk_entry_set_text(GTK_ENTRY(publishedAddressEntry), local_address);
}
}
}
}
...
@@ -958,7 +988,7 @@ GtkWidget * create_advanced_tab(account_t **a)
...
@@ -958,7 +988,7 @@ GtkWidget * create_advanced_tab(account_t **a)
// This will trigger a signal, and the above two
// This will trigger a signal, and the above two
// widgets need to be instanciated before that.
// widgets need to be instanciated before that.
//
g_signal_connect(localAddressCombo, "changed", G_CALLBACK(
use_stun_cb), useStunCheckBox);
g_signal_connect
(
localAddressCombo
,
"changed"
,
G_CALLBACK
(
local_interface_changed_cb
),
localAddressCombo
);
g_signal_connect
(
useStunCheckBox
,
"toggled"
,
G_CALLBACK
(
use_stun_cb
),
useStunCheckBox
);
g_signal_connect
(
useStunCheckBox
,
"toggled"
,
G_CALLBACK
(
use_stun_cb
),
useStunCheckBox
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment