Move queue initialization to queues.c
This commit is contained in:
parent
7f335b79d2
commit
7110734b6e
@ -240,10 +240,7 @@ static void teardown(void)
|
||||
int dunst_main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
/*TODO: move to queues.c */
|
||||
history = g_queue_new();
|
||||
displayed = g_queue_new();
|
||||
queue = g_queue_new();
|
||||
queues_init();
|
||||
|
||||
cmdline_load(argc, argv);
|
||||
|
||||
|
@ -14,6 +14,13 @@ GQueue *queue = NULL; /* all new notifications get into here */
|
||||
GQueue *displayed = NULL; /* currently displayed notifications */
|
||||
GQueue *history = NULL; /* history of displayed notifications */
|
||||
|
||||
void queues_init(void)
|
||||
{
|
||||
history = g_queue_new();
|
||||
displayed = g_queue_new();
|
||||
queue = g_queue_new();
|
||||
}
|
||||
|
||||
bool notification_replace_by_id(notification *new)
|
||||
{
|
||||
|
||||
|
@ -9,6 +9,11 @@ extern GQueue *queue;
|
||||
extern GQueue *displayed;
|
||||
extern GQueue *history;
|
||||
|
||||
/*
|
||||
* Initialise neccessary queues
|
||||
*/
|
||||
void queues_init(void);
|
||||
|
||||
/*
|
||||
* Replace the notification which matches the id field of
|
||||
* the new notification. The given notification is inserted
|
||||
|
Loading…
x
Reference in New Issue
Block a user