[gnome-builder/wip/gtk4-port: 599/736] plugins/vim: show commandbar when necessary




commit f05ef598e0dfb70c20b6e295690b6d040e814faa
Author: Christian Hergert <chergert redhat com>
Date:   Sun Apr 17 10:17:58 2022 -0700

    plugins/vim: show commandbar when necessary
    
    This still needs priority sorting in libpanel.

 src/plugins/vim/gbp-vim-workspace-addin.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/vim/gbp-vim-workspace-addin.c b/src/plugins/vim/gbp-vim-workspace-addin.c
index a53bb7e52..dd6ccd38f 100644
--- a/src/plugins/vim/gbp-vim-workspace-addin.c
+++ b/src/plugins/vim/gbp-vim-workspace-addin.c
@@ -67,7 +67,6 @@ on_keybindings_changed_cb (GbpVimWorkspaceAddin *self,
   if (active != self->active)
     {
       self->active = active;
-      gtk_widget_set_visible (GTK_WIDGET (self->command_bar), active);
       g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_ACTIVE]);
     }
 }
@@ -233,7 +232,10 @@ gbp_vim_workspace_addin_set_command_bar (GbpVimWorkspaceAddin *self,
   g_return_if_fail (GBP_IS_VIM_WORKSPACE_ADDIN (self));
 
   if (self->command_bar != NULL)
-    gtk_label_set_label (self->command_bar, command_bar);
+    {
+      gtk_label_set_label (self->command_bar, command_bar);
+      gtk_widget_set_visible (GTK_WIDGET (self->command_bar), !ide_str_empty0 (command_bar));
+    }
 }
 
 gboolean


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