[gnome-builder] libpanel: port from IdePanelPosition to PanelPosition
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libpanel: port from IdePanelPosition to PanelPosition
- Date: Tue, 13 Sep 2022 23:40:03 +0000 (UTC)
commit b97873d962e1fe22a1f89a53f79112484671a746
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 13 16:24:19 2022 -0700
libpanel: port from IdePanelPosition to PanelPosition
We can use a little API wrapper for how we were using it previously, and
then just use the PanelPosition structure from upstream in libpanel.
src/libide/editor/ide-editor-workspace.c | 16 +--
src/libide/editor/ide-editor.c | 44 +++----
src/libide/editor/ide-editor.h | 12 +-
src/libide/gui/ide-frame.c | 14 +--
src/libide/gui/ide-frame.h | 10 +-
src/libide/gui/ide-page.c | 10 +-
src/libide/gui/ide-page.h | 66 +++++-----
src/libide/gui/ide-pane.c | 18 +--
src/libide/gui/ide-pane.h | 16 +--
src/libide/gui/ide-panel-position.c | 140 +++++----------------
src/libide/gui/ide-panel-position.h | 44 ++-----
src/libide/gui/ide-primary-workspace.c | 16 +--
src/libide/gui/ide-workbench-addin.c | 4 +-
src/libide/gui/ide-workbench-addin.h | 4 +-
src/libide/gui/ide-workbench.c | 12 +-
src/libide/gui/ide-workbench.h | 4 +-
src/libide/gui/ide-workspace-private.h | 4 +-
src/libide/gui/ide-workspace.c | 44 +++----
src/libide/gui/ide-workspace.h | 12 +-
src/plugins/buildui/gbp-buildui-status-popover.c | 4 +-
src/plugins/buildui/gbp-buildui-workspace-addin.c | 16 +--
.../code-index/ide-code-index-search-result.c | 4 +-
.../debuggerui/ide-debugger-workspace-addin.c | 10 +-
.../editorui/gbp-editorui-workbench-addin.c | 8 +-
.../editorui/gbp-editorui-workspace-addin.c | 4 +-
src/plugins/find-other-file/gbp-found-file.c | 4 +-
src/plugins/grep/gbp-grep-panel.c | 4 +-
src/plugins/grep/gbp-grep-popover.c | 6 +-
src/plugins/grep/gbp-grep-workspace-addin.c | 6 +-
.../gbp-html-preview-workspace-addin.c | 6 +-
src/plugins/ls/gbp-ls-workbench-addin.c | 20 +--
.../gbp-markdown-preview-workspace-addin.c | 6 +-
.../messages/gbp-messages-workspace-addin.c | 6 +-
.../open-with-external/gbp-owe-workbench-addin.c | 20 +--
.../gbp-project-tree-workspace-addin.c | 10 +-
src/plugins/shellcmd/gbp-shellcmd-search-result.c | 4 +-
.../shellcmd/gbp-shellcmd-shortcut-provider.c | 4 +-
.../gbp-sphinx-preview-workspace-addin.c | 6 +-
.../symbol-tree/gbp-symbol-hover-provider.c | 4 +-
src/plugins/symbol-tree/gbp-symbol-popover.c | 2 +-
src/plugins/sysprof/gbp-sysprof-page.c | 4 +-
src/plugins/sysprof/gbp-sysprof-tool.c | 2 +-
src/plugins/sysprof/gbp-sysprof-workbench-addin.c | 4 +-
.../terminal/gbp-terminal-workspace-addin.c | 10 +-
src/plugins/testui/gbp-testui-workspace-addin.c | 16 +--
src/plugins/todo/gbp-todo-workspace-addin.c | 10 +-
src/plugins/vim/gbp-vim-editor-page-addin.c | 10 +-
.../web-browser/gbp-web-browser-workbench-addin.c | 2 +-
.../web-browser/gbp-web-browser-workspace-addin.c | 4 +-
49 files changed, 302 insertions(+), 404 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-workspace.c b/src/libide/editor/ide-editor-workspace.c
index 5a3b160d7..3f0175859 100644
--- a/src/libide/editor/ide-editor-workspace.c
+++ b/src/libide/editor/ide-editor-workspace.c
@@ -104,9 +104,9 @@ ide_editor_workspace_context_set (IdeWorkspace *workspace,
}
static void
-ide_editor_workspace_add_page (IdeWorkspace *workspace,
- IdePage *page,
- IdePanelPosition *position)
+ide_editor_workspace_add_page (IdeWorkspace *workspace,
+ IdePage *page,
+ PanelPosition *position)
{
IdeEditorWorkspace *self = (IdeEditorWorkspace *)workspace;
@@ -122,9 +122,9 @@ ide_editor_workspace_add_page (IdeWorkspace *workspace,
}
static void
-ide_editor_workspace_add_pane (IdeWorkspace *workspace,
- IdePane *pane,
- IdePanelPosition *position)
+ide_editor_workspace_add_pane (IdeWorkspace *workspace,
+ IdePane *pane,
+ PanelPosition *position)
{
IdeEditorWorkspace *self = (IdeEditorWorkspace *)workspace;
@@ -157,8 +157,8 @@ ide_editor_workspace_get_most_recent_frame (IdeWorkspace *workspace)
}
static PanelFrame *
-ide_editor_workspace_get_frame_at_position (IdeWorkspace *workspace,
- IdePanelPosition *position)
+ide_editor_workspace_get_frame_at_position (IdeWorkspace *workspace,
+ PanelPosition *position)
{
IdeEditorWorkspace *self = (IdeEditorWorkspace *)workspace;
diff --git a/src/libide/editor/ide-editor.c b/src/libide/editor/ide-editor.c
index 64cbf886d..07de8b934 100644
--- a/src/libide/editor/ide-editor.c
+++ b/src/libide/editor/ide-editor.c
@@ -29,18 +29,18 @@
typedef struct _Focus
{
- IdeWorkspace *workspace;
- IdePanelPosition *position;
- IdeLocation *location;
- IdeBuffer *buffer;
- GFile *file;
+ IdeWorkspace *workspace;
+ PanelPosition *position;
+ IdeLocation *location;
+ IdeBuffer *buffer;
+ GFile *file;
} Focus;
static Focus *
-focus_new (IdeWorkspace *workspace,
- IdePanelPosition *position,
- IdeBuffer *buffer,
- IdeLocation *location)
+focus_new (IdeWorkspace *workspace,
+ PanelPosition *position,
+ IdeBuffer *buffer,
+ IdeLocation *location)
{
IdeBufferManager *bufmgr;
IdeContext *context;
@@ -70,7 +70,7 @@ focus_new (IdeWorkspace *workspace,
buffer = ide_buffer_manager_find_buffer (bufmgr, file);
focus = g_atomic_rc_box_alloc0 (sizeof *focus);
- focus->position = ide_panel_position_ref (position);
+ focus->position = g_object_ref (position);
g_set_object (&focus->workspace, workspace);
g_set_object (&focus->buffer, buffer);
g_set_object (&focus->location, location);
@@ -199,12 +199,12 @@ ide_editor_load_file_cb (GObject *object,
}
static void
-do_focus (IdeWorkspace *workspace,
- IdePanelPosition *position,
- IdeBuffer *buffer,
- IdeLocation *location)
+do_focus (IdeWorkspace *workspace,
+ PanelPosition *position,
+ IdeBuffer *buffer,
+ IdeLocation *location)
{
- g_autoptr(IdePanelPosition) local_position = NULL;
+ g_autoptr(PanelPosition) local_position = NULL;
IdeBufferManager *bufmgr;
IdeContext *context;
Focus *focus;
@@ -221,7 +221,7 @@ do_focus (IdeWorkspace *workspace,
g_assert (IDE_IS_BUFFER_MANAGER (bufmgr));
if (position == NULL)
- position = local_position = ide_panel_position_new ();
+ position = local_position = panel_position_new ();
focus = focus_new (workspace, position, buffer, location);
@@ -238,9 +238,9 @@ do_focus (IdeWorkspace *workspace,
}
void
-ide_editor_focus_location (IdeWorkspace *workspace,
- IdePanelPosition *position,
- IdeLocation *location)
+ide_editor_focus_location (IdeWorkspace *workspace,
+ PanelPosition *position,
+ IdeLocation *location)
{
g_return_if_fail (IDE_IS_WORKSPACE (workspace));
g_return_if_fail (IDE_IS_LOCATION (location));
@@ -249,9 +249,9 @@ ide_editor_focus_location (IdeWorkspace *workspace,
}
void
-ide_editor_focus_buffer (IdeWorkspace *workspace,
- IdePanelPosition *position,
- IdeBuffer *buffer)
+ide_editor_focus_buffer (IdeWorkspace *workspace,
+ PanelPosition *position,
+ IdeBuffer *buffer)
{
g_return_if_fail (IDE_IS_WORKSPACE (workspace));
g_return_if_fail (IDE_IS_BUFFER (buffer));
diff --git a/src/libide/editor/ide-editor.h b/src/libide/editor/ide-editor.h
index a908116de..f5e62fc22 100644
--- a/src/libide/editor/ide-editor.h
+++ b/src/libide/editor/ide-editor.h
@@ -27,12 +27,12 @@
G_BEGIN_DECLS
IDE_AVAILABLE_IN_ALL
-void ide_editor_focus_location (IdeWorkspace *workspace,
- IdePanelPosition *position,
- IdeLocation *location);
+void ide_editor_focus_location (IdeWorkspace *workspace,
+ PanelPosition *position,
+ IdeLocation *location);
IDE_AVAILABLE_IN_ALL
-void ide_editor_focus_buffer (IdeWorkspace *workspace,
- IdePanelPosition *position,
- IdeBuffer *buffer);
+void ide_editor_focus_buffer (IdeWorkspace *workspace,
+ PanelPosition *position,
+ IdeBuffer *buffer);
G_END_DECLS
diff --git a/src/libide/gui/ide-frame.c b/src/libide/gui/ide-frame.c
index f0f281448..eb5462e68 100644
--- a/src/libide/gui/ide-frame.c
+++ b/src/libide/gui/ide-frame.c
@@ -345,20 +345,20 @@ ide_frame_addin_find_by_module_name (IdeFrame *frame,
*
* Gets the position in the grid of a frame.
*
- * Returns: (transfer full): a new #IdePanelPosition
+ * Returns: (transfer full): a new #PanelPosition
*/
-IdePanelPosition *
+PanelPosition *
ide_frame_get_position (IdeFrame *self)
{
- IdePanelPosition *ret;
+ PanelPosition *ret;
PanelGrid *grid;
guint n_columns;
g_return_val_if_fail (IDE_IS_FRAME (self), NULL);
/* Frames are always in the center grid */
- ret = ide_panel_position_new ();
- ide_panel_position_set_area (ret, PANEL_AREA_CENTER);
+ ret = panel_position_new ();
+ panel_position_set_area (ret, PANEL_AREA_CENTER);
/* Implausible but handle it anyway */
grid = PANEL_GRID (gtk_widget_get_ancestor (GTK_WIDGET (self), PANEL_TYPE_GRID));
@@ -378,8 +378,8 @@ ide_frame_get_position (IdeFrame *self)
if (frame == PANEL_FRAME (self))
{
- ide_panel_position_set_column (ret, c);
- ide_panel_position_set_row (ret, r);
+ panel_position_set_column (ret, c);
+ panel_position_set_row (ret, r);
return ret;
}
}
diff --git a/src/libide/gui/ide-frame.h b/src/libide/gui/ide-frame.h
index de758fcad..655b81e36 100644
--- a/src/libide/gui/ide-frame.h
+++ b/src/libide/gui/ide-frame.h
@@ -37,13 +37,13 @@ IDE_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (IdeFrame, ide_frame, IDE, FRAME, PanelFrame)
IDE_AVAILABLE_IN_ALL
-GtkWidget *ide_frame_new (void);
+GtkWidget *ide_frame_new (void);
IDE_AVAILABLE_IN_ALL
-IdePanelPosition *ide_frame_get_position (IdeFrame *self);
+PanelPosition *ide_frame_get_position (IdeFrame *self);
IDE_AVAILABLE_IN_ALL
-gboolean ide_frame_get_use_tabbar (IdeFrame *self);
+gboolean ide_frame_get_use_tabbar (IdeFrame *self);
IDE_AVAILABLE_IN_ALL
-void ide_frame_set_use_tabbar (IdeFrame *self,
- gboolean use_tabbar);
+void ide_frame_set_use_tabbar (IdeFrame *self,
+ gboolean use_tabbar);
G_END_DECLS
diff --git a/src/libide/gui/ide-page.c b/src/libide/gui/ide-page.c
index 877cf4010..18387aa26 100644
--- a/src/libide/gui/ide-page.c
+++ b/src/libide/gui/ide-page.c
@@ -168,7 +168,7 @@ open_in_new_workspace_action (GtkWidget *widget,
GVariant *param)
{
IdePage *self = (IdePage *)widget;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeWorkspace *workspace;
IdeWorkbench *workbench;
IdePage *split;
@@ -625,13 +625,13 @@ ide_page_set_progress (IdePage *self,
*
* Gets the position of a page within the workspace.
*
- * Returns: (transfer full) (nullable): an #IdePanelPosition or %NULL
+ * Returns: (transfer full) (nullable): an #PanelPosition or %NULL
* if the page is not rooted.
*/
-IdePanelPosition *
+PanelPosition *
ide_page_get_position (IdePage *self)
{
- IdePanelPosition *position;
+ PanelPosition *position;
GtkWidget *frame;
guint n_pages;
@@ -649,7 +649,7 @@ ide_page_get_position (IdePage *self)
{
if (panel_frame_get_page (PANEL_FRAME (frame), i) == PANEL_WIDGET (self))
{
- ide_panel_position_set_depth (position, i);
+ panel_position_set_depth (position, i);
return position;
}
}
diff --git a/src/libide/gui/ide-page.h b/src/libide/gui/ide-page.h
index c0bbbafae..b0469339a 100644
--- a/src/libide/gui/ide-page.h
+++ b/src/libide/gui/ide-page.h
@@ -59,56 +59,56 @@ struct _IdePageClass
};
IDE_AVAILABLE_IN_ALL
-gboolean ide_page_get_can_split (IdePage *self);
+gboolean ide_page_get_can_split (IdePage *self);
IDE_AVAILABLE_IN_ALL
-void ide_page_set_can_split (IdePage *self,
- gboolean can_split);
+void ide_page_set_can_split (IdePage *self,
+ gboolean can_split);
IDE_AVAILABLE_IN_ALL
-IdePage *ide_page_create_split (IdePage *self);
+IdePage *ide_page_create_split (IdePage *self);
IDE_AVAILABLE_IN_ALL
-gboolean ide_page_get_failed (IdePage *self);
+gboolean ide_page_get_failed (IdePage *self);
IDE_AVAILABLE_IN_ALL
-void ide_page_set_failed (IdePage *self,
- gboolean failed);
+void ide_page_set_failed (IdePage *self,
+ gboolean failed);
IDE_AVAILABLE_IN_ALL
-const gchar *ide_page_get_menu_id (IdePage *self);
+const gchar *ide_page_get_menu_id (IdePage *self);
IDE_AVAILABLE_IN_ALL
-void ide_page_set_menu_id (IdePage *self,
- const gchar *menu_id);
+void ide_page_set_menu_id (IdePage *self,
+ const gchar *menu_id);
IDE_AVAILABLE_IN_ALL
-void ide_page_agree_to_close_async (IdePage *self,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
+void ide_page_agree_to_close_async (IdePage *self,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
IDE_AVAILABLE_IN_ALL
-gboolean ide_page_agree_to_close_finish (IdePage *self,
- GAsyncResult *result,
- GError **error);
+gboolean ide_page_agree_to_close_finish (IdePage *self,
+ GAsyncResult *result,
+ GError **error);
IDE_AVAILABLE_IN_ALL
-void ide_page_mark_used (IdePage *self);
+void ide_page_mark_used (IdePage *self);
IDE_AVAILABLE_IN_ALL
-void ide_page_report_error (IdePage *self,
- const gchar *format,
- ...) G_GNUC_PRINTF (2, 3);
+void ide_page_report_error (IdePage *self,
+ const gchar *format,
+ ...) G_GNUC_PRINTF (2, 3);
IDE_AVAILABLE_IN_ALL
-GFile *ide_page_get_file_or_directory (IdePage *self);
+GFile *ide_page_get_file_or_directory (IdePage *self);
IDE_AVAILABLE_IN_ALL
-void ide_page_set_progress (IdePage *self,
- IdeNotification *notification);
+void ide_page_set_progress (IdePage *self,
+ IdeNotification *notification);
IDE_AVAILABLE_IN_ALL
-IdePanelPosition *ide_page_get_position (IdePage *self);
+PanelPosition *ide_page_get_position (IdePage *self);
IDE_AVAILABLE_IN_ALL
-void ide_page_observe (IdePage *self,
- IdePage **location);
+void ide_page_observe (IdePage *self,
+ IdePage **location);
IDE_AVAILABLE_IN_ALL
-void ide_page_unobserve (IdePage *self,
- IdePage **location);
+void ide_page_unobserve (IdePage *self,
+ IdePage **location);
IDE_AVAILABLE_IN_ALL
-void ide_page_destroy (IdePage *self);
+void ide_page_destroy (IdePage *self);
IDE_AVAILABLE_IN_ALL
-void ide_clear_page (IdePage **location);
+void ide_clear_page (IdePage **location);
IDE_AVAILABLE_IN_ALL
-void ide_page_add_content_widget (IdePage *self,
- GtkWidget *widget);
+void ide_page_add_content_widget (IdePage *self,
+ GtkWidget *widget);
G_END_DECLS
diff --git a/src/libide/gui/ide-pane.c b/src/libide/gui/ide-pane.c
index 25619f632..0b00045cc 100644
--- a/src/libide/gui/ide-pane.c
+++ b/src/libide/gui/ide-pane.c
@@ -93,7 +93,7 @@ ide_pane_popover_positioner_present (IdePopoverPositioner *positioner,
{
IdePane *self = (IdePane *)positioner;
IdePanePrivate *priv = ide_pane_get_instance_private (self);
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
PanelArea area = 0;
GdkRectangle translated;
double x, y;
@@ -243,14 +243,14 @@ ide_clear_pane (IdePane **location)
*
* Gets the position of the panel or %NULL
*
- * Returns: (transfer full) (nullable): an #IdePanelPosition or %NULL
+ * Returns: (transfer full) (nullable): an #PanelPosition or %NULL
*/
-IdePanelPosition *
+PanelPosition *
ide_pane_get_position (IdePane *self)
{
static GType dock_child_type = G_TYPE_INVALID;
PanelArea area;
- IdePanelPosition *ret;
+ PanelPosition *ret;
GtkWidget *frame;
GtkWidget *paned;
GtkWidget *child;
@@ -295,14 +295,14 @@ ide_pane_get_position (IdePane *self)
"area", &area,
NULL);
- ret = ide_panel_position_new ();
- ide_panel_position_set_area (ret, area);
- ide_panel_position_set_depth (ret, depth);
+ ret = panel_position_new ();
+ panel_position_set_area (ret, area);
+ panel_position_set_depth (ret, depth);
if (area == PANEL_AREA_START || area == PANEL_AREA_END)
- ide_panel_position_set_row (ret, row_or_column);
+ panel_position_set_row (ret, row_or_column);
else
- ide_panel_position_set_column (ret, row_or_column);
+ panel_position_set_column (ret, row_or_column);
return ret;
}
diff --git a/src/libide/gui/ide-pane.h b/src/libide/gui/ide-pane.h
index 0aea03cb6..473d9bcf9 100644
--- a/src/libide/gui/ide-pane.h
+++ b/src/libide/gui/ide-pane.h
@@ -43,18 +43,18 @@ struct _IdePaneClass
};
IDE_AVAILABLE_IN_ALL
-GtkWidget *ide_pane_new (void);
+GtkWidget *ide_pane_new (void);
IDE_AVAILABLE_IN_ALL
-void ide_pane_destroy (IdePane *self);
+void ide_pane_destroy (IdePane *self);
IDE_AVAILABLE_IN_ALL
-void ide_pane_observe (IdePane *self,
- IdePane **location);
+void ide_pane_observe (IdePane *self,
+ IdePane **location);
IDE_AVAILABLE_IN_ALL
-void ide_pane_unobserve (IdePane *self,
- IdePane **location);
+void ide_pane_unobserve (IdePane *self,
+ IdePane **location);
IDE_AVAILABLE_IN_ALL
-void ide_clear_pane (IdePane **location);
+void ide_clear_pane (IdePane **location);
IDE_AVAILABLE_IN_ALL
-IdePanelPosition *ide_pane_get_position (IdePane *self);
+PanelPosition *ide_pane_get_position (IdePane *self);
G_END_DECLS
diff --git a/src/libide/gui/ide-panel-position.c b/src/libide/gui/ide-panel-position.c
index bbed21f7f..4ab9e7f00 100644
--- a/src/libide/gui/ide-panel-position.c
+++ b/src/libide/gui/ide-panel-position.c
@@ -24,152 +24,78 @@
#include "ide-panel-position.h"
-struct _IdePanelPosition
-{
- guint column : 8;
- guint row : 8;
- guint depth : 9;
- PanelArea area : 3;
- guint column_set : 1;
- guint row_set : 1;
- guint depth_set : 1;
- guint area_set : 1;
-};
-
-G_DEFINE_BOXED_TYPE (IdePanelPosition, ide_panel_position, ide_panel_position_ref, ide_panel_position_unref)
-
-IdePanelPosition *
-ide_panel_position_new (void)
-{
- return g_rc_box_alloc0 (sizeof (IdePanelPosition));
-}
-
-IdePanelPosition *
-ide_panel_position_ref (IdePanelPosition *self)
-{
- return g_rc_box_acquire (self);
-}
-
-void
-ide_panel_position_unref (IdePanelPosition *self)
-{
- g_rc_box_release (self);
-}
-
+/**
+ * ide_panel_position_get_area:
+ * @self: a #PanelPosition
+ * @area: (out) (nullable): a location for the area
+ *
+ * Returns: %TRUE if the area was set
+ */
gboolean
-ide_panel_position_get_area (IdePanelPosition *self,
- PanelArea *area)
+ide_panel_position_get_area (PanelPosition *self,
+ PanelArea *area)
{
- g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (PANEL_IS_POSITION (self), FALSE);
if (area != NULL)
- *area = self->area;
+ *area = panel_position_get_area (self);
- return self->area_set;
-}
-
-void
-ide_panel_position_set_area (IdePanelPosition *self,
- PanelArea area)
-{
- g_return_if_fail (self != NULL);
- g_return_if_fail (area <= PANEL_AREA_CENTER);
-
- self->area = area;
- self->area_set = TRUE;
+ return panel_position_get_area_set (self);
}
/**
* ide_panel_position_get_column:
- * @self: a #IdePanelPosition
- * @column: (out): a location for a column
+ * @self: a #PanelPosition
+ * @column: (out) (nullable): a location for a column
*
- * Returns: %TRUE if the column is set
+ * Returns: %TRUE if the column was set
*/
gboolean
-ide_panel_position_get_column (IdePanelPosition *self,
- guint *column)
+ide_panel_position_get_column (PanelPosition *self,
+ guint *column)
{
g_return_val_if_fail (self != NULL, FALSE);
if (column != NULL)
- *column = self->column;
-
- return self->column_set;
-}
-
-void
-ide_panel_position_set_column (IdePanelPosition *self,
- guint column)
-{
- g_return_if_fail (self != NULL);
+ *column = panel_position_get_column (self);
- self->column = column;
- self->column_set = TRUE;
+ return panel_position_get_column_set (self);
}
/**
* ide_panel_position_get_row:
- * @self: a #IdePanelPosition
- * @row: (out): a location for the row
+ * @self: a #PanelPosition
+ * @row: (out) (nullable): a location for the row
*
- * Returns: %TRUE if the row is set
+ * Returns: %TRUE if the row was set
*/
gboolean
-ide_panel_position_get_row (IdePanelPosition *self,
- guint *row)
+ide_panel_position_get_row (PanelPosition *self,
+ guint *row)
{
g_return_val_if_fail (self != NULL, FALSE);
if (row != NULL)
- *row = self->row;
-
- return self->row_set;
-}
-
-void
-ide_panel_position_set_row (IdePanelPosition *self,
- guint row)
-{
- g_return_if_fail (self != NULL);
+ *row = panel_position_get_row (self);
- self->row = row;
- self->row_set = TRUE;
+ return panel_position_get_row_set (self);
}
/**
* ide_panel_position_get_depth:
- * @self: a #IdePanelPosition
- * @depth: (out): a location for the depth
+ * @self: a #PanelPosition
+ * @depth: (out) (nullable): a location for the depth
*
- * Returns: %TRUE if the depth is set
+ * Returns: %TRUE if the depth was set
*/
gboolean
-ide_panel_position_get_depth (IdePanelPosition *self,
- guint *depth)
+ide_panel_position_get_depth (PanelPosition *self,
+ guint *depth)
{
g_return_val_if_fail (self != NULL, FALSE);
if (depth != NULL)
- *depth = self->depth;
-
- return self->depth_set;
-}
-
-void
-ide_panel_position_set_depth (IdePanelPosition *self,
- guint depth)
-{
- g_return_if_fail (self != NULL);
-
- self->depth = depth;
- self->depth_set = TRUE;
-}
-
-gboolean
-ide_panel_position_is_indeterminate (IdePanelPosition *self)
-{
- g_return_val_if_fail (self != NULL, TRUE);
+ *depth = panel_position_get_depth (self);
- return !self->column_set || !self->row_set || !self->area_set;
+ return panel_position_get_depth_set (self);
}
diff --git a/src/libide/gui/ide-panel-position.h b/src/libide/gui/ide-panel-position.h
index cf6646be4..aa3d5b515 100644
--- a/src/libide/gui/ide-panel-position.h
+++ b/src/libide/gui/ide-panel-position.h
@@ -30,45 +30,17 @@
G_BEGIN_DECLS
-#define IDE_TYPE_PANEL_POSITION (ide_panel_position_get_type())
-
-typedef struct _IdePanelPosition IdePanelPosition;
-
-IDE_AVAILABLE_IN_ALL
-GType ide_panel_position_get_type (void) G_GNUC_CONST;
-IDE_AVAILABLE_IN_ALL
-IdePanelPosition *ide_panel_position_new (void);
-IDE_AVAILABLE_IN_ALL
-IdePanelPosition *ide_panel_position_ref (IdePanelPosition *self);
-IDE_AVAILABLE_IN_ALL
-void ide_panel_position_unref (IdePanelPosition *self);
IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_area (IdePanelPosition *self,
- PanelArea *area);
+gboolean ide_panel_position_get_area (PanelPosition *self,
+ PanelArea *area);
IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_area (IdePanelPosition *self,
- PanelArea area);
+gboolean ide_panel_position_get_row (PanelPosition *self,
+ guint *row);
IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_row (IdePanelPosition *self,
- guint *row);
+gboolean ide_panel_position_get_column (PanelPosition *self,
+ guint *column);
IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_row (IdePanelPosition *self,
- guint row);
-IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_column (IdePanelPosition *self,
- guint *column);
-IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_column (IdePanelPosition *self,
- guint column);
-IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_depth (IdePanelPosition *self,
- guint *depth);
-IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_depth (IdePanelPosition *self,
- guint depth);
-IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_is_indeterminate (IdePanelPosition *self);
-
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (IdePanelPosition, ide_panel_position_unref)
+gboolean ide_panel_position_get_depth (PanelPosition *self,
+ guint *depth);
G_END_DECLS
diff --git a/src/libide/gui/ide-primary-workspace.c b/src/libide/gui/ide-primary-workspace.c
index 233d88f89..ae0b9662a 100644
--- a/src/libide/gui/ide-primary-workspace.c
+++ b/src/libide/gui/ide-primary-workspace.c
@@ -96,9 +96,9 @@ ide_primary_workspace_context_set (IdeWorkspace *workspace,
}
static void
-ide_primary_workspace_add_page (IdeWorkspace *workspace,
- IdePage *page,
- IdePanelPosition *position)
+ide_primary_workspace_add_page (IdeWorkspace *workspace,
+ IdePage *page,
+ PanelPosition *position)
{
IdePrimaryWorkspace *self = (IdePrimaryWorkspace *)workspace;
@@ -114,9 +114,9 @@ ide_primary_workspace_add_page (IdeWorkspace *workspace,
}
static void
-ide_primary_workspace_add_pane (IdeWorkspace *workspace,
- IdePane *pane,
- IdePanelPosition *position)
+ide_primary_workspace_add_pane (IdeWorkspace *workspace,
+ IdePane *pane,
+ PanelPosition *position)
{
IdePrimaryWorkspace *self = (IdePrimaryWorkspace *)workspace;
@@ -171,8 +171,8 @@ ide_primary_workspace_get_most_recent_frame (IdeWorkspace *workspace)
}
static PanelFrame *
-ide_primary_workspace_get_frame_at_position (IdeWorkspace *workspace,
- IdePanelPosition *position)
+ide_primary_workspace_get_frame_at_position (IdeWorkspace *workspace,
+ PanelPosition *position)
{
IdePrimaryWorkspace *self = (IdePrimaryWorkspace *)workspace;
diff --git a/src/libide/gui/ide-workbench-addin.c b/src/libide/gui/ide-workbench-addin.c
index 86b305026..0e9a4700e 100644
--- a/src/libide/gui/ide-workbench-addin.c
+++ b/src/libide/gui/ide-workbench-addin.c
@@ -77,7 +77,7 @@ ide_workbench_addin_real_open_async (IdeWorkbenchAddin *self,
int at_line,
int at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -248,7 +248,7 @@ ide_workbench_addin_open_async (IdeWorkbenchAddin *self,
int at_line,
int at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
diff --git a/src/libide/gui/ide-workbench-addin.h b/src/libide/gui/ide-workbench-addin.h
index b1ff19fbd..250bbc425 100644
--- a/src/libide/gui/ide-workbench-addin.h
+++ b/src/libide/gui/ide-workbench-addin.h
@@ -75,7 +75,7 @@ struct _IdeWorkbenchAddinInterface
int at_line,
int at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -134,7 +134,7 @@ void ide_workbench_addin_open_async (IdeWorkbenchAddin
int at_line,
int at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/src/libide/gui/ide-workbench.c b/src/libide/gui/ide-workbench.c
index 5aac24181..66581fbaa 100644
--- a/src/libide/gui/ide-workbench.c
+++ b/src/libide/gui/ide-workbench.c
@@ -90,7 +90,7 @@ typedef struct
GFile *file;
gchar *hint;
gchar *content_type;
- IdePanelPosition *position;
+ PanelPosition *position;
IdeBufferOpenFlags flags;
gint at_line;
gint at_line_offset;
@@ -1885,7 +1885,7 @@ ide_workbench_open_async (IdeWorkbench *self,
GFile *file,
const gchar *hint,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -2118,12 +2118,12 @@ ide_workbench_open_at_async (IdeWorkbench *self,
gint at_line,
gint at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_autoptr(IdePanelPosition) local_position = NULL;
+ g_autoptr(PanelPosition) local_position = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GPtrArray) addins = NULL;
IdeWorkbench *other;
@@ -2135,7 +2135,7 @@ ide_workbench_open_at_async (IdeWorkbench *self,
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
if (position == NULL)
- position = local_position = ide_panel_position_new ();
+ position = local_position = panel_position_new ();
/* Possibly re-route opening the file to another workbench if we
* discover the file is a better fit over there.
@@ -2188,7 +2188,7 @@ ide_workbench_open_at_async (IdeWorkbench *self,
o->flags = flags;
o->at_line = at_line;
o->at_line_offset = at_line_offset;
- o->position = ide_panel_position_ref (position);
+ o->position = g_object_ref (position);
ide_task_set_task_data (task, o, open_free);
g_file_query_info_async (file,
diff --git a/src/libide/gui/ide-workbench.h b/src/libide/gui/ide-workbench.h
index b534049b8..cd678a6f8 100644
--- a/src/libide/gui/ide-workbench.h
+++ b/src/libide/gui/ide-workbench.h
@@ -104,7 +104,7 @@ void ide_workbench_open_async (IdeWorkbench *self
GFile *file,
const gchar *hint,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -115,7 +115,7 @@ void ide_workbench_open_at_async (IdeWorkbench *self
gint at_line,
gint at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/src/libide/gui/ide-workspace-private.h b/src/libide/gui/ide-workspace-private.h
index 6d6512dca..6371a4295 100644
--- a/src/libide/gui/ide-workspace-private.h
+++ b/src/libide/gui/ide-workspace-private.h
@@ -39,13 +39,13 @@ gboolean _ide_workspace_can_search (IdeWorkspace *self);
void _ide_workspace_begin_global_search (IdeWorkspace *self);
void _ide_workspace_add_widget (IdeWorkspace *workspace,
PanelWidget *widget,
- IdePanelPosition *position,
+ PanelPosition *position,
PanelPaned *dock_start,
PanelPaned *dock_end,
PanelPaned *dock_bottom,
IdeGrid *grid);
PanelFrame *_ide_workspace_find_frame (IdeWorkspace *workspace,
- IdePanelPosition *position,
+ PanelPosition *position,
PanelPaned *dock_start,
PanelPaned *dock_end,
PanelPaned *dock_bottom,
diff --git a/src/libide/gui/ide-workspace.c b/src/libide/gui/ide-workspace.c
index 33b917419..20d7b18e4 100644
--- a/src/libide/gui/ide-workspace.c
+++ b/src/libide/gui/ide-workspace.c
@@ -963,9 +963,9 @@ ide_workspace_addin_find_by_module_name (IdeWorkspace *workspace,
* position in which @page was added.
*/
void
-ide_workspace_add_page (IdeWorkspace *self,
- IdePage *page,
- IdePanelPosition *position)
+ide_workspace_add_page (IdeWorkspace *self,
+ IdePage *page,
+ PanelPosition *position)
{
g_return_if_fail (IDE_IS_WORKSPACE (self));
g_return_if_fail (IDE_IS_PAGE (page));
@@ -990,9 +990,9 @@ ide_workspace_add_page (IdeWorkspace *self,
* position in which @pane was added.
*/
void
-ide_workspace_add_pane (IdeWorkspace *self,
- IdePane *pane,
- IdePanelPosition *position)
+ide_workspace_add_pane (IdeWorkspace *self,
+ IdePane *pane,
+ PanelPosition *position)
{
g_return_if_fail (IDE_IS_WORKSPACE (self));
g_return_if_fail (IDE_IS_PANE (pane));
@@ -1208,13 +1208,13 @@ dummy_cb (gpointer data)
}
void
-_ide_workspace_add_widget (IdeWorkspace *self,
- PanelWidget *widget,
- IdePanelPosition *position,
- PanelPaned *dock_start,
- PanelPaned *dock_end,
- PanelPaned *dock_bottom,
- IdeGrid *grid)
+_ide_workspace_add_widget (IdeWorkspace *self,
+ PanelWidget *widget,
+ PanelPosition *position,
+ PanelPaned *dock_start,
+ PanelPaned *dock_end,
+ PanelPaned *dock_bottom,
+ IdeGrid *grid)
{
PanelFrame *frame;
gboolean depth_set;
@@ -1249,12 +1249,12 @@ _ide_workspace_add_widget (IdeWorkspace *self,
}
PanelFrame *
-_ide_workspace_find_frame (IdeWorkspace *self,
- IdePanelPosition *position,
- PanelPaned *dock_start,
- PanelPaned *dock_end,
- PanelPaned *dock_bottom,
- IdeGrid *grid)
+_ide_workspace_find_frame (IdeWorkspace *self,
+ PanelPosition *position,
+ PanelPaned *dock_start,
+ PanelPaned *dock_end,
+ PanelPaned *dock_bottom,
+ IdeGrid *grid)
{
PanelArea area;
PanelPaned *paned = NULL;
@@ -1340,15 +1340,15 @@ _ide_workspace_find_frame (IdeWorkspace *self,
/**
* ide_workspace_get_frame_at_position:
* @self: an #IdeWorkspace
- * @position: an #IdePanelPosition
+ * @position: an #PanelPosition
*
* Attempts to locate the #PanelFrame at a given position.
*
* Returns: (transfer none) (nullable): a #PaneFrame or %NULL
*/
PanelFrame *
-ide_workspace_get_frame_at_position (IdeWorkspace *self,
- IdePanelPosition *position)
+ide_workspace_get_frame_at_position (IdeWorkspace *self,
+ PanelPosition *position)
{
g_return_val_if_fail (IDE_IS_WORKSPACE (self), NULL);
g_return_val_if_fail (position != NULL, NULL);
diff --git a/src/libide/gui/ide-workspace.h b/src/libide/gui/ide-workspace.h
index d7b82bc1f..2efec44ee 100644
--- a/src/libide/gui/ide-workspace.h
+++ b/src/libide/gui/ide-workspace.h
@@ -73,10 +73,10 @@ struct _IdeWorkspaceClass
GError **error);
void (*add_pane) (IdeWorkspace *self,
IdePane *pane,
- IdePanelPosition *position);
+ PanelPosition *position);
void (*add_page) (IdeWorkspace *self,
IdePage *page,
- IdePanelPosition *position);
+ PanelPosition *position);
void (*add_grid_column) (IdeWorkspace *self,
guint column);
void (*add_overlay) (IdeWorkspace *self,
@@ -84,7 +84,7 @@ struct _IdeWorkspaceClass
void (*remove_overlay) (IdeWorkspace *self,
GtkWidget *overlay);
PanelFrame *(*get_frame_at_position) (IdeWorkspace *self,
- IdePanelPosition *position);
+ PanelPosition *position);
void (*restore_size) (IdeWorkspace *self,
int width,
int height);
@@ -126,15 +126,15 @@ IDE_AVAILABLE_IN_ALL
IdeFrame *ide_workspace_get_most_recent_frame (IdeWorkspace *self);
IDE_AVAILABLE_IN_ALL
PanelFrame *ide_workspace_get_frame_at_position (IdeWorkspace *self,
- IdePanelPosition *position);
+ PanelPosition *position);
IDE_AVAILABLE_IN_ALL
void ide_workspace_add_pane (IdeWorkspace *self,
IdePane *pane,
- IdePanelPosition *position);
+ PanelPosition *position);
IDE_AVAILABLE_IN_ALL
void ide_workspace_add_page (IdeWorkspace *self,
IdePage *page,
- IdePanelPosition *position);
+ PanelPosition *position);
IDE_AVAILABLE_IN_ALL
void ide_workspace_add_grid_column (IdeWorkspace *self,
guint position);
diff --git a/src/plugins/buildui/gbp-buildui-status-popover.c
b/src/plugins/buildui/gbp-buildui-status-popover.c
index 160548fd0..28838d9b8 100644
--- a/src/plugins/buildui/gbp-buildui-status-popover.c
+++ b/src/plugins/buildui/gbp-buildui-status-popover.c
@@ -141,7 +141,7 @@ gbp_buildui_status_popover_activate_cb (GbpBuilduiStatusPopover *self,
guint item_position,
GtkListView *list_view)
{
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(IdeDiagnostic) diagnostic = NULL;
IdeWorkspace *workspace;
IdeLocation *location;
@@ -159,7 +159,7 @@ gbp_buildui_status_popover_activate_cb (GbpBuilduiStatusPopover *self,
IDE_EXIT;
workspace = ide_widget_get_workspace (GTK_WIDGET (self));
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_editor_focus_location (workspace, position, location);
gtk_popover_popdown (GTK_POPOVER (self));
diff --git a/src/plugins/buildui/gbp-buildui-workspace-addin.c
b/src/plugins/buildui/gbp-buildui-workspace-addin.c
index 554a93e27..5ce12bc60 100644
--- a/src/plugins/buildui/gbp-buildui-workspace-addin.c
+++ b/src/plugins/buildui/gbp-buildui-workspace-addin.c
@@ -257,8 +257,8 @@ gbp_buildui_workspace_addin_load (IdeWorkspaceAddin *addin,
IdeWorkspace *workspace)
{
GbpBuilduiWorkspaceAddin *self = (GbpBuilduiWorkspaceAddin *)addin;
- g_autoptr(IdePanelPosition) pane_position = NULL;
- g_autoptr(IdePanelPosition) log_position = NULL;
+ g_autoptr(PanelPosition) pane_position = NULL;
+ g_autoptr(PanelPosition) log_position = NULL;
PangoAttrList *small_attrs = NULL;
IdeBuildManager *build_manager;
PanelStatusbar *statusbar;
@@ -345,16 +345,16 @@ gbp_buildui_workspace_addin_load (IdeWorkspaceAddin *addin,
ide_omni_bar_add_popover_section (omnibar, GTK_WIDGET (self->omni_bar_section), 0);
gbp_buildui_omni_bar_section_set_context (self->omni_bar_section, context);
- log_position = ide_panel_position_new ();
- ide_panel_position_set_area (log_position, PANEL_AREA_BOTTOM);
- ide_panel_position_set_depth (log_position, 2);
+ log_position = panel_position_new ();
+ panel_position_set_area (log_position, PANEL_AREA_BOTTOM);
+ panel_position_set_depth (log_position, 2);
self->log_pane = g_object_new (GBP_TYPE_BUILDUI_LOG_PANE, NULL);
ide_workspace_add_pane (workspace, IDE_PANE (self->log_pane), log_position);
- pane_position = ide_panel_position_new ();
- ide_panel_position_set_area (pane_position, PANEL_AREA_START);
- ide_panel_position_set_depth (pane_position, 1);
+ pane_position = panel_position_new ();
+ panel_position_set_area (pane_position, PANEL_AREA_START);
+ panel_position_set_depth (pane_position, 1);
self->pane = g_object_new (GBP_TYPE_BUILDUI_PANE, NULL);
ide_workspace_add_pane (workspace, IDE_PANE (self->pane), pane_position);
diff --git a/src/plugins/code-index/ide-code-index-search-result.c
b/src/plugins/code-index/ide-code-index-search-result.c
index 87c2c5899..bca4db06c 100644
--- a/src/plugins/code-index/ide-code-index-search-result.c
+++ b/src/plugins/code-index/ide-code-index-search-result.c
@@ -48,14 +48,14 @@ ide_code_index_search_result_activate (IdeSearchResult *result,
GtkWidget *last_focus)
{
IdeCodeIndexSearchResult *self = (IdeCodeIndexSearchResult *)result;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeWorkspace *workspace;
g_assert (IDE_IS_CODE_INDEX_SEARCH_RESULT (self));
g_assert (GTK_IS_WIDGET (last_focus));
workspace = ide_widget_get_workspace (last_focus);
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_editor_focus_location (workspace, position, self->location);
}
diff --git a/src/plugins/debuggerui/ide-debugger-workspace-addin.c
b/src/plugins/debuggerui/ide-debugger-workspace-addin.c
index 9bea86aeb..7cf99870d 100644
--- a/src/plugins/debuggerui/ide-debugger-workspace-addin.c
+++ b/src/plugins/debuggerui/ide-debugger-workspace-addin.c
@@ -177,7 +177,7 @@ on_frame_activated (IdeDebuggerWorkspaceAddin *self,
IdeContext *context = ide_widget_get_context (GTK_WIDGET (threads_view));
g_autofree gchar *project_path = ide_context_build_filename (context, path, NULL);
g_autoptr(GFile) file = g_file_new_for_path (project_path);
- g_autoptr(IdePanelPosition) position = ide_panel_position_new ();
+ g_autoptr(PanelPosition) position = panel_position_new ();
g_autoptr(IdeLocation) location = NULL;
location = ide_location_new (file, line, -1);
@@ -202,7 +202,7 @@ on_frame_activated (IdeDebuggerWorkspaceAddin *self,
static void
ide_debugger_workspace_addin_add_ui (IdeDebuggerWorkspaceAddin *self)
{
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
GtkNotebook *notebook;
PanelPaned *hpaned;
@@ -265,8 +265,8 @@ ide_debugger_workspace_addin_add_ui (IdeDebuggerWorkspaceAddin *self)
GTK_WIDGET (self->log_view),
gtk_label_new (_("Console")));
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_BOTTOM);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_BOTTOM);
ide_workspace_add_pane (self->workspace, IDE_PANE (self->panel), position);
}
@@ -417,7 +417,7 @@ ide_debugger_workspace_addin_disassemble_cb (GObject *object,
if (self->disassembly_view == NULL)
{
- g_autoptr(IdePanelPosition) position = ide_panel_position_new ();
+ g_autoptr(PanelPosition) position = panel_position_new ();
ide_page_observe (g_object_new (IDE_TYPE_DEBUGGER_DISASSEMBLY_VIEW, NULL),
(IdePage **)&self->disassembly_view);
diff --git a/src/plugins/editorui/gbp-editorui-workbench-addin.c
b/src/plugins/editorui/gbp-editorui-workbench-addin.c
index 576343f2e..09e39110a 100644
--- a/src/plugins/editorui/gbp-editorui-workbench-addin.c
+++ b/src/plugins/editorui/gbp-editorui-workbench-addin.c
@@ -36,7 +36,7 @@ struct _GbpEditoruiWorkbenchAddin
typedef struct
{
- IdePanelPosition *position;
+ PanelPosition *position;
GFile *file;
IdeBufferOpenFlags flags;
gint at_line;
@@ -51,7 +51,7 @@ open_file_task_data_free (gpointer data)
OpenFileTaskData *td = data;
g_clear_object (&td->file);
- g_clear_pointer (&td->position, ide_panel_position_unref);
+ g_clear_pointer (&td->position, g_object_unref);
g_slice_free (OpenFileTaskData, td);
}
@@ -228,7 +228,7 @@ gbp_editorui_workbench_addin_open_async (IdeWorkbenchAddin *addin,
gint at_line,
gint at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -251,7 +251,7 @@ gbp_editorui_workbench_addin_open_async (IdeWorkbenchAddin *addin,
state->file = g_object_ref (file);
state->at_line = at_line;
state->at_line_offset = at_line_offset;
- state->position = ide_panel_position_ref (position);
+ state->position = g_object_ref (position);
ide_task_set_task_data (task, state, open_file_task_data_free);
context = ide_workbench_get_context (self->workbench);
diff --git a/src/plugins/editorui/gbp-editorui-workspace-addin.c
b/src/plugins/editorui/gbp-editorui-workspace-addin.c
index fe4807ab7..fb61dfde4 100644
--- a/src/plugins/editorui/gbp-editorui-workspace-addin.c
+++ b/src/plugins/editorui/gbp-editorui-workspace-addin.c
@@ -227,7 +227,7 @@ new_file_cb (GObject *object,
{
IdeBufferManager *bufmgr = (IdeBufferManager *)object;
g_autoptr(IdeWorkspace) workspace = user_data;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(IdeBuffer) buffer = NULL;
g_autoptr(GError) error = NULL;
GtkWidget *page;
@@ -245,7 +245,7 @@ new_file_cb (GObject *object,
}
page = ide_editor_page_new (buffer);
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_workspace_add_page (workspace, IDE_PAGE (page), position);
panel_widget_raise (PANEL_WIDGET (page));
gtk_widget_grab_focus (GTK_WIDGET (page));
diff --git a/src/plugins/find-other-file/gbp-found-file.c b/src/plugins/find-other-file/gbp-found-file.c
index d3ae24da8..ea852f5e5 100644
--- a/src/plugins/find-other-file/gbp-found-file.c
+++ b/src/plugins/find-other-file/gbp-found-file.c
@@ -222,7 +222,7 @@ void
gbp_found_file_open (GbpFoundFile *self,
IdeWorkspace *workspace)
{
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeWorkbench *workbench;
IDE_ENTRY;
@@ -231,7 +231,7 @@ gbp_found_file_open (GbpFoundFile *self,
g_return_if_fail (IDE_IS_WORKSPACE (workspace));
workbench = ide_workspace_get_workbench (workspace);
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_workbench_open_async (workbench,
self->file,
diff --git a/src/plugins/grep/gbp-grep-panel.c b/src/plugins/grep/gbp-grep-panel.c
index 36cb8f1a6..4d4dd2144 100644
--- a/src/plugins/grep/gbp-grep-panel.c
+++ b/src/plugins/grep/gbp-grep-panel.c
@@ -242,7 +242,7 @@ gbp_grep_panel_row_activated_cb (GbpGrepPanel *self,
if G_LIKELY (line != NULL)
{
g_autoptr(IdeLocation) location = NULL;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(GFile) child = NULL;
IdeWorkspace *workspace;
guint lineno = line->line;
@@ -255,7 +255,7 @@ gbp_grep_panel_row_activated_cb (GbpGrepPanel *self,
child = gbp_grep_model_get_file (GBP_GREP_MODEL (model), line->path);
location = ide_location_new (child, lineno, -1);
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_editor_focus_location (workspace, position, location);
}
}
diff --git a/src/plugins/grep/gbp-grep-popover.c b/src/plugins/grep/gbp-grep-popover.c
index a54551772..2f4bc1494 100644
--- a/src/plugins/grep/gbp-grep-popover.c
+++ b/src/plugins/grep/gbp-grep-popover.c
@@ -60,7 +60,7 @@ gbp_grep_popover_button_clicked_cb (GbpGrepPopover *self,
GtkButton *button)
{
g_autoptr(GbpGrepModel) model = NULL;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeWorkspace *workspace;
IdeContext *context;
GtkWidget *panel;
@@ -75,8 +75,8 @@ gbp_grep_popover_button_clicked_cb (GbpGrepPopover *self,
workspace = ide_widget_get_workspace (GTK_WIDGET (self));
context = ide_widget_get_context (GTK_WIDGET (workspace));
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_BOTTOM);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_BOTTOM);
use_regex = gtk_check_button_get_active (GTK_CHECK_BUTTON (self->regex_button));
at_word_boundaries = gtk_check_button_get_active (GTK_CHECK_BUTTON (self->whole_button));
diff --git a/src/plugins/grep/gbp-grep-workspace-addin.c b/src/plugins/grep/gbp-grep-workspace-addin.c
index dd31c0f3f..f08de63a0 100644
--- a/src/plugins/grep/gbp-grep-workspace-addin.c
+++ b/src/plugins/grep/gbp-grep-workspace-addin.c
@@ -58,15 +58,15 @@ gbp_grep_workspace_addin_load (IdeWorkspaceAddin *addin,
{
GbpGrepWorkspaceAddin *self = (GbpGrepWorkspaceAddin *)addin;
g_autoptr(GSimpleActionGroup) group = NULL;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_assert (GBP_IS_GREP_WORKSPACE_ADDIN (self));
g_assert (IDE_IS_WORKSPACE (workspace));
self->panel = g_object_new (GBP_TYPE_GREP_PANEL, NULL);
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_BOTTOM);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_BOTTOM);
ide_workspace_add_pane (workspace, self->panel, position);
}
diff --git a/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
b/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
index cc2291441..83107faf7 100644
--- a/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
+++ b/src/plugins/html-preview/gbp-html-preview-workspace-addin.c
@@ -209,7 +209,7 @@ live_preview_action (GbpHtmlPreviewWorkspaceAddin *self,
GVariant *params)
{
g_autoptr(IdeHtmlGenerator) generator = NULL;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(IdeBuffer) buffer = NULL;
IdeWebkitPage *page;
guint column = 0;
@@ -229,8 +229,8 @@ live_preview_action (GbpHtmlPreviewWorkspaceAddin *self,
if (!ide_panel_position_get_column (position, &column))
column = 0;
- ide_panel_position_set_column (position, column + 1);
- ide_panel_position_set_depth (position, 0);
+ panel_position_set_column (position, column + 1);
+ panel_position_set_depth (position, 0);
ide_workspace_add_page (self->workspace, IDE_PAGE (page), position);
panel_widget_raise (PANEL_WIDGET (page));
diff --git a/src/plugins/ls/gbp-ls-workbench-addin.c b/src/plugins/ls/gbp-ls-workbench-addin.c
index 48e11b46c..14ceac481 100644
--- a/src/plugins/ls/gbp-ls-workbench-addin.c
+++ b/src/plugins/ls/gbp-ls-workbench-addin.c
@@ -84,16 +84,16 @@ locate_view (IdePage *view,
}
static void
-gbp_ls_workbench_addin_open_async (IdeWorkbenchAddin *addin,
- GFile *file,
- const gchar *content_type,
- int at_line,
- int at_line_offset,
- IdeBufferOpenFlags flags,
- IdePanelPosition *position,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+gbp_ls_workbench_addin_open_async (IdeWorkbenchAddin *addin,
+ GFile *file,
+ const gchar *content_type,
+ int at_line,
+ int at_line_offset,
+ IdeBufferOpenFlags flags,
+ PanelPosition *position,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GbpLsWorkbenchAddin *self = (GbpLsWorkbenchAddin *)addin;
g_autoptr(IdeTask) task = NULL;
diff --git a/src/plugins/markdown-preview/gbp-markdown-preview-workspace-addin.c
b/src/plugins/markdown-preview/gbp-markdown-preview-workspace-addin.c
index be5868a02..219c07d79 100644
--- a/src/plugins/markdown-preview/gbp-markdown-preview-workspace-addin.c
+++ b/src/plugins/markdown-preview/gbp-markdown-preview-workspace-addin.c
@@ -196,7 +196,7 @@ live_preview_action (GbpMarkdownPreviewWorkspaceAddin *self,
GVariant *params)
{
g_autoptr(IdeHtmlGenerator) generator = NULL;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(IdeBuffer) buffer = NULL;
IdeWebkitPage *page;
guint column = 0;
@@ -218,8 +218,8 @@ live_preview_action (GbpMarkdownPreviewWorkspaceAddin *self,
if (!ide_panel_position_get_column (position, &column))
column = 0;
- ide_panel_position_set_column (position, column + 1);
- ide_panel_position_set_depth (position, 0);
+ panel_position_set_column (position, column + 1);
+ panel_position_set_depth (position, 0);
ide_workspace_add_page (self->workspace, IDE_PAGE (page), position);
panel_widget_raise (PANEL_WIDGET (page));
diff --git a/src/plugins/messages/gbp-messages-workspace-addin.c
b/src/plugins/messages/gbp-messages-workspace-addin.c
index ce9eded86..ad2bd3b56 100644
--- a/src/plugins/messages/gbp-messages-workspace-addin.c
+++ b/src/plugins/messages/gbp-messages-workspace-addin.c
@@ -36,13 +36,13 @@ gbp_messages_workspace_addin_load (IdeWorkspaceAddin *addin,
IdeWorkspace *workspace)
{
GbpMessagesWorkspaceAddin *self = (GbpMessagesWorkspaceAddin *)addin;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_assert (GBP_IS_MESSAGES_WORKSPACE_ADDIN (self));
g_assert (IDE_IS_WORKSPACE (workspace));
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_BOTTOM);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_BOTTOM);
self->panel = g_object_new (GBP_TYPE_MESSAGES_PANEL, NULL);
ide_workspace_add_pane (workspace, IDE_PANE (self->panel), position);
diff --git a/src/plugins/open-with-external/gbp-owe-workbench-addin.c
b/src/plugins/open-with-external/gbp-owe-workbench-addin.c
index af095e2b4..6e07d5ec8 100644
--- a/src/plugins/open-with-external/gbp-owe-workbench-addin.c
+++ b/src/plugins/open-with-external/gbp-owe-workbench-addin.c
@@ -88,16 +88,16 @@ on_file_opened_cb (GObject *source_object,
}
static void
-gbp_owe_workbench_addin_open_async (IdeWorkbenchAddin *addin,
- GFile *file,
- const gchar *content_type,
- int line,
- int line_offset,
- IdeBufferOpenFlags flags,
- IdePanelPosition *position,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+gbp_owe_workbench_addin_open_async (IdeWorkbenchAddin *addin,
+ GFile *file,
+ const gchar *content_type,
+ int line,
+ int line_offset,
+ IdeBufferOpenFlags flags,
+ PanelPosition *position,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GbpOweWorkbenchAddin *self = (GbpOweWorkbenchAddin *)addin;
g_autoptr(IdeTask) task = NULL;
diff --git a/src/plugins/project-tree/gbp-project-tree-workspace-addin.c
b/src/plugins/project-tree/gbp-project-tree-workspace-addin.c
index d0d41030f..2c95ae490 100644
--- a/src/plugins/project-tree/gbp-project-tree-workspace-addin.c
+++ b/src/plugins/project-tree/gbp-project-tree-workspace-addin.c
@@ -39,7 +39,7 @@ gbp_project_tree_workspace_addin_load (IdeWorkspaceAddin *addin,
IdeWorkspace *workspace)
{
GbpProjectTreeWorkspaceAddin *self = (GbpProjectTreeWorkspaceAddin *)addin;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_assert (GBP_IS_PROJECT_TREE_WORKSPACE_ADDIN (self));
g_assert (IDE_IS_WORKSPACE (workspace));
@@ -50,10 +50,10 @@ gbp_project_tree_workspace_addin_load (IdeWorkspaceAddin *addin,
NULL),
(IdePane **)&self->pane);
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_START);
- ide_panel_position_set_row (position, 0);
- ide_panel_position_set_depth (position, 0);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_START);
+ panel_position_set_row (position, 0);
+ panel_position_set_depth (position, 0);
ide_workspace_add_pane (workspace, IDE_PANE (self->pane), position);
diff --git a/src/plugins/shellcmd/gbp-shellcmd-search-result.c
b/src/plugins/shellcmd/gbp-shellcmd-search-result.c
index a22600af2..93a14df70 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-search-result.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-search-result.c
@@ -44,7 +44,7 @@ gbp_shellcmd_search_result_activate (IdeSearchResult *result,
{
GbpShellcmdSearchResult *self = (GbpShellcmdSearchResult *)result;
g_autoptr(IdeTerminalLauncher) launcher = NULL;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeWorkspace *workspace;
IdeContext *context;
const char *title;
@@ -77,7 +77,7 @@ gbp_shellcmd_search_result_activate (IdeSearchResult *result,
"title", title,
NULL);
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_workspace_add_page (workspace, page, position);
panel_widget_raise (PANEL_WIDGET (page));
diff --git a/src/plugins/shellcmd/gbp-shellcmd-shortcut-provider.c
b/src/plugins/shellcmd/gbp-shellcmd-shortcut-provider.c
index b96169602..aec01afab 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-shortcut-provider.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-shortcut-provider.c
@@ -44,7 +44,7 @@ gbp_shellcmd_shortcut_func (GtkWidget *widget,
gpointer user_data)
{
GbpShellcmdRunCommand *run_command = user_data;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(IdeTerminalLauncher) launcher = NULL;
IdeWorkspace *workspace;
IdeContext *context;
@@ -83,7 +83,7 @@ gbp_shellcmd_shortcut_func (GtkWidget *widget,
"title", title,
NULL);
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_workspace_add_page (workspace, page, position);
panel_widget_raise (PANEL_WIDGET (page));
diff --git a/src/plugins/sphinx-preview/gbp-sphinx-preview-workspace-addin.c
b/src/plugins/sphinx-preview/gbp-sphinx-preview-workspace-addin.c
index 3ff62804b..7b2123020 100644
--- a/src/plugins/sphinx-preview/gbp-sphinx-preview-workspace-addin.c
+++ b/src/plugins/sphinx-preview/gbp-sphinx-preview-workspace-addin.c
@@ -266,7 +266,7 @@ static void
live_preview_action (GbpSphinxPreviewWorkspaceAddin *self,
GVariant *params)
{
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(IdeBuffer) buffer = NULL;
g_autoptr(GFile) workdir = NULL;
g_autoptr(GFile) parent = NULL;
@@ -292,8 +292,8 @@ live_preview_action (GbpSphinxPreviewWorkspaceAddin *self,
if (!ide_panel_position_get_column (position, &column))
column = 0;
- ide_panel_position_set_column (position, column + 1);
- ide_panel_position_set_depth (position, 0);
+ panel_position_set_column (position, column + 1);
+ panel_position_set_depth (position, 0);
while (parent != NULL &&
(g_file_equal (workdir, parent) || g_file_has_prefix (parent, workdir)))
diff --git a/src/plugins/symbol-tree/gbp-symbol-hover-provider.c
b/src/plugins/symbol-tree/gbp-symbol-hover-provider.c
index ab922a9d8..ba2fd9bf0 100644
--- a/src/plugins/symbol-tree/gbp-symbol-hover-provider.c
+++ b/src/plugins/symbol-tree/gbp-symbol-hover-provider.c
@@ -42,7 +42,7 @@ on_activate_link (GtkLabel *label,
const gchar *uristr,
IdeLocation *location)
{
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeWorkspace *workspace;
g_assert (uristr != NULL);
@@ -52,7 +52,7 @@ on_activate_link (GtkLabel *label,
if (!(workspace = ide_widget_get_workspace (GTK_WIDGET (label))))
return FALSE;
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_editor_focus_location (workspace, position, location);
return TRUE;
diff --git a/src/plugins/symbol-tree/gbp-symbol-popover.c b/src/plugins/symbol-tree/gbp-symbol-popover.c
index cceb8c87b..faf71c3ed 100644
--- a/src/plugins/symbol-tree/gbp-symbol-popover.c
+++ b/src/plugins/symbol-tree/gbp-symbol-popover.c
@@ -70,7 +70,7 @@ gbp_symbol_popover_get_location_cb (GObject *object,
if ((location = ide_symbol_node_get_location_finish (node, result, &error)))
{
IdeWorkspace *workspace = ide_widget_get_workspace (GTK_WIDGET (self));
- g_autoptr(IdePanelPosition) position = ide_panel_position_new ();
+ g_autoptr(PanelPosition) position = panel_position_new ();
ide_editor_focus_location (workspace, position, location);
diff --git a/src/plugins/sysprof/gbp-sysprof-page.c b/src/plugins/sysprof/gbp-sysprof-page.c
index 1824b614b..04ff765b2 100644
--- a/src/plugins/sysprof/gbp-sysprof-page.c
+++ b/src/plugins/sysprof/gbp-sysprof-page.c
@@ -110,7 +110,7 @@ record_again_action (GSimpleAction *action,
gpointer user_data)
{
GbpSysprofPage *self = user_data;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
GbpSysprofPage *new_page;
SysprofDisplay *display;
IdeWorkspace *workspace;
@@ -129,7 +129,7 @@ record_again_action (GSimpleAction *action,
workspace = ide_widget_get_workspace (GTK_WIDGET (self));
position = ide_page_get_position (IDE_PAGE (self));
- ide_panel_position_set_depth (position, 0);
+ panel_position_set_depth (position, 0);
ide_workspace_add_page (workspace, IDE_PAGE (new_page), position);
}
diff --git a/src/plugins/sysprof/gbp-sysprof-tool.c b/src/plugins/sysprof/gbp-sysprof-tool.c
index 9330d4047..4b30e0840 100644
--- a/src/plugins/sysprof/gbp-sysprof-tool.c
+++ b/src/plugins/sysprof/gbp-sysprof-tool.c
@@ -337,7 +337,7 @@ gbp_sysprof_tool_stopped (IdeRunTool *run_tool)
IdeContext *context = ide_object_get_context (IDE_OBJECT (self));
IdeWorkbench *workbench = ide_workbench_from_context (context);
IdeWorkspace *workspace = ide_workbench_get_current_workspace (workbench);
- g_autoptr(IdePanelPosition) position = ide_panel_position_new ();
+ g_autoptr(PanelPosition) position = panel_position_new ();
ide_workspace_add_page (workspace, IDE_PAGE (page), position);
diff --git a/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
b/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
index 852f7857f..449ad836e 100644
--- a/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
+++ b/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
@@ -87,7 +87,7 @@ gbp_sysprof_workbench_addin_open_async (IdeWorkbenchAddin *addin,
int at_line,
int at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -310,7 +310,7 @@ on_native_dialog_response_cb (GbpSysprofWorkbenchAddin *self,
if (response_id == GTK_RESPONSE_ACCEPT)
{
g_autoptr(GFile) file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (native));
- g_autoptr(IdePanelPosition) position = ide_panel_position_new ();
+ g_autoptr(PanelPosition) position = panel_position_new ();
if (G_IS_FILE (file))
gbp_sysprof_workbench_addin_open_async (IDE_WORKBENCH_ADDIN (self),
diff --git a/src/plugins/terminal/gbp-terminal-workspace-addin.c
b/src/plugins/terminal/gbp-terminal-workspace-addin.c
index c6a75f31d..a0106d4fd 100644
--- a/src/plugins/terminal/gbp-terminal-workspace-addin.c
+++ b/src/plugins/terminal/gbp-terminal-workspace-addin.c
@@ -68,7 +68,7 @@ gbp_terminal_workspace_addin_add_page (GbpTerminalWorkspaceAddin *self,
const char *cwd)
{
g_autoptr(IdeTerminalLauncher) launcher = NULL;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
g_autoptr(IdeRunCommand) run_command = NULL;
IdeContext *context;
IdePage *current_page;
@@ -94,7 +94,7 @@ gbp_terminal_workspace_addin_add_page (GbpTerminalWorkspaceAddin *self,
position = ide_page_get_position (current_page);
if (position == NULL)
- position = ide_panel_position_new ();
+ position = panel_position_new ();
page = g_object_new (IDE_TYPE_TERMINAL_PAGE,
"respawn-on-exit", FALSE,
@@ -241,7 +241,7 @@ gbp_terminal_workspace_addin_load (IdeWorkspaceAddin *addin,
IdeWorkspace *workspace)
{
GbpTerminalWorkspaceAddin *self = (GbpTerminalWorkspaceAddin *)addin;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeContext *context;
IdePage *page;
IdePane *pane;
@@ -264,8 +264,8 @@ gbp_terminal_workspace_addin_load (IdeWorkspaceAddin *addin,
}
/* Always add the terminal panel to primary/editor workspaces */
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_BOTTOM);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_BOTTOM);
page = g_object_new (IDE_TYPE_TERMINAL_PAGE,
"respawn-on-exit", TRUE,
"visible", TRUE,
diff --git a/src/plugins/testui/gbp-testui-workspace-addin.c b/src/plugins/testui/gbp-testui-workspace-addin.c
index f8417c4c1..e61241f13 100644
--- a/src/plugins/testui/gbp-testui-workspace-addin.c
+++ b/src/plugins/testui/gbp-testui-workspace-addin.c
@@ -133,8 +133,8 @@ gbp_testui_workspace_addin_load (IdeWorkspaceAddin *addin,
IdeWorkspace *workspace)
{
GbpTestuiWorkspaceAddin *self = (GbpTestuiWorkspaceAddin *)addin;
- g_autoptr(IdePanelPosition) position = NULL;
- g_autoptr(IdePanelPosition) output_position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
+ g_autoptr(PanelPosition) output_position = NULL;
IdeTestManager *test_manager;
IdeContext *context;
VtePty *pty;
@@ -168,15 +168,15 @@ gbp_testui_workspace_addin_load (IdeWorkspaceAddin *addin,
G_CALLBACK (on_test_activated_cb),
self,
G_CONNECT_SWAPPED);
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_START);
- ide_panel_position_set_row (position, 0);
- ide_panel_position_set_depth (position, 2);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_START);
+ panel_position_set_row (position, 0);
+ panel_position_set_depth (position, 2);
ide_workspace_add_pane (workspace, IDE_PANE (self->panel), position);
self->output_panel = gbp_testui_output_panel_new (pty);
- output_position = ide_panel_position_new ();
- ide_panel_position_set_area (output_position, PANEL_AREA_BOTTOM);
+ output_position = panel_position_new ();
+ panel_position_set_area (output_position, PANEL_AREA_BOTTOM);
ide_workspace_add_pane (workspace, IDE_PANE (self->output_panel), output_position);
IDE_EXIT;
diff --git a/src/plugins/todo/gbp-todo-workspace-addin.c b/src/plugins/todo/gbp-todo-workspace-addin.c
index 6a8e17a38..9e02e7afa 100644
--- a/src/plugins/todo/gbp-todo-workspace-addin.c
+++ b/src/plugins/todo/gbp-todo-workspace-addin.c
@@ -109,7 +109,7 @@ gbp_todo_workspace_addin_load (IdeWorkspaceAddin *addin,
IdeWorkspace *workspace)
{
GbpTodoWorkspaceAddin *self = (GbpTodoWorkspaceAddin *)addin;
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeBufferManager *bufmgr;
IdeContext *context;
IdeVcs *vcs;
@@ -146,10 +146,10 @@ gbp_todo_workspace_addin_load (IdeWorkspaceAddin *addin,
self,
G_CONNECT_SWAPPED);
- position = ide_panel_position_new ();
- ide_panel_position_set_area (position, PANEL_AREA_START);
- ide_panel_position_set_row (position, 0);
- ide_panel_position_set_depth (position, 3);
+ position = panel_position_new ();
+ panel_position_set_area (position, PANEL_AREA_START);
+ panel_position_set_row (position, 0);
+ panel_position_set_depth (position, 3);
ide_workspace_add_pane (workspace, IDE_PANE (self->panel), position);
}
diff --git a/src/plugins/vim/gbp-vim-editor-page-addin.c b/src/plugins/vim/gbp-vim-editor-page-addin.c
index 660eda255..799514d03 100644
--- a/src/plugins/vim/gbp-vim-editor-page-addin.c
+++ b/src/plugins/vim/gbp-vim-editor-page-addin.c
@@ -418,14 +418,14 @@ gbp_vim_editor_page_addin_execute_command_cb (GbpVimEditorPageAddin *self,
if (g_str_equal (command, "^Wv"))
{
- g_autoptr(IdePanelPosition) position = ide_page_get_position (IDE_PAGE (self->page));
+ g_autoptr(PanelPosition) position = ide_page_get_position (IDE_PAGE (self->page));
IdePage *new_page = ide_page_create_split (IDE_PAGE (self->page));
IdeWorkspace *workspace = ide_widget_get_workspace (GTK_WIDGET (self->page));
guint column = 0;
ide_panel_position_get_column (position, &column);
- ide_panel_position_set_column (position, column+1);
- ide_panel_position_set_row (position, 0);
+ panel_position_set_column (position, column+1);
+ panel_position_set_row (position, 0);
ide_workspace_add_grid_column (workspace, column+1);
ide_workspace_add_page (workspace, new_page, position);
@@ -434,13 +434,13 @@ gbp_vim_editor_page_addin_execute_command_cb (GbpVimEditorPageAddin *self,
if (g_str_equal (command, "^Ws") ||
g_str_equal (command, ":split"))
{
- g_autoptr(IdePanelPosition) position = ide_page_get_position (IDE_PAGE (self->page));
+ g_autoptr(PanelPosition) position = ide_page_get_position (IDE_PAGE (self->page));
IdePage *new_page = ide_page_create_split (IDE_PAGE (self->page));
IdeWorkspace *workspace = ide_widget_get_workspace (GTK_WIDGET (self->page));
guint row = 0;
ide_panel_position_get_row (position, &row);
- ide_panel_position_set_row (position, row+1);
+ panel_position_set_row (position, row+1);
ide_workspace_add_page (workspace, new_page, position);
}
diff --git a/src/plugins/web-browser/gbp-web-browser-workbench-addin.c
b/src/plugins/web-browser/gbp-web-browser-workbench-addin.c
index 83f2549b3..a83fbccc8 100644
--- a/src/plugins/web-browser/gbp-web-browser-workbench-addin.c
+++ b/src/plugins/web-browser/gbp-web-browser-workbench-addin.c
@@ -89,7 +89,7 @@ gbp_web_browser_workbench_addin_open_async (IdeWorkbenchAddin *addin,
int at_line,
int at_line_offset,
IdeBufferOpenFlags flags,
- IdePanelPosition *position,
+ PanelPosition *position,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
diff --git a/src/plugins/web-browser/gbp-web-browser-workspace-addin.c
b/src/plugins/web-browser/gbp-web-browser-workspace-addin.c
index a492f897d..c19ca7763 100644
--- a/src/plugins/web-browser/gbp-web-browser-workspace-addin.c
+++ b/src/plugins/web-browser/gbp-web-browser-workspace-addin.c
@@ -85,7 +85,7 @@ static void
web_browser_new_page_action (GbpWebBrowserWorkspaceAddin *self,
GVariant *param)
{
- g_autoptr(IdePanelPosition) position = NULL;
+ g_autoptr(PanelPosition) position = NULL;
IdeWebkitPage *page;
IDE_ENTRY;
@@ -94,7 +94,7 @@ web_browser_new_page_action (GbpWebBrowserWorkspaceAddin *self,
g_assert (IDE_IS_WORKSPACE (self->workspace));
page = ide_webkit_page_new ();
- position = ide_panel_position_new ();
+ position = panel_position_new ();
ide_workspace_add_page (self->workspace, IDE_PAGE (page), position);
panel_widget_raise (PANEL_WIDGET (page));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]