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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
49c656c3
Commit
49c656c3
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#3324] Fix GTK CRITICAL and WARNINGS
parent
d070f52e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-client-gnome/src/config/accountconfigdialog.c
+16
-15
16 additions, 15 deletions
sflphone-client-gnome/src/config/accountconfigdialog.c
with
16 additions
and
15 deletions
sflphone-client-gnome/src/config/accountconfigdialog.c
+
16
−
15
View file @
49c656c3
...
@@ -119,7 +119,7 @@ void change_protocol_cb (account_t *currentAccount UNUSED) {
...
@@ -119,7 +119,7 @@ void change_protocol_cb (account_t *currentAccount UNUSED) {
// Only if tabs are not NULL
// Only if tabs are not NULL
if
(
security_tab
&&
advanced_tab
)
{
if
(
security_tab
&&
advanced_tab
)
{
DEBUG
(
"------------------------------------"
);
if
(
g_strcasecmp
(
protocol
,
"IAX"
)
==
0
)
{
if
(
g_strcasecmp
(
protocol
,
"IAX"
)
==
0
)
{
gtk_widget_hide
(
GTK_WIDGET
(
security_tab
));
gtk_widget_hide
(
GTK_WIDGET
(
security_tab
));
gtk_widget_hide
(
GTK_WIDGET
(
advanced_tab
));
gtk_widget_hide
(
GTK_WIDGET
(
advanced_tab
));
...
@@ -127,6 +127,7 @@ void change_protocol_cb (account_t *currentAccount UNUSED) {
...
@@ -127,6 +127,7 @@ void change_protocol_cb (account_t *currentAccount UNUSED) {
gtk_widget_show
(
GTK_WIDGET
(
security_tab
));
gtk_widget_show
(
GTK_WIDGET
(
security_tab
));
gtk_widget_show
(
GTK_WIDGET
(
advanced_tab
));
gtk_widget_show
(
GTK_WIDGET
(
advanced_tab
));
}
}
DEBUG
(
"------------------------------------"
);
}
}
}
}
...
@@ -256,18 +257,17 @@ static GtkWidget* create_basic_tab (account_t **a) {
...
@@ -256,18 +257,17 @@ static GtkWidget* create_basic_tab (account_t **a) {
{
{
curAccountID
=
currentAccount
->
accountID
;
curAccountID
=
currentAccount
->
accountID
;
curAccountType
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_TYPE
);
curAccountType
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_TYPE
);
DEBUG
(
"Config: CuraccountType %s"
,
curAccountType
);
DEBUG
(
"Config: Cur
rent
accountType %s"
,
curAccountType
);
curAccountEnabled
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_ENABLED
);
curAccountEnabled
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_ENABLED
);
curAlias
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_ALIAS
);
curAlias
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_ALIAS
);
curHostname
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_HOSTNAME
);
curHostname
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_HOSTNAME
);
curPassword
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_PASSWORD
);
curPassword
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_PASSWORD
);
curUsername
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_USERNAME
);
curUsername
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_USERNAME
);
curRouteSet
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_ROUTE
);
//
curRouteSet = g_hash_table_lookup(currentAccount->properties, ACCOUNT_ROUTE);
curMailbox
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_MAILBOX
);
curMailbox
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_MAILBOX
);
curUseragent
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_USERAGENT
);
curUseragent
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_USERAGENT
);
}
}
gnome_main_section_new
(
_
(
"Account Parameters"
),
&
frame
);
gnome_main_section_new
(
_
(
"Account Parameters"
),
&
frame
);
gtk_widget_show
(
frame
);
gtk_widget_show
(
frame
);
...
@@ -310,6 +310,7 @@ static GtkWidget* create_basic_tab (account_t **a) {
...
@@ -310,6 +310,7 @@ static GtkWidget* create_basic_tab (account_t **a) {
}
}
else
else
{
{
DEBUG
(
"Config: Error: Account protocol not valid"
);
/* Should never come here, add debug message. */
/* Should never come here, add debug message. */
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
protocolComboBox
),
_
(
"Unknown"
));
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
protocolComboBox
),
_
(
"Unknown"
));
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
protocolComboBox
),
2
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
protocolComboBox
),
2
);
...
@@ -411,7 +412,6 @@ static GtkWidget* create_basic_tab (account_t **a) {
...
@@ -411,7 +412,6 @@ static GtkWidget* create_basic_tab (account_t **a) {
gtk_entry_set_text
(
GTK_ENTRY
(
entryUseragent
),
curUseragent
);
gtk_entry_set_text
(
GTK_ENTRY
(
entryUseragent
),
curUseragent
);
gtk_table_attach
(
GTK_TABLE
(
table
),
entryUseragent
,
1
,
2
,
row
,
row
+
1
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
gtk_table_attach
(
GTK_TABLE
(
table
),
entryUseragent
,
1
,
2
,
row
,
row
+
1
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
gtk_widget_show_all
(
table
);
gtk_widget_show_all
(
table
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
table
),
10
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
table
),
10
);
...
@@ -818,7 +818,6 @@ GtkWidget* create_credential_widget (account_t **a) {
...
@@ -818,7 +818,6 @@ GtkWidget* create_credential_widget (account_t **a) {
// same_as_local_cb (sameAsLocalRadioButton, NULL);
// same_as_local_cb (sameAsLocalRadioButton, NULL);
// set_published_addr_manually_cb (publishedAddrRadioButton, NULL);
// set_published_addr_manually_cb (publishedAddrRadioButton, NULL);
return
frame
;
return
frame
;
}
}
...
@@ -1200,7 +1199,6 @@ GtkWidget* create_codecs_configuration (account_t **a) {
...
@@ -1200,7 +1199,6 @@ GtkWidget* create_codecs_configuration (account_t **a) {
gtk_widget_show
(
codecs
);
gtk_widget_show
(
codecs
);
gtk_container_add
(
GTK_CONTAINER
(
codecs
)
,
box
);
gtk_container_add
(
GTK_CONTAINER
(
codecs
)
,
box
);
// Add DTMF type selection for SIP account only
// Add DTMF type selection for SIP account only
p
=
g_hash_table_lookup
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_TYPE
));
p
=
g_hash_table_lookup
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_TYPE
));
if
(
g_strcmp0
(
p
,
"SIP"
)
==
0
)
{
if
(
g_strcmp0
(
p
,
"SIP"
)
==
0
)
{
...
@@ -1279,16 +1277,19 @@ void show_account_window (account_t * a) {
...
@@ -1279,16 +1277,19 @@ void show_account_window (account_t * a) {
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
tab
,
gtk_label_new
(
_
(
"Basic"
)));
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
tab
,
gtk_label_new
(
_
(
"Basic"
)));
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
tab
);
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
tab
);
g_signal_emit_by_name
((
gpointer
)
protocolComboBox
,
"changed"
,
NULL
);
// TODO: Fix this GTK critical (when opening account config dialog twice)
// DEBUG("---------------------------");
g_signal_emit_by_name
(
GTK_WIDGET
(
protocolComboBox
),
"changed"
,
NULL
);
// DEBUG("---------------------------");
}
}
/* Codecs */
/* Codecs */
codecs_tab
=
create_codecs_configuration
(
&
currentAccount
);
codecs_tab
=
create_codecs_configuration
(
&
currentAccount
);
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
codecs_tab
,
gtk_label_new
(
_
(
"Codecs"
)));
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
codecs_tab
,
gtk_label_new
(
_
(
"Codecs"
)));
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
codecs_tab
);
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
codecs_tab
);
// Get protocol
// Get protocol
gchar
*
proto
=
"SIP"
;
gchar
*
proto
=
"SIP"
;
proto
=
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
protocolComboBox
));
proto
=
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
protocolComboBox
));
...
@@ -1372,9 +1373,12 @@ void show_account_window (account_t * a) {
...
@@ -1372,9 +1373,12 @@ void show_account_window (account_t * a) {
g_strdup
(
ACCOUNT_REGISTRATION_EXPIRE
),
g_strdup
(
ACCOUNT_REGISTRATION_EXPIRE
),
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
expireSpinBox
))));
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
expireSpinBox
))));
/*
// TODO: uncomment this code and implement route
g_hash_table_replace(currentAccount->properties,
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_ROUTE),
g_strdup(ACCOUNT_ROUTE),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryRouteSet))));
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryRouteSet))));
*/
g_hash_table_replace
(
currentAccount
->
properties
,
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_USERAGENT
),
g_strdup
(
ACCOUNT_USERAGENT
),
...
@@ -1412,8 +1416,6 @@ void show_account_window (account_t * a) {
...
@@ -1412,8 +1416,6 @@ void show_account_window (account_t * a) {
published_address
);
published_address
);
}
}
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
overrtp
)))
{
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
overrtp
)))
{
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_DTMF_TYPE
),
g_strdup
(
OVERRTP
));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_DTMF_TYPE
),
g_strdup
(
OVERRTP
));
}
}
...
@@ -1441,7 +1443,6 @@ void show_account_window (account_t * a) {
...
@@ -1441,7 +1443,6 @@ void show_account_window (account_t * a) {
g_strdup
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
useSipTlsCheckBox
))
?
"true"
:
"false"
));
g_strdup
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
useSipTlsCheckBox
))
?
"true"
:
"false"
));
}
}
g_hash_table_replace
(
currentAccount
->
properties
,
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
LOCAL_INTERFACE
),
g_strdup
(
LOCAL_INTERFACE
),
g_strdup
((
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
localAddressCombo
))));
g_strdup
((
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
localAddressCombo
))));
...
...
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