[gnome-builder] color-picker: wire up preferences to panel
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] color-picker: wire up preferences to panel
- Date: Wed, 19 Jul 2017 11:19:54 +0000 (UTC)
commit ef3a50d6338b3cda39e0909ed40dc7d9939d092f
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 14 19:48:34 2017 -0700
color-picker: wire up preferences to panel
.../color-picker/gb-color-picker-editor-addin.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plugins/color-picker/gb-color-picker-editor-addin.c
b/plugins/color-picker/gb-color-picker-editor-addin.c
index 7956288..ebb6ade 100644
--- a/plugins/color-picker/gb-color-picker-editor-addin.c
+++ b/plugins/color-picker/gb-color-picker-editor-addin.c
@@ -23,6 +23,7 @@
#include "gb-color-picker-editor-addin.h"
#include "gb-color-picker-editor-view-addin.h"
+#include "gb-color-picker-prefs.h"
struct _GbColorPickerEditorAddin
{
@@ -35,6 +36,13 @@ struct _GbColorPickerEditorAddin
IdeEditorPerspective *editor;
/*
+ * Out preferences to use in conjunction with the pane. This needs
+ * to be attached to the panel for the proper preferences to be
+ * shown in the sidebar widgetry.
+ */
+ GbColorPickerPrefs *prefs;
+
+ /*
* Our transient panel which we will slide into visibility when
* the current view is an IdeEditorView with the color-picker
* enabled.
@@ -251,6 +259,10 @@ gb_color_picker_editor_addin_load (IdeEditorAddin *addin,
G_CONNECT_SWAPPED);
gtk_container_add (GTK_CONTAINER (self->dock), GTK_WIDGET (self->panel));
+ self->prefs = g_object_new (GB_TYPE_COLOR_PICKER_PREFS,
+ "panel", self->panel,
+ NULL);
+
self->view_addin_signals = dzl_signal_group_new (GB_TYPE_COLOR_PICKER_EDITOR_VIEW_ADDIN);
dzl_signal_group_connect_swapped (self->view_addin_signals,
@@ -283,6 +295,8 @@ gb_color_picker_editor_addin_unload (IdeEditorAddin *addin,
if (self->panel != NULL)
gtk_widget_destroy (GTK_WIDGET (self->panel));
+ g_clear_object (&self->prefs);
+
self->editor = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]