NtfNotification * ntf_tray_find_notification (NtfTray *tray, gint subsystem, gint id) { NtfTrayPrivate *priv; GList *notifiers, *l; NtfNotification *ntf = NULL; g_return_val_if_fail (NTF_IS_TRAY (tray), NULL); priv = tray->priv; notifiers = clutter_container_get_children (CLUTTER_CONTAINER (priv->notifiers)); for (l = notifiers; l; l = l->next) { gint s = ntf_notification_get_subsystem (NTF_NOTIFICATION (l->data)); gint i = ntf_notification_get_id (NTF_NOTIFICATION (l->data)); if (subsystem == s && id == i) { ntf = l->data; break; } } g_list_free (notifiers); return ntf; }
/* * Handler for the NtfNotify::closed signal */ static void ntf_libnotify_ntf_closed_cb (NtfNotification *ntf, gpointer dummy) { n_notifiers--; if (n_notifiers < 0) { g_warning ("Bug in notifier accounting, attempting to fix"); n_notifiers = 0; } ntf_libnotify_update_modal (); dawati_netbook_notify_store_close (store, ntf_notification_get_id (ntf), ClosedDismissed); }