[gnome-builder] libide/tweaks: add constructor for IdeTweaksPanel



commit 5c2387f6d996c6c3b63853506ea22f9be00422f4
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 2 22:28:50 2022 -0700

    libide/tweaks: add constructor for IdeTweaksPanel

 src/libide/tweaks/ide-tweaks-panel-private.h |  1 +
 src/libide/tweaks/ide-tweaks-panel.c         | 10 ++++++++++
 2 files changed, 11 insertions(+)
---
diff --git a/src/libide/tweaks/ide-tweaks-panel-private.h b/src/libide/tweaks/ide-tweaks-panel-private.h
index 5998bee4b..d931e7662 100644
--- a/src/libide/tweaks/ide-tweaks-panel-private.h
+++ b/src/libide/tweaks/ide-tweaks-panel-private.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
 
 G_DECLARE_FINAL_TYPE (IdeTweaksPanel, ide_tweaks_panel, IDE, TWEAKS_PANEL, AdwBin)
 
+GtkWidget     *ide_tweaks_panel_new        (IdeTweaksPage  *page);
 IdeTweaksPage *ide_tweaks_panel_get_page   (IdeTweaksPanel *self);
 gboolean       ide_tweaks_panel_get_folded (IdeTweaksPanel *self);
 
diff --git a/src/libide/tweaks/ide-tweaks-panel.c b/src/libide/tweaks/ide-tweaks-panel.c
index b5b9b08b4..06516206d 100644
--- a/src/libide/tweaks/ide-tweaks-panel.c
+++ b/src/libide/tweaks/ide-tweaks-panel.c
@@ -126,6 +126,16 @@ ide_tweaks_panel_init (IdeTweaksPanel *self)
   gtk_widget_init_template (GTK_WIDGET (self));
 }
 
+GtkWidget *
+ide_tweaks_panel_new (IdeTweaksPage *page)
+{
+  g_return_val_if_fail (IDE_IS_TWEAKS_PAGE (page), NULL);
+
+  return g_object_new (IDE_TYPE_TWEAKS_PANEL,
+                       "page", page,
+                       NULL);
+}
+
 IdeTweaksPage *
 ide_tweaks_panel_get_page (IdeTweaksPanel *self)
 {


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