Skip to content

Commit eaee466

Browse files
committed
Fix dunstify get/set id
1 parent 3f9ca0e commit eaee466

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

dunstify.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,20 +169,16 @@ void parse_commandline(int argc, char *argv[])
169169
}
170170
}
171171

172-
int get_id(NotifyNotification *n)
172+
gint get_id(NotifyNotification *n)
173173
{
174-
GValue value = G_VALUE_INIT;
175-
g_value_init(&value, G_TYPE_UINT);
176-
g_object_get_property(G_OBJECT(n), "id", &value);
177-
return g_value_get_int(&value);
174+
gint32 id;
175+
g_object_get(G_OBJECT(n), "id", &id, NULL);
176+
return id;
178177
}
179178

180179
void put_id(NotifyNotification *n, guint32 id)
181180
{
182-
GValue value = G_VALUE_INIT;
183-
g_value_init(&value, G_TYPE_UINT);
184-
g_value_set_uint(&value, id);
185-
g_object_set_property(G_OBJECT(n), "id", &value);
181+
g_object_set(G_OBJECT(n), "id", &id, NULL);
186182
}
187183

188184
void actioned(NotifyNotification *n, char *a, gpointer foo)

0 commit comments

Comments
 (0)