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
86b6b284
Commit
86b6b284
authored
15 years ago
by
pierre-luc
Browse files
Options
Downloads
Patches
Plain Diff
[#2157] Hide "security" and "advanced" tabs for IAX under account
configuration dialog
parent
c1e6bf55
Branches
Branches containing commit
Tags
Tags containing commit
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
+35
-22
35 additions, 22 deletions
sflphone-client-gnome/src/config/accountconfigdialog.c
with
35 additions
and
22 deletions
sflphone-client-gnome/src/config/accountconfigdialog.c
+
35
−
22
View file @
86b6b284
...
...
@@ -50,7 +50,7 @@ GtkWidget * hbox;
GtkWidget
*
label
;
GtkWidget
*
entryID
;
GtkWidget
*
entryAlias
;
GtkWidget
*
entryP
rotocol
;
GtkWidget
*
p
rotocol
ComboBox
;
GtkWidget
*
entryUsername
;
GtkWidget
*
entryHostname
;
GtkWidget
*
entryPassword
;
...
...
@@ -78,6 +78,9 @@ GtkWidget * stunServerLabel;
GtkWidget
*
stunServerEntry
;
GtkWidget
*
displayNameEntry
;
GtkWidget
*
security_tab
;
GtkWidget
*
advanced_tab
;
// Credentials
enum
{
...
...
@@ -88,11 +91,19 @@ enum {
COLUMN_CREDENTIAL_COUNT
};
/* Signal to
entryP
rotocol 'changed' */
/* Signal to
p
rotocol
ComboBox
'changed' */
void
change_protocol
(
account_t
*
currentAccount
UNUSED
)
change_protocol
_cb
(
account_t
*
currentAccount
UNUSED
)
{
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
entryProtocol
));
gchar
*
protocol
=
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
protocolComboBox
));
if
(
g_strcasecmp
(
protocol
,
"IAX"
)
==
0
)
{
gtk_widget_hide
(
security_tab
);
gtk_widget_hide
(
advanced_tab
);
}
else
{
gtk_widget_show
(
security_tab
);
gtk_widget_show
(
advanced_tab
);
}
}
int
...
...
@@ -170,29 +181,29 @@ static GtkWidget * create_basic_tab(account_t **a)
label
=
gtk_label_new_with_mnemonic
(
_
(
"_Protocol"
));
gtk_table_attach
(
GTK_TABLE
(
table
),
label
,
0
,
1
,
1
,
2
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
gtk_misc_set_alignment
(
GTK_MISC
(
label
),
0
,
0
.
5
);
entryP
rotocol
=
gtk_combo_box_new_text
();
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label
),
entryP
rotocol
);
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
entryP
rotocol
),
"SIP"
);
if
(
is_iax_enabled
()
)
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
entryP
rotocol
),
"IAX"
);
p
rotocol
ComboBox
=
gtk_combo_box_new_text
();
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label
),
p
rotocol
ComboBox
);
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
),
"SIP"
);
if
(
is_iax_enabled
()
)
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
),
"IAX"
);
if
(
strcmp
(
curAccountType
,
"SIP"
)
==
0
)
{
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
entryP
rotocol
),
0
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
),
0
);
}
else
if
(
strcmp
(
curAccountType
,
"IAX"
)
==
0
)
{
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
entryP
rotocol
),
1
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
),
1
);
}
else
{
/* Should never come here, add debug message. */
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
entryP
rotocol
),
_
(
"Unknown"
));
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
entryP
rotocol
),
2
);
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
),
_
(
"Unknown"
));
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
),
2
);
}
gtk_table_attach
(
GTK_TABLE
(
table
),
entryP
rotocol
,
1
,
2
,
1
,
2
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
gtk_table_attach
(
GTK_TABLE
(
table
),
p
rotocol
ComboBox
,
1
,
2
,
1
,
2
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
/* Link signal 'changed' */
g_signal_connect
(
G_OBJECT
(
GTK_COMBO_BOX
(
entryP
rotocol
)),
"changed"
,
G_CALLBACK
(
change_protocol
),
g_signal_connect
(
G_OBJECT
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
)),
"changed"
,
G_CALLBACK
(
change_protocol
_cb
),
currentAccount
);
label
=
gtk_label_new_with_mnemonic
(
_
(
"_Host name"
));
...
...
@@ -890,22 +901,24 @@ show_account_window (account_t * a)
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
tab
);
/* Advanced */
tab
=
create_advanced_tab
(
&
currentAccount
);
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
tab
,
gtk_label_new
(
_
(
"Advanced"
)));
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
tab
);
advanced_
tab
=
create_advanced_tab
(
&
currentAccount
);
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
advanced_
tab
,
gtk_label_new
(
_
(
"Advanced"
)));
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
advanced_
tab
);
/* Security */
tab
=
create_security_tab
(
&
currentAccount
);
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
tab
,
gtk_label_new
(
_
(
"Security"
)));
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
tab
);
security_
tab
=
create_security_tab
(
&
currentAccount
);
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
security_
tab
,
gtk_label_new
(
_
(
"Security"
)));
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
security_
tab
);
gtk_notebook_set_current_page
(
GTK_NOTEBOOK
(
notebook
)
,
0
);
g_signal_emit_by_name
(
protocolComboBox
,
"changed"
,
NULL
);
response
=
gtk_dialog_run
(
GTK_DIALOG
(
dialog
));
if
(
response
==
GTK_RESPONSE_ACCEPT
)
{
gchar
*
proto
=
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
entryP
rotocol
));
gchar
*
proto
=
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
p
rotocol
ComboBox
));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_RESOLVE_ONCE
),
...
...
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