empathy r1098 - trunk/src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1098 - trunk/src
- Date: Tue, 13 May 2008 17:26:26 +0100 (BST)
Author: xclaesse
Date: Tue May 13 16:26:26 2008
New Revision: 1098
URL: http://svn.gnome.org/viewvc/empathy?rev=1098&view=rev
Log:
Add a func to activate any event
Modified:
trunk/src/empathy-status-icon.c
Modified: trunk/src/empathy-status-icon.c
==============================================================================
--- trunk/src/empathy-status-icon.c (original)
+++ trunk/src/empathy-status-icon.c Tue May 13 16:26:26 2008
@@ -199,6 +199,27 @@
}
static void
+status_icon_event_activate (EmpathyStatusIcon *icon,
+ StatusIconEvent *event)
+{
+ EmpathyStatusIconPriv *priv = GET_PRIV (icon);
+
+ if (event->func) {
+ event->func (icon, event->user_data);
+ }
+
+ priv->events = g_slist_remove (priv->events, event);
+ status_icon_event_free (event);
+ status_icon_update_tooltip (icon);
+ status_icon_update_icon (icon);
+
+ if (!priv->events && priv->blink_timeout) {
+ g_source_remove (priv->blink_timeout);
+ priv->blink_timeout = 0;
+ }
+}
+
+static void
status_icon_activate_cb (GtkStatusIcon *status_icon,
EmpathyStatusIcon *icon)
{
@@ -207,21 +228,7 @@
DEBUG ("Activated: %s", priv->events ? "event" : "toggle");
if (priv->events) {
- StatusIconEvent *event;
-
- event = priv->events->data;
- if (event->func) {
- event->func (icon, event->user_data);
- }
- status_icon_event_free (event);
- priv->events = g_slist_remove (priv->events, event);
- status_icon_update_tooltip (icon);
- status_icon_update_icon (icon);
-
- if (!priv->events && priv->blink_timeout) {
- g_source_remove (priv->blink_timeout);
- priv->blink_timeout = 0;
- }
+ status_icon_event_activate (icon, priv->events->data);
} else {
status_icon_toggle_visibility (icon);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]