[nautilus/wip/ernestask/tasks: 17/33] Add new folder task class
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/ernestask/tasks: 17/33] Add new folder task class
- Date: Mon, 7 Aug 2017 10:27:29 +0000 (UTC)
commit 51b82307af6c3cb5bada5cd853cf534e4a27d703
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 0bb9abc..be5b3a9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -270,7 +270,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'
]
nautilus_deps = [glib,
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]