@0xd34df00d: *noc *.net *grouzenEnjoy your C! Из справки по нотификейшнам в убунте:
C:
capabilities = notify_get_server_caps();
if(capabilities != NULL) {
for(c = capabilities; c != NULL; c = c->next) {
if(strcmp((char*)c->data, "actions") == 0 ) {
accepts_actions = TRUE;
break;
}
}
g_list_foreach(capabilities, (GFunc)g_free, NULL);
g_list_free(capabilities);
}
/ Adds "Previous" and "Next" buttons in the notification if allowed. /
if(accepts_actions) {
notify_notification_add_action(
notification, "previous", _("Previous"), Prev, (gpointer*) p_intf, NULL);
notify_notification_add_action(
notification, "next", _("Next"), Next, (gpointer*) p_intf, NULL );
}
C#:
bool accepts_actions = Notifications.Global.Capabilities != null &&
Notifications.Global.Capabilities.Contains("actions");
if (accepts_actions) {
nf.AddAction ("previous", Catalog.GetString("Previous"), OnSongPrevious);
nf.AddAction ("next", Catalog.GetString("Next"), OnSongPrevious);
}