Beispiel #1
0
int
cb_notify(E_Notification_Daemon *daemon, E_Notification *n)
{
  Daemon_Data *dd;
  unsigned int replaces_id;
  unsigned int new_id;

  dd = e_notification_daemon_data_get(daemon);
  replaces_id = e_notification_replaces_id_get(n);
  if (replaces_id) 
  {
    // close old one flagged as replaced
  }

  new_id = dd->next_id++;
  e_notification_id_set(n, new_id);

  daemon_note_show(dd, n);

  return new_id;
}
Beispiel #2
0
static unsigned int
_notification_notify(E_Notification *n)
{
   const char *appname;
   unsigned int replaces_id, new_id;
   int popuped;

   if (e_desklock_state_get()) return 0;
   appname = e_notification_app_name_get(n);
   replaces_id = e_notification_replaces_id_get(n);
   if (replaces_id) new_id = replaces_id;
   else new_id = notification_cfg->next_id++;

   e_notification_id_set(n, new_id);

   popuped = notification_popup_notify(n, replaces_id, appname);
   if (!popuped)
     {
        e_notification_hint_urgency_set(n, 4);
        notification_popup_notify(n, replaces_id, appname);
     }

   return new_id;
}
Beispiel #3
0
   if (_notify_daemon) e_notification_daemon_free(_notify_daemon);

   /* shutdown notification subsystem */
   e_notification_daemon_shutdown();

   return 1;
}

static int 
_e_mod_notify_cb_add(E_Notification_Daemon *d __UNUSED__, E_Notification *n) 
{
   Ind_Notify_Win *nwin;
   unsigned int replace;
   double timeout;

   replace = e_notification_replaces_id_get(n);
   if (!replace) 
     {
        _notify_id++;
        e_notification_id_set(n, _notify_id);
     }
   else
     e_notification_id_set(n, replace);

   if ((replace) && (nwin = _e_mod_notify_find(replace)))
     {
        e_notification_ref(n);
        if (nwin->notify) e_notification_unref(nwin->notify);
        nwin->notify = n;
        _e_mod_notify_refresh(nwin);
     }