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

History - Entirely functionnal ?

+ stop desktop notification if an action occured before the timeout
parent 323cde5c
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,7 @@ sflphone_hung_up( call_t * c)
{
call_list_remove( current_calls, c->callID);
update_call_tree_remove(current_calls, c);
c->state = CALL_STATE_DIALING;
update_menus();
status_tray_icon_blink( FALSE );
}
......@@ -231,6 +232,7 @@ sflphone_hang_up()
case CALL_STATE_INCOMING:
dbus_refuse (selectedCall);
selectedCall->state = CALL_STATE_DIALING;
stop_notification();
break;
case CALL_STATE_TRANSFERT:
dbus_hang_up (selectedCall);
......@@ -255,7 +257,10 @@ sflphone_pick_up()
sflphone_place_call (selectedCall);
break;
case CALL_STATE_INCOMING:
selectedCall->history_state = INCOMING;
update_call_tree( history , selectedCall );
dbus_accept (selectedCall);
stop_notification();
break;
case CALL_STATE_HOLD:
sflphone_new_call();
......@@ -510,9 +515,11 @@ sflphone_keypad( guint keyval, gchar * key)
c->history_state = INCOMING;
update_call_tree( history , c );
dbus_accept(c);
stop_notification();
break;
case 65307: /* ESCAPE */
dbus_refuse(c);
stop_notification();
break;
}
break;
......
......@@ -60,6 +60,8 @@ notify_incoming_call( call_t* c )
answer_call_cb( NotifyNotification *notification, gpointer data )
{
call_t* c = (call_t*)g_object_get_data( G_OBJECT( notification ) , "call" );
c->history_state = INCOMING;
update_call_tree( history , c );
dbus_accept(c);
if( __POPUP_WINDOW )
status_icon_unminimize();
......@@ -213,3 +215,13 @@ notify_no_registered_accounts( )
g_print("notify(), failed to send notification\n");
}
}
void
stop_notification( void )
{
if(notify_notification_show( notification , NULL))
{
notify_notification_close( notification , NULL);
g_object_unref( notification );
}
}
......@@ -97,4 +97,9 @@ void ignore_call_cb( NotifyNotification *notification, gpointer data );
*/
void setup_accounts_cb(NotifyNotification *notification, gpointer data);
/**
* Stop and close the current notification if an action occured before the timeout
*/
void stop_notification( void );
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment