[gnome-builder] libide/tweaks: stub out some more of panel list



commit 2622a0dbb6f70840136cd64eda289b9d31aee831
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 2 10:42:31 2022 -0700

    libide/tweaks: stub out some more of panel list

 src/libide/tweaks/ide-tweaks-panel-list-private.h |  6 +++++-
 src/libide/tweaks/ide-tweaks-panel-list.c         | 13 ++++++++++++-
 src/libide/tweaks/ide-tweaks-window.c             |  7 +++++--
 3 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/tweaks/ide-tweaks-panel-list-private.h 
b/src/libide/tweaks/ide-tweaks-panel-list-private.h
index a7cef389a..c21cc26ef 100644
--- a/src/libide/tweaks/ide-tweaks-panel-list-private.h
+++ b/src/libide/tweaks/ide-tweaks-panel-list-private.h
@@ -22,12 +22,16 @@
 
 #include <adwaita.h>
 
+#include "ide-tweaks-item.h"
+
 G_BEGIN_DECLS
 
 #define IDE_TYPE_TWEAKS_PANEL_LIST (ide_tweaks_panel_list_get_type())
 
 G_DECLARE_FINAL_TYPE (IdeTweaksPanelList, ide_tweaks_panel_list, IDE, TWEAKS_PANEL_LIST, AdwBin)
 
-GtkWidget *ide_tweaks_panel_list_new (void);
+GtkWidget *ide_tweaks_panel_list_new      (void);
+void       ide_tweaks_panel_list_set_item (IdeTweaksPanelList *self,
+                                           IdeTweaksItem      *item);
 
 G_END_DECLS
diff --git a/src/libide/tweaks/ide-tweaks-panel-list.c b/src/libide/tweaks/ide-tweaks-panel-list.c
index f024809d2..99452e745 100644
--- a/src/libide/tweaks/ide-tweaks-panel-list.c
+++ b/src/libide/tweaks/ide-tweaks-panel-list.c
@@ -26,7 +26,8 @@
 
 struct _IdeTweaksPanelList
 {
-  AdwBin parent_instance;
+  AdwBin    parent_instance;
+  GtkStack *stack;
 };
 
 enum {
@@ -87,6 +88,7 @@ ide_tweaks_panel_list_class_init (IdeTweaksPanelListClass *klass)
   object_class->set_property = ide_tweaks_panel_list_set_property;
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/libide-tweaks/ide-tweaks-panel-list.ui");
+  gtk_widget_class_bind_template_child (widget_class, IdeTweaksPanelList, stack);
 }
 
 static void
@@ -100,3 +102,12 @@ ide_tweaks_panel_list_new (void)
 {
   return g_object_new (IDE_TYPE_TWEAKS_PANEL_LIST, NULL);
 }
+
+void
+ide_tweaks_panel_list_set_item (IdeTweaksPanelList *self,
+                                IdeTweaksItem      *item)
+{
+  g_return_if_fail (IDE_IS_TWEAKS_PANEL_LIST (self));
+  g_return_if_fail (IDE_IS_TWEAKS_ITEM (item));
+
+}
diff --git a/src/libide/tweaks/ide-tweaks-window.c b/src/libide/tweaks/ide-tweaks-window.c
index c943d2f96..6c4ee615d 100644
--- a/src/libide/tweaks/ide-tweaks-window.c
+++ b/src/libide/tweaks/ide-tweaks-window.c
@@ -28,8 +28,9 @@
 
 struct _IdeTweaksWindow
 {
-  AdwWindow  parent_instance;
-  IdeTweaks *tweaks;
+  AdwWindow           parent_instance;
+  IdeTweaks          *tweaks;
+  IdeTweaksPanelList *list;
 };
 
 enum {
@@ -108,6 +109,7 @@ ide_tweaks_window_class_init (IdeTweaksWindowClass *klass)
   g_object_class_install_properties (object_class, N_PROPS, properties);
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/libide-tweaks/ide-tweaks-window.ui");
+  gtk_widget_class_bind_template_child (widget_class, IdeTweaksWindow, list);
 
   g_type_ensure (IDE_TYPE_TWEAKS_PANEL);
   g_type_ensure (IDE_TYPE_TWEAKS_PANEL_LIST);
@@ -185,4 +187,5 @@ ide_tweaks_window_navigate_to (IdeTweaksWindow *self,
   if (item == NULL)
     return;
 
+  ide_tweaks_panel_list_set_item (self->list, item);
 }


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