Skip to content
Snippets Groups Projects
Commit af7402ac authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

notify the user only for the current default account voicemail number

parent 2e3e1f5f
Branches
No related tags found
No related merge requests found
......@@ -223,3 +223,10 @@ account_list_get_registered_accounts( void )
g_print(" %d registered accounts \n" , res );
return res;
}
gchar* account_list_get_current_id( void ){
if( __CURRENT_ACCOUNT_ID == NULL )
return "";
else
return __CURRENT_ACCOUNT_ID;
}
......@@ -161,4 +161,10 @@ void account_list_move_up( guint index );
*/
void account_list_move_down( guint index );
/**
* Return the ID of the current default account
* @return gchar* The id
*/
gchar* account_list_get_current_id( void );
#endif
......@@ -39,8 +39,17 @@ guint voice_mails;
void
sflphone_notify_voice_mail ( const gchar* accountID , guint count )
{
gchar *id;
gchar *current;
// We want to notify only for the default current account; ie the first in the list
id = g_strdup( accountID );
current = account_list_get_current_id();
if( strcmp( id, current ) != 0 )
return;
voice_mails = count ;
gchar* id = g_strdup( accountID );
if(count > 0)
{
gchar * message = g_new0(gchar, 50);
......@@ -51,6 +60,7 @@ sflphone_notify_voice_mail ( const gchar* accountID , guint count )
statusbar_push_message(message, __MSG_VOICE_MAILS);
g_free(message);
}
// TODO: add ifdef
if( account_list_get_size() > 0 )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment