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

System tray icon: add tooltip and blinking on incoming calls

parent c76182bd
No related branches found
No related tags found
No related merge requests found
...@@ -221,6 +221,7 @@ sflphone_pick_up() ...@@ -221,6 +221,7 @@ sflphone_pick_up()
sflphone_place_call (selectedCall); sflphone_place_call (selectedCall);
break; break;
case CALL_STATE_INCOMING: case CALL_STATE_INCOMING:
status_tray_icon_blink();
dbus_accept (selectedCall); dbus_accept (selectedCall);
break; break;
case CALL_STATE_HOLD: case CALL_STATE_HOLD:
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <mainwindow.h> #include <mainwindow.h>
#include <marshaller.h> #include <marshaller.h>
#include <sliders.h> #include <sliders.h>
#include <statusicon.h>
#include <dbus.h> #include <dbus.h>
#include <actions.h> #include <actions.h>
...@@ -53,6 +54,7 @@ incoming_call_cb (DBusGProxy *proxy, ...@@ -53,6 +54,7 @@ incoming_call_cb (DBusGProxy *proxy,
c->from = g_strdup(from); c->from = g_strdup(from);
c->state = CALL_STATE_INCOMING; c->state = CALL_STATE_INCOMING;
status_tray_icon_blink();
sflphone_incoming_call (c); sflphone_incoming_call (c);
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <actions.h> #include <actions.h>
#include <mainwindow.h> #include <mainwindow.h>
#include <accountlist.h>
#include <statusicon.h> #include <statusicon.h>
GtkStatusIcon* status; GtkStatusIcon* status;
...@@ -107,5 +108,16 @@ show_status_icon() ...@@ -107,5 +108,16 @@ show_status_icon()
g_signal_connect (G_OBJECT (status), "popup-menu", g_signal_connect (G_OBJECT (status), "popup-menu",
G_CALLBACK (menu), G_CALLBACK (menu),
create_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 @@ ...@@ -26,6 +26,7 @@
*/ */
void show_status_icon(); void show_status_icon();
void status_icon_unminimize(); void status_icon_unminimize();
void status_tray_icon_blink();
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment