[gnome-builder] terminal: clear placeholder for terminal grids
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] terminal: clear placeholder for terminal grids
- Date: Sat, 27 Apr 2019 18:57:12 +0000 (UTC)
commit 84ef89e2b7b3e0cc8974132a2f581448df0e1514
Author: Christian Hergert <chergert redhat com>
Date: Sat Apr 27 11:56:39 2019 -0700
terminal: clear placeholder for terminal grids
We can add something eventually, but empty is fine for now.
src/libide/terminal/ide-terminal-surface.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
---
diff --git a/src/libide/terminal/ide-terminal-surface.c b/src/libide/terminal/ide-terminal-surface.c
index fca73db83..c85363a8b 100644
--- a/src/libide/terminal/ide-terminal-surface.c
+++ b/src/libide/terminal/ide-terminal-surface.c
@@ -49,6 +49,24 @@ ide_terminal_surface_new (void)
return g_object_new (IDE_TYPE_TERMINAL_SURFACE, NULL);
}
+static IdeFrame *
+ide_terminal_surface_create_frame_cb (IdeTerminalSurface *self,
+ IdeGrid *grid)
+{
+ IdeFrame *frame;
+
+ g_assert (IDE_IS_TERMINAL_SURFACE (self));
+ g_assert (IDE_IS_GRID (grid));
+
+ frame = g_object_new (IDE_TYPE_FRAME,
+ "expand", TRUE,
+ "visible", TRUE,
+ NULL);
+ ide_frame_set_placeholder (frame, gtk_label_new (NULL));
+
+ return frame;
+}
+
static void
ide_terminal_surface_add (GtkContainer *container,
GtkWidget *child)
@@ -81,4 +99,10 @@ ide_terminal_surface_init (IdeTerminalSurface *self)
gtk_widget_init_template (GTK_WIDGET (self));
gtk_widget_set_name (GTK_WIDGET (self), "terminal");
+
+ g_signal_connect_object (self->grid,
+ "create-frame",
+ G_CALLBACK (ide_terminal_surface_create_frame_cb),
+ self,
+ G_CONNECT_SWAPPED);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]