[gnome-builder] terminal: set default title for omnibar
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] terminal: set default title for omnibar
- Date: Mon, 29 Apr 2019 21:59:57 +0000 (UTC)
commit e3422acbb61fe9f00b6d560b34107e4581dee3a3
Author: Christian Hergert <chergert redhat com>
Date: Mon Apr 29 14:59:44 2019 -0700
terminal: set default title for omnibar
src/libide/terminal/ide-terminal-workspace.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/terminal/ide-terminal-workspace.c b/src/libide/terminal/ide-terminal-workspace.c
index 99ed55df6..f819c47cf 100644
--- a/src/libide/terminal/ide-terminal-workspace.c
+++ b/src/libide/terminal/ide-terminal-workspace.c
@@ -47,11 +47,20 @@ ide_terminal_workspace_context_set_cb (GtkWidget *widget,
if (ide_context_has_project (context))
{
- GtkWidget *bar;
+ GtkWidget *bar = ide_omni_bar_new ();
+ GtkWidget *label = gtk_label_new (NULL);
- bar = ide_omni_bar_new ();
+ bar = g_object_new (IDE_TYPE_OMNI_BAR,
+ "visible", TRUE,
+ NULL);
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (self->header_bar), GTK_WIDGET (bar));
- gtk_widget_show (bar);
+
+ label = g_object_new (GTK_TYPE_LABEL,
+ "visible", TRUE,
+ "xalign", 0.0f,
+ NULL);
+ g_object_bind_property (context, "title", label, "label", G_BINDING_SYNC_CREATE);
+ ide_omni_bar_set_placeholder (IDE_OMNI_BAR (bar), label);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]