[gnome-builder/wip/gtk4-port] libpanel: track changes to statusbar API
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libpanel: track changes to statusbar API
- Date: Sun, 17 Apr 2022 17:45:04 +0000 (UTC)
commit 8111ab55b2697e2c12731966f282381e42cee1e8
Author: Christian Hergert <chergert redhat com>
Date: Sun Apr 17 10:44:59 2022 -0700
libpanel: track changes to statusbar API
src/plugins/editorui/gbp-editorui-workspace-addin.c | 10 +++++-----
src/plugins/vcsui/gbp-vcsui-workspace-addin.c | 2 +-
src/plugins/vim/gbp-vim-workspace-addin.c | 5 ++---
3 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/editorui/gbp-editorui-workspace-addin.c
b/src/plugins/editorui/gbp-editorui-workspace-addin.c
index d10226377..810ee6887 100644
--- a/src/plugins/editorui/gbp-editorui-workspace-addin.c
+++ b/src/plugins/editorui/gbp-editorui-workspace-addin.c
@@ -343,7 +343,7 @@ gbp_editorui_workspace_addin_load (IdeWorkspaceAddin *addin,
"visible", FALSE,
"child", self->encoding_label,
NULL);
- panel_statusbar_add_suffix (self->statusbar, GTK_WIDGET (self->encoding));
+ panel_statusbar_add_suffix (self->statusbar, 1000, GTK_WIDGET (self->encoding));
/* Line ending */
menu = ide_application_get_menu_by_id (IDE_APPLICATION_DEFAULT, "editorui-line-ends-menu");
@@ -356,14 +356,14 @@ gbp_editorui_workspace_addin_load (IdeWorkspaceAddin *addin,
"visible", FALSE,
"child", self->line_ends_label,
NULL);
- panel_statusbar_add_suffix (self->statusbar, GTK_WIDGET (self->line_ends));
+ panel_statusbar_add_suffix (self->statusbar, 1001, GTK_WIDGET (self->line_ends));
self->mode_label = g_object_new (GTK_TYPE_LABEL,
"label", "INS",
"width-chars", 4,
"visible", FALSE,
NULL);
- panel_statusbar_add_suffix (self->statusbar, GTK_WIDGET (self->mode_label));
+ panel_statusbar_add_suffix (self->statusbar, 1002, GTK_WIDGET (self->mode_label));
/* Indentation status, tabs/spaces/etc */
menu = ide_application_get_menu_by_id (IDE_APPLICATION_DEFAULT, "editorui-indent-menu");
@@ -374,7 +374,7 @@ gbp_editorui_workspace_addin_load (IdeWorkspaceAddin *addin,
"visible", FALSE,
"child", self->indentation_label,
NULL);
- panel_statusbar_add_suffix (self->statusbar, GTK_WIDGET (self->indentation));
+ panel_statusbar_add_suffix (self->statusbar, 1003, GTK_WIDGET (self->indentation));
/* Label for cursor position and jump to line/column */
popover = g_object_new (IDE_TYPE_ENTRY_POPOVER,
@@ -388,7 +388,7 @@ gbp_editorui_workspace_addin_load (IdeWorkspaceAddin *addin,
"child", self->position_label,
"popover", popover,
NULL);
- panel_statusbar_add_suffix (self->statusbar, GTK_WIDGET (self->position));
+ panel_statusbar_add_suffix (self->statusbar, 1004, GTK_WIDGET (self->position));
IDE_EXIT;
}
diff --git a/src/plugins/vcsui/gbp-vcsui-workspace-addin.c b/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
index 0037588ea..997b50500 100644
--- a/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
+++ b/src/plugins/vcsui/gbp-vcsui-workspace-addin.c
@@ -103,7 +103,7 @@ gbp_vcsui_workspace_addin_load (IdeWorkspaceAddin *addin,
"direction", GTK_ARROW_UP,
"popover", popover,
NULL);
- panel_statusbar_add_prefix (statusbar, GTK_WIDGET (self->branch_button));
+ panel_statusbar_add_prefix (statusbar, G_MININT, GTK_WIDGET (self->branch_button));
self->vcs_bindings = ide_binding_group_new ();
ide_binding_group_bind (self->vcs_bindings, "branch-name",
diff --git a/src/plugins/vim/gbp-vim-workspace-addin.c b/src/plugins/vim/gbp-vim-workspace-addin.c
index dd6ccd38f..9dbc57456 100644
--- a/src/plugins/vim/gbp-vim-workspace-addin.c
+++ b/src/plugins/vim/gbp-vim-workspace-addin.c
@@ -117,9 +117,8 @@ gbp_vim_workspace_addin_load (IdeWorkspaceAddin *addin,
statusbar = ide_workspace_get_statusbar (workspace);
- /* TODO: priorities for packing */
- panel_statusbar_add_prefix (statusbar, GTK_WIDGET (self->command_bar));
- panel_statusbar_add_prefix (statusbar, GTK_WIDGET (self->command));
+ panel_statusbar_add_prefix (statusbar, 10000, GTK_WIDGET (self->command_bar));
+ panel_statusbar_add_suffix (statusbar, 10000, GTK_WIDGET (self->command));
pango_attr_list_unref (attrs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]