[gnome-builder/wip/gtk4-port: 36/343] projects: use IdeTree for IdeProjectTreeAddin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 36/343] projects: use IdeTree for IdeProjectTreeAddin
- Date: Mon, 4 Apr 2022 20:02:09 +0000 (UTC)
commit f1f5d558d86a4c56fdf9fb68da3410d5ab988a6b
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 24 13:03:48 2021 -0700
projects: use IdeTree for IdeProjectTreeAddin
This will all need to move to IdeTree as well as part of the port. Or
possibly even, at some point, going to GtkListView.
src/libide/meson.build | 3 ++-
src/libide/projects/ide-project-tree-addin.c | 16 +++++++---------
src/libide/projects/ide-project-tree-addin.h | 17 ++++++++---------
src/libide/projects/meson.build | 3 ++-
4 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/src/libide/meson.build b/src/libide/meson.build
index d03bb17a1..840acc392 100644
--- a/src/libide/meson.build
+++ b/src/libide/meson.build
@@ -8,8 +8,9 @@ subdir('threading')
subdir('io')
subdir('code')
subdir('vcs')
-subdir('projects')
+subdir('tree')
subdir('search')
+subdir('projects')
subdir('foundry')
subdir('debugger')
subdir('themes')
diff --git a/src/libide/projects/ide-project-tree-addin.c b/src/libide/projects/ide-project-tree-addin.c
index 7289dd94c..4cc68e409 100644
--- a/src/libide/projects/ide-project-tree-addin.c
+++ b/src/libide/projects/ide-project-tree-addin.c
@@ -32,8 +32,6 @@
* The #IdeProjectTreeAddin is used to extend the project tree. Plugins
* can add new tree builders to the tree in the load virtual function. They
* should remove the tree builders from the unload virtual function.
- *
- * Since: 3.32
*/
G_DEFINE_INTERFACE (IdeProjectTreeAddin, ide_project_tree_addin, G_TYPE_OBJECT)
@@ -46,14 +44,14 @@ ide_project_tree_addin_default_init (IdeProjectTreeAddinInterface *iface)
/**
* ide_project_tree_addin_load:
* @self: a #IdeProjectTreeAddin
- * @tree: a #DzlTree
+ * @tree: a #IdeTree
*
* This function will call the IdeProjectTreeAddin::load vfunc of @self.
*
* This is used to initialize the project tree so that plugins can extend
* the contents of the tree.
*
- * Plugins should add a #DzlTreeBuilder to the tree when loading, and remove
+ * Plugins should add a #IdeTreeBuilder to the tree when loading, and remove
* them when unloading.
*
* See also: ide_project_tree_addin_unload()
@@ -62,10 +60,10 @@ ide_project_tree_addin_default_init (IdeProjectTreeAddinInterface *iface)
*/
void
ide_project_tree_addin_load (IdeProjectTreeAddin *self,
- DzlTree *tree)
+ IdeTree *tree)
{
g_return_if_fail (IDE_IS_PROJECT_TREE_ADDIN (self));
- g_return_if_fail (DZL_IS_TREE (tree));
+ g_return_if_fail (IDE_IS_TREE (tree));
if (IDE_PROJECT_TREE_ADDIN_GET_IFACE (self)->load)
IDE_PROJECT_TREE_ADDIN_GET_IFACE (self)->load (self, tree);
@@ -74,7 +72,7 @@ ide_project_tree_addin_load (IdeProjectTreeAddin *self,
/**
* ide_project_tree_addin_unload:
* @self: a #IdeProjectTreeAddin
- * @tree: a #DzlTree
+ * @tree: a #IdeTree
*
* This function will call the IdeProjectTreeAddin::unload vfunc of @self.
*
@@ -88,10 +86,10 @@ ide_project_tree_addin_load (IdeProjectTreeAddin *self,
*/
void
ide_project_tree_addin_unload (IdeProjectTreeAddin *self,
- DzlTree *tree)
+ IdeTree *tree)
{
g_return_if_fail (IDE_IS_PROJECT_TREE_ADDIN (self));
- g_return_if_fail (DZL_IS_TREE (tree));
+ g_return_if_fail (IDE_IS_TREE (tree));
if (IDE_PROJECT_TREE_ADDIN_GET_IFACE (self)->unload)
IDE_PROJECT_TREE_ADDIN_GET_IFACE (self)->unload (self, tree);
diff --git a/src/libide/projects/ide-project-tree-addin.h b/src/libide/projects/ide-project-tree-addin.h
index 33412fb99..284af02b9 100644
--- a/src/libide/projects/ide-project-tree-addin.h
+++ b/src/libide/projects/ide-project-tree-addin.h
@@ -20,14 +20,13 @@
#pragma once
-#include <dazzle.h>
-#include <libide-core.h>
+#include <libide-tree.h>
G_BEGIN_DECLS
#define IDE_TYPE_PROJECT_TREE_ADDIN (ide_project_tree_addin_get_type())
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE (IdeProjectTreeAddin, ide_project_tree_addin, IDE, PROJECT_TREE_ADDIN, GObject)
struct _IdeProjectTreeAddinInterface
@@ -35,16 +34,16 @@ struct _IdeProjectTreeAddinInterface
GTypeInterface parent_iface;
void (*load) (IdeProjectTreeAddin *self,
- DzlTree *tree);
+ IdeTree *tree);
void (*unload) (IdeProjectTreeAddin *self,
- DzlTree *tree);
+ IdeTree *tree);
};
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_project_tree_addin_load (IdeProjectTreeAddin *self,
- DzlTree *tree);
-IDE_AVAILABLE_IN_3_32
+ IdeTree *tree);
+IDE_AVAILABLE_IN_ALL
void ide_project_tree_addin_unload (IdeProjectTreeAddin *self,
- DzlTree *tree);
+ IdeTree *tree);
G_END_DECLS
diff --git a/src/libide/projects/meson.build b/src/libide/projects/meson.build
index 7db2627da..0916891d1 100644
--- a/src/libide/projects/meson.build
+++ b/src/libide/projects/meson.build
@@ -59,10 +59,11 @@ libide_projects_deps = [
libtemplate_glib_dep,
libxml2_dep,
+ libide_code_dep,
libide_core_dep,
libide_io_dep,
libide_threading_dep,
- libide_code_dep,
+ libide_tree_dep,
libide_vcs_dep,
]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]