[gnome-builder/wip/gtk4-port: 341/343] plugins/editorui: add popover for go-to-line




commit 7263473c6bb5c3dc702b770aae668a7b65d8ac37
Author: Christian Hergert <chergert redhat com>
Date:   Sun Apr 3 18:24:18 2022 -0700

    plugins/editorui: add popover for go-to-line
    
    Not implemented yet, but at least have it here so we can add it later.

 src/plugins/editorui/gbp-editorui-workspace-addin.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/plugins/editorui/gbp-editorui-workspace-addin.c 
b/src/plugins/editorui/gbp-editorui-workspace-addin.c
index 5e2252131..50bca9ba5 100644
--- a/src/plugins/editorui/gbp-editorui-workspace-addin.c
+++ b/src/plugins/editorui/gbp-editorui-workspace-addin.c
@@ -135,6 +135,7 @@ gbp_editorui_workspace_addin_load (IdeWorkspaceAddin *addin,
                                    IdeWorkspace      *workspace)
 {
   GbpEditoruiWorkspaceAddin *self = (GbpEditoruiWorkspaceAddin *)addin;
+  GtkPopover *popover;
   GMenu *menu;
 
   IDE_ENTRY;
@@ -181,11 +182,16 @@ gbp_editorui_workspace_addin_load (IdeWorkspaceAddin *addin,
   panel_statusbar_add_suffix (self->statusbar, GTK_WIDGET (self->indentation));
 
   /* Label for cursor position and jump to line/column */
+  popover = g_object_new (IDE_TYPE_ENTRY_POPOVER,
+                          "button-text", _("Go"),
+                          "title", _("Go to Line"),
+                          NULL);
   self->position_label = g_object_new (GBP_TYPE_EDITORUI_POSITION_LABEL, NULL);
   self->position = g_object_new (GTK_TYPE_MENU_BUTTON,
                                  "direction", GTK_ARROW_UP,
                                  "visible", FALSE,
                                  "child", self->position_label,
+                                 "popover", popover,
                                  NULL);
   panel_statusbar_add_suffix (self->statusbar, GTK_WIDGET (self->position));
 


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