[gnome-flashback] notifications: remove static queue_object
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] notifications: remove static queue_object
- Date: Fri, 3 Jan 2020 22:38:27 +0000 (UTC)
commit fa59e8177d162fe254f1689b45cdf3d7a363cfb3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Jan 2 18:29:17 2020 +0200
notifications: remove static queue_object
gnome-flashback/libnotifications/nd-queue.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/gnome-flashback/libnotifications/nd-queue.c b/gnome-flashback/libnotifications/nd-queue.c
index 23d62ee..9f4fc1b 100644
--- a/gnome-flashback/libnotifications/nd-queue.c
+++ b/gnome-flashback/libnotifications/nd-queue.c
@@ -62,8 +62,6 @@ static void on_notification_close (NdNotification *notification,
int reason,
NdQueue *queue);
-static gpointer queue_object = NULL;
-
G_DEFINE_TYPE_WITH_PRIVATE (NdQueue, nd_queue, G_TYPE_OBJECT)
static void
@@ -966,13 +964,5 @@ nd_queue_add (NdQueue *queue,
NdQueue *
nd_queue_new (void)
{
- if (queue_object != NULL) {
- g_object_ref (queue_object);
- } else {
- queue_object = g_object_new (ND_TYPE_QUEUE, NULL);
- g_object_add_weak_pointer (queue_object,
- (gpointer *) &queue_object);
- }
-
- return ND_QUEUE (queue_object);
+ return g_object_new (ND_TYPE_QUEUE, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]