diff --git a/src/ui/gemgraph.ui b/src/ui/gemgraph.ui index 22b8dc0..31fe3e1 100644 --- a/src/ui/gemgraph.ui +++ b/src/ui/gemgraph.ui @@ -3,7 +3,7 @@ - +
diff --git a/src/ui/window.c b/src/ui/window.c index 1535a60..6192a30 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -75,6 +75,10 @@ static void gem_graph_client_window_class_init(GemGraphClientWindowClass *klass) bytes = g_bytes_new_take(contents, len); gtk_widget_class_set_template(GTK_WIDGET_CLASS(klass), bytes); + // https://docs.gtk.org/gtk4/class.Widget.html#building-composite-widgets-from-template-xml TODO Learn ! + // gtk_widget_class_bind_template_callback_full (GtkToggleButton, ui_toggle_sidebar, "clicked"); // "main_button_sidebar" + + gtk_widget_class_bind_template_child(widget_class, GemGraphClientWindow, main_titlebar); gtk_widget_class_bind_template_child(widget_class, GemGraphClientWindow, main_stack); gtk_widget_class_bind_template_child(widget_class, GemGraphClientWindow, side_stack); @@ -97,6 +101,9 @@ static void gem_graph_client_window_init(GemGraphClientWindow *self) window = self; } +// https://docs.gtk.org/gtk4/class.Widget.html#building-composite-widgets-from-template-xml +static void gtk_widget_class_dispose_template() {} // TODO ? + /* -------------------------------------------------------------------------- */ void ui_set_stack(int mode)