Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
1093d618
Commit
1093d618
authored
Sep 29, 2007
by
Pierre-Luc Beaudoin
Browse files
Account's Trying state in UI
parent
31a51a63
Changes
7
Hide whitespace changes
Inline
Side-by-side
sflphone-gtk/src/accountlist.c
View file @
1093d618
...
...
@@ -115,15 +115,24 @@ const gchar * account_state_name(account_state_t s)
switch
(
s
)
{
case
ACCOUNT_STATE_REGISTERED
:
state
=
"Registered"
;
break
;
state
=
"Registered"
;
break
;
case
ACCOUNT_STATE_UNREGISTERED
:
state
=
"Not Registered"
;
break
;
state
=
"Not Registered"
;
break
;
case
ACCOUNT_STATE_TRYING
:
state
=
"Trying..."
;
break
;
default:
state
=
"Invalid"
;
break
;
state
=
"Invalid"
;
break
;
}
return
state
;
}
void
account_list_clear
(
)
{
g_queue_free
(
accountQueue
);
accountQueue
=
g_queue_new
();
}
sflphone-gtk/src/accountlist.h
View file @
1093d618
...
...
@@ -49,7 +49,8 @@ typedef enum
{
ACCOUNT_STATE_INVALID
=
0
,
ACCOUNT_STATE_REGISTERED
,
ACCOUNT_STATE_UNREGISTERED
ACCOUNT_STATE_UNREGISTERED
,
ACCOUNT_STATE_TRYING
}
account_state_t
;
/** @struct account_t
...
...
@@ -99,4 +100,6 @@ account_t * account_list_get_nth ( guint n );
* @param s The state
* @return The full text description of the state */
const
gchar
*
account_state_name
(
account_state_t
s
);
void
account_list_clear
(
);
#endif
sflphone-gtk/src/actions.c
View file @
1093d618
...
...
@@ -89,6 +89,8 @@ sflphone_ringing(call_t * c )
void
sflphone_fill_account_list
()
{
account_list_clear
(
);
gchar
**
array
=
(
gchar
**
)
dbus_account_list
();
gchar
**
accountID
;
for
(
accountID
=
array
;
*
accountID
;
accountID
++
)
...
...
@@ -115,6 +117,10 @@ sflphone_fill_account_list()
{
a
->
state
=
ACCOUNT_STATE_UNREGISTERED
;
}
else
if
(
strcmp
(
status
,
"TRYING"
)
==
0
)
{
a
->
state
=
ACCOUNT_STATE_TRYING
;
}
else
{
a
->
state
=
ACCOUNT_STATE_INVALID
;
...
...
sflphone-gtk/src/actions.h
View file @
1093d618
...
...
@@ -100,4 +100,5 @@ void sflphone_keypad ( guint keyval, gchar * key);
*/
void
sflphone_place_call
(
call_t
*
c
);
void
sflphone_fill_account_list
();
#endif
sflphone-gtk/src/dbus.c
View file @
1093d618
...
...
@@ -141,6 +141,7 @@ accounts_changed_cb (DBusGProxy *proxy,
void
*
foo
)
{
g_print
(
"Accounts changed
\n
"
);
sflphone_fill_account_list
();
// TODO reload list
}
...
...
src/dbus/configurationmanager.cpp
View file @
1093d618
...
...
@@ -68,7 +68,6 @@ ConfigurationManager::getAccountList( )
{
_debug
(
"ConfigurationManager::getAccountList received
\n
"
);
return
Manager
::
instance
().
getAccountList
();
}
...
...
src/managerimpl.cpp
View file @
1093d618
...
...
@@ -1584,9 +1584,9 @@ ManagerImpl::getAccountDetails(const AccountID& accountID)
std
::
pair
<
std
::
string
,
std
::
string
>
(
"Status"
,
(
state
==
VoIPLink
::
Registered
?
"REGISTERED"
:
(
state
==
VoIPLink
::
Unregistered
?
"UNREGISTERED"
:
(
state
==
VoIPLink
::
Trying
?
"TRYING"
:
(
state
==
VoIPLink
::
Error
?
"ERROR"
:
"UNKNOWN"
))))
(
state
==
VoIPLink
::
Unregistered
?
"UNREGISTERED"
:
(
state
==
VoIPLink
::
Trying
?
"TRYING"
:
(
state
==
VoIPLink
::
Error
?
"ERROR"
:
"UNKNOWN"
))))
)
);
a
.
insert
(
...
...
@@ -1721,15 +1721,6 @@ void
ManagerImpl
::
removeAccount
(
const
AccountID
&
accountID
)
{
_config
.
removeSection
(
accountID
);
//TODO
/*AccountMap::iterator iter = _accountMap.begin();
while ( iter != _accountMap.end() ) {
_debug("Account %s == %s ", iter->first, accountID);
if ( iter->first == accountID ) {
_accountMap.erase(iter);
}
iter++;
}*/
saveConfig
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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