[gnome-builder/wip/gtk4-port] libide/editor: implement foreach_page for editor workspace



commit 90d77e0af6433bd59e522f6ed03707b635808697
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 17 16:37:36 2022 -0700

    libide/editor: implement foreach_page for editor workspace

 src/libide/editor/ide-editor-workspace.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-workspace.c b/src/libide/editor/ide-editor-workspace.c
index d39dcda0f..aaa29c236 100644
--- a/src/libide/editor/ide-editor-workspace.c
+++ b/src/libide/editor/ide-editor-workspace.c
@@ -185,6 +185,14 @@ ide_editor_workspace_get_header_bar (IdeWorkspace *workspace)
   return IDE_EDITOR_WORKSPACE (workspace)->header_bar;
 }
 
+static void
+ide_editor_workspace_foreach_page (IdeWorkspace    *workspace,
+                                   IdePageCallback  callback,
+                                   gpointer         user_data)
+{
+  ide_grid_foreach_page (IDE_EDITOR_WORKSPACE (workspace)->grid, callback, user_data);
+}
+
 static void
 ide_editor_workspace_dispose (GObject *object)
 {
@@ -209,14 +217,15 @@ ide_editor_workspace_class_init (IdeEditorWorkspaceClass *klass)
 
   object_class->dispose = ide_editor_workspace_dispose;
 
+  workspace_class->add_grid_column = ide_editor_workspace_add_grid_column;
   workspace_class->add_page = ide_editor_workspace_add_page;
   workspace_class->add_pane = ide_editor_workspace_add_pane;
-  workspace_class->add_grid_column = ide_editor_workspace_add_grid_column;
   workspace_class->can_search = ide_editor_workspace_can_search;
   workspace_class->context_set = ide_editor_workspace_context_set;
+  workspace_class->foreach_page = ide_editor_workspace_foreach_page;
   workspace_class->get_frame_at_position = ide_editor_workspace_get_frame_at_position;
-  workspace_class->get_most_recent_frame = ide_editor_workspace_get_most_recent_frame;
   workspace_class->get_header_bar = ide_editor_workspace_get_header_bar;
+  workspace_class->get_most_recent_frame = ide_editor_workspace_get_most_recent_frame;
 
   ide_workspace_class_set_kind (workspace_class, "editor");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]