Pack Actions type into struct actions

This commit is contained in:
Benedikt Heine 2018-09-16 02:58:23 +02:00
parent a4ebf4f4e6
commit 8010f83286
3 changed files with 7 additions and 7 deletions

View File

@ -135,7 +135,7 @@ static notification *dbus_message_to_notification(const gchar *sender, GVariant
notification *n = notification_create(); notification *n = notification_create();
n->actions = g_malloc0(sizeof(Actions)); n->actions = g_malloc0(sizeof(struct actions));
n->dbus_client = g_strdup(sender); n->dbus_client = g_strdup(sender);
{ {

View File

@ -186,7 +186,7 @@ int notification_is_duplicate(const notification *a, const notification *b)
} }
/* see notification.h */ /* see notification.h */
void actions_free(Actions *a) void actions_free(struct actions *a)
{ {
if (!a) if (!a)
return; return;

View File

@ -36,11 +36,11 @@ typedef struct _raw_image {
unsigned char *data; unsigned char *data;
} RawImage; } RawImage;
typedef struct _actions { struct actions {
char **actions; char **actions;
char *dmenu_str; char *dmenu_str;
gsize count; gsize count;
} Actions; };
typedef struct _notification { typedef struct _notification {
int id; int id;
@ -59,7 +59,7 @@ typedef struct _notification {
gint64 timestamp; /**< arrival time */ gint64 timestamp; /**< arrival time */
gint64 timeout; /**< time to display */ gint64 timeout; /**< time to display */
Actions *actions; struct actions *actions;
enum markup_mode markup; enum markup_mode markup;
const char *format; const char *format;
@ -106,9 +106,9 @@ void notification_init(notification *n);
/** /**
* Free the actions structure * Free the actions structure
* *
* @param a (nullable): Pointer to #Actions * @param a (nullable): Pointer to #actions
*/ */
void actions_free(Actions *a); void actions_free(struct actions *a);
/** /**
* Free a #RawImage * Free a #RawImage