Пример #1
0
static void
status_icon_event_removed_cb (EmpathyEventManager *manager,
			      EmpathyEvent        *event,
			      EmpathyStatusIcon   *icon)
{
	EmpathyStatusIconPriv *priv = GET_PRIV (icon);

	if (event != priv->event) {
		return;
	}

	priv->event = empathy_event_manager_get_top_event (priv->event_manager);

	status_icon_update_tooltip (icon);
	status_icon_update_icon (icon);

	/* update notification anyway, as it's safe and we might have been
	 * changed presence in the meanwhile
	 */
	status_icon_update_notification (icon);

	if (!priv->event && priv->blink_timeout) {
		g_source_remove (priv->blink_timeout);
		priv->blink_timeout = 0;
	}
}
Пример #2
0
static void
status_icon_event_added_cb (EmpathyEventManager *manager,
			    EmpathyEvent        *event,
			    EmpathyStatusIcon   *icon)
{
	EmpathyStatusIconPriv *priv = GET_PRIV (icon);

	if (priv->event) {
		return;
	}

	DEBUG ("New event %p", event);

	priv->event = event;
	if (event->must_ack) {
		priv->showing_event_icon = TRUE;
		status_icon_update_icon (icon);
		status_icon_update_tooltip (icon);
	}
	status_icon_update_notification (icon);

	if (!priv->blink_timeout && priv->showing_event_icon) {
		priv->blink_timeout = g_timeout_add (BLINK_TIMEOUT,
						     (GSourceFunc) status_icon_blink_timeout_cb,
						     icon);
	}
}
Пример #3
0
static void
status_icon_presence_changed_cb (EmpathyStatusIcon *icon)
{
	EmpathyStatusIconPriv *priv = GET_PRIV (icon);

	status_icon_update_icon (icon);
	status_icon_update_tooltip (icon);

	if (!empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
		/* dismiss the outstanding notification if present */

		if (priv->notification) {
			notify_notification_close (priv->notification, NULL);
			priv->notification = NULL;
		}
	}
}
Пример #4
0
static void
status_icon_event_updated_cb (EmpathyEventManager *manager,
			      EmpathyEvent        *event,
			      EmpathyStatusIcon   *icon)
{
	EmpathyStatusIconPriv *priv = GET_PRIV (icon);

	if (event != priv->event) {
		return;
	}

	if (empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
		status_icon_update_notification (icon);
	}

	status_icon_update_tooltip (icon);
}
Пример #5
0
static void
status_icon_idle_notify_cb (EmpathyStatusIcon *icon)
{
	EmpathyStatusIconPriv *priv = GET_PRIV (icon);

	status_icon_update_icon (icon);
	status_icon_update_tooltip (icon);

	if (!empathy_notification_is_enabled ()) {
		/* dismiss the outstanding notification if present */

		if (priv->notification) {
			notify_notification_close (priv->notification, NULL);
			g_object_unref (priv->notification);
			priv->notification = NULL;
		}
	}
}
static void
status_icon_event_removed_cb (EmpathyEventManager *manager,
                              EmpathyEvent        *event,
                              EmpathyStatusIcon   *icon)
{
    EmpathyStatusIconPriv *priv = GET_PRIV (icon);

    if (event != priv->event) {
        return;
    }

    priv->event = empathy_event_manager_get_top_event (priv->event_manager);

    status_icon_update_tooltip (icon);
    status_icon_update_icon (icon);

    if (!priv->event && priv->blink_timeout) {
        g_source_remove (priv->blink_timeout);
        priv->blink_timeout = 0;
    }
}
static void
status_icon_idle_notify_cb (EmpathyStatusIcon *icon)
{
    status_icon_update_icon (icon);
    status_icon_update_tooltip (icon);
}