Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
d7360c35
Commit
d7360c35
authored
Apr 04, 2008
by
Emmanuel Milou
Browse files
Add switching account from the main window
With a right- click when dialing
parent
cd66e363
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
sflphone-gtk/src/accountlist.c
View file @
d7360c35
...
...
@@ -24,6 +24,7 @@
GQueue
*
accountQueue
;
gchar
*
DEFAULT_ACCOUNT
=
NULL
;
gchar
*
CURRENT_ACCOUNT
=
NULL
;
/* GCompareFunc to compare a accountID (gchar* and a account_t) */
gint
...
...
@@ -139,6 +140,18 @@ account_list_set_default(const gchar * accountID)
g_print
(
"DEFAULT_ACCOUNT = %s
\n
"
,
DEFAULT_ACCOUNT
);
}
gchar
*
account_list_get_current
(
)
{
return
CURRENT_ACCOUNT
;
}
void
account_list_set_current
(
const
gchar
*
accountID
)
{
CURRENT_ACCOUNT
=
g_strdup
(
accountID
);
}
const
gchar
*
account_state_name
(
account_state_t
s
)
{
gchar
*
state
;
...
...
sflphone-gtk/src/accountlist.h
View file @
d7360c35
...
...
@@ -111,6 +111,16 @@ gchar * account_list_get_default( );
*/
void
account_list_set_default
(
const
gchar
*
accountID
);
/** Return the current account id
* @return The current account id
*/
gchar
*
account_list_get_current
(
);
/** This function sets an account as the current one
* @param accountID The ID of the current account
*/
void
account_list_set_current
(
const
gchar
*
accountID
);
/** This function maps account_state_t enums to a description.
* @param s The state
* @return The full text description of the state */
...
...
sflphone-gtk/src/actions.c
View file @
d7360c35
...
...
@@ -88,7 +88,7 @@ status_bar_display_account( call_t* c)
acc
=
account_list_get_by_id
(
c
->
accountID
);
else
acc
=
account_list_get_by_id
(
account_list_get_default
());
msg
=
g_markup_printf_escaped
(
"%s account
:
%s"
,
msg
=
g_markup_printf_escaped
(
"
Default:
%s account
-
%s"
,
g_hash_table_lookup
(
acc
->
properties
,
ACCOUNT_TYPE
),
g_hash_table_lookup
(
acc
->
properties
,
ACCOUNT_ALIAS
));
status_bar_message_add
(
msg
,
__MSG_ACCOUNT_DEFAULT
);
...
...
@@ -585,14 +585,20 @@ sflphone_place_call ( call_t * c )
if
(
c
->
state
==
CALL_STATE_DIALING
)
{
account_t
*
account
;
gchar
*
default_account
=
account_list_get_default
();
account
=
account_list_get_by_id
(
default_account
);
gchar
*
account_id
=
account_list_get_current
();
if
(
account_id
==
NULL
){
account_id
=
account_list_get_default
();
account
=
account_list_get_by_id
(
account_id
);
}
else
account
=
account_list_get_by_id
(
account_id
);
// Here : account_id is either the default one, either the current one selected with a right-click
if
(
account
)
{
if
(
strcmp
(
g_hash_table_lookup
(
account
->
properties
,
"Status"
),
"REGISTERED"
)
==
0
)
{
c
->
accountID
=
default_
account
;
c
->
accountID
=
account
_id
;
dbus_place_call
(
c
);
}
else
...
...
sflphone-gtk/src/menus.c
View file @
d7360c35
This diff is collapsed.
Click to expand it.
src/managerimpl.cpp
View file @
d7360c35
...
...
@@ -1461,7 +1461,6 @@ ManagerImpl::isStartHidden( void )
void
ManagerImpl
::
switchPopupMode
(
void
)
{
_debug
(
"Switch popup mode
\n
"
);
(
getConfigInt
(
PREFERENCES
,
CONFIG_POPUP
)
==
WINDOW_POPUP
)
?
setConfig
(
PREFERENCES
,
CONFIG_POPUP
,
NO_STR
)
:
setConfig
(
PREFERENCES
,
CONFIG_POPUP
,
YES_STR
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment