Commit d96d61c0 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

System tray icon: add tooltip and blinking on incoming calls

parent c76182bd
......@@ -221,6 +221,7 @@ sflphone_pick_up()
sflphone_place_call (selectedCall);
break;
case CALL_STATE_INCOMING:
status_tray_icon_blink();
dbus_accept (selectedCall);
break;
case CALL_STATE_HOLD:
......
......@@ -28,6 +28,7 @@
#include <mainwindow.h>
#include <marshaller.h>
#include <sliders.h>
#include <statusicon.h>
#include <dbus.h>
#include <actions.h>
......@@ -53,6 +54,7 @@ incoming_call_cb (DBusGProxy *proxy,
c->from = g_strdup(from);
c->state = CALL_STATE_INCOMING;
status_tray_icon_blink();
sflphone_incoming_call (c);
}
......
......@@ -20,6 +20,7 @@
#include <gtk/gtk.h>
#include <actions.h>
#include <mainwindow.h>
#include <accountlist.h>
#include <statusicon.h>
GtkStatusIcon* status;
......@@ -107,5 +108,16 @@ show_status_icon()
g_signal_connect (G_OBJECT (status), "popup-menu",
G_CALLBACK (menu),
create_menu());
// Add a tooltip to the system tray icon
gchar* tip = malloc(500);
sprintf( tip , "SFLphone - %i accounts registered" , account_list_get_size());
gtk_status_icon_set_tooltip( status , tip );
g_free(tip);
}
void
status_tray_icon_blink( )
{
gtk_status_icon_set_blinking( status , !gtk_status_icon_get_blinking( status ) );
}
......@@ -26,6 +26,7 @@
*/
void show_status_icon();
void status_icon_unminimize();
void status_tray_icon_blink();
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment