[nautilus/wip/ernestask/tasks: 6/9] Add new folder task class
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/ernestask/tasks: 6/9] Add new folder task class
- Date: Mon, 5 Jun 2017 19:07:34 +0000 (UTC)
commit fb6385a0202e1831463a90d4e8105e6771ffdd85
Author: Ernestas Kulik <ernestask gnome org>
Date: Mon May 15 10:43:05 2017 +0300
Add new folder task class
src/meson.build | 4 +++-
src/tasks/nautilus-new-folder-task.c | 32 ++++++++++++++++++++++++++++++++
src/tasks/nautilus-new-folder-task.h | 25 +++++++++++++++++++++++++
3 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index ea38913..7ae5c08 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -264,7 +264,9 @@ libnautilus_sources = [
'tasks/nautilus-file-task.c',
'tasks/nautilus-file-task-private.h',
'tasks/nautilus-create-task.h',
- 'tasks/nautilus-create-task.c'
+ 'tasks/nautilus-create-task.c',
+ 'tasks/nautilus-new-folder-task.h',
+ 'tasks/nautilus-new-folder-task.c'
]
if get_option ('enable-tracker')
diff --git a/src/tasks/nautilus-new-folder-task.c b/src/tasks/nautilus-new-folder-task.c
new file mode 100644
index 0000000..4389485
--- /dev/null
+++ b/src/tasks/nautilus-new-folder-task.c
@@ -0,0 +1,32 @@
+#include "nautilus-new-folder-task.h"
+
+struct _NautilusNewFolderTask
+{
+ NautilusCreateTask parent_instance;
+};
+
+G_DEFINE_TYPE (NautilusNewFolderTask, nautilus_new_folder_task,
+ NAUTILUS_TYPE_CREATE_TASK)
+
+static void
+nautilus_new_folder_task_class_init (NautilusNewFolderTaskClass *klass)
+{
+}
+
+static void
+nautilus_new_folder_task_init (NautilusNewFolderTask *self)
+{
+}
+
+NautilusTask *
+nautilus_new_folder_task_new (GtkWidget *parent_view,
+ GdkPoint *target_point,
+ const char *parent_dir,
+ const char *folder_name)
+{
+ GObject *instance;
+
+ instance = g_object_new (NAUTILUS_TYPE_NEW_FOLDER_TASK, NULL);
+
+ return NAUTILUS_TASK (instance);
+}
diff --git a/src/tasks/nautilus-new-folder-task.h b/src/tasks/nautilus-new-folder-task.h
new file mode 100644
index 0000000..d5d52e5
--- /dev/null
+++ b/src/tasks/nautilus-new-folder-task.h
@@ -0,0 +1,25 @@
+#ifndef NAUTILUS_NEW_FOLDER_TASK_H
+#define NAUTILUS_NEW_FOLDER_TASK_H
+
+#include "nautilus-create-task.h"
+
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+
+#define NAUTILUS_TYPE_NEW_FOLDER_TASK (nautilus_new_folder_task_get_type ())
+
+G_DECLARE_FINAL_TYPE (NautilusNewFolderTask, nautilus_new_folder_task,
+ NAUTILUS, NEW_FOLDER_TASK,
+ NautilusCreateTask)
+
+struct _NautilusNewFolderTaskClass
+{
+ NautilusCreateTaskClass parent_class;
+};
+
+NautilusTask *nautilus_new_folder_task_new (GtkWidget *parent_view,
+ GdkPoint *target_point,
+ const char *parent_dir,
+ const char *folder_name);
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]