Commit 7e957376 authored by Ernestas Kulik's avatar Ernestas Kulik 🦑

application: control lifetime of task manager

parent 6dd8b504
......@@ -55,6 +55,8 @@
#define DEBUG_FLAG NAUTILUS_DEBUG_APPLICATION
#include "nautilus-debug.h"
#include "nautilus-task-manager.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......@@ -84,6 +86,8 @@ typedef struct
NautilusTagManager *tag_manager;
GCancellable *tag_manager_cancellable;
NautilusTaskManager *task_manager;
} NautilusApplicationPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (NautilusApplication, nautilus_application, GTK_TYPE_APPLICATION);
......@@ -615,6 +619,7 @@ nautilus_application_finalize (GObject *object)
g_hash_table_destroy (priv->notifications);
g_clear_object (&priv->undo_manager);
g_clear_object (&priv->task_manager);
g_clear_object (&priv->tag_manager);
......@@ -1109,6 +1114,7 @@ nautilus_application_init (NautilusApplication *self)
NULL);
priv->undo_manager = nautilus_file_undo_manager_new ();
priv->task_manager = nautilus_task_manager_dup_singleton ();
priv->tag_manager_cancellable = g_cancellable_new ();
priv->tag_manager = nautilus_tag_manager_get ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment