static gboolean activate_event (EmpathyEvent *event) { empathy_event_activate (event); return FALSE; }
static void notification_action_cb (NotifyNotification *notification, gchar *action, EmpathyStatusIcon *icon) { EmpathyStatusIconPriv *priv = GET_PRIV (icon); if (priv->event) empathy_event_activate (priv->event); }
static void status_icon_activate_cb (GtkStatusIcon *status_icon, EmpathyStatusIcon *icon) { EmpathyStatusIconPriv *priv = GET_PRIV (icon); DEBUG ("%s", priv->event ? "event" : "toggle"); if (priv->event) { empathy_event_activate (priv->event); } else { status_icon_toggle_visibility (icon); } }
static void main_window_row_activated_cb (EmpathyContactListView *view, GtkTreePath *path, GtkTreeViewColumn *col, EmpathyMainWindow *window) { EmpathyContact *contact; GtkTreeModel *model; GtkTreeIter iter; GSList *events, *l; model = GTK_TREE_MODEL (window->list_store); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact, -1); if (!contact) { return; } /* If the contact has an event activate it, otherwise the * default handler of row-activated will be called. */ events = empathy_event_manager_get_events (window->event_manager); for (l = events; l; l = l->next) { EmpathyEvent *event = l->data; if (event->contact == contact) { DEBUG ("Activate event"); empathy_event_activate (event); /* We don't want the default handler of this signal * (e.g. open a chat) */ g_signal_stop_emission_by_name (view, "row-activated"); break; } } g_object_unref (contact); }