[gnome-builder/wip/gtk4-port: 133/736] libide/gui: use IdePreferencesWindow for preferences addin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 133/736] libide/gui: use IdePreferencesWindow for preferences addin
- Date: Tue, 26 Apr 2022 01:46:16 +0000 (UTC)
commit b05470385a88434ec4efa0befe1659c4c4c683c9
Author: Christian Hergert <chergert redhat com>
Date: Mon Mar 28 17:40:37 2022 -0700
libide/gui: use IdePreferencesWindow for preferences addin
src/libide/gui/ide-preferences-addin.c | 18 +++++-------------
src/libide/gui/ide-preferences-addin.h | 26 ++++++++++++++------------
2 files changed, 19 insertions(+), 25 deletions(-)
---
diff --git a/src/libide/gui/ide-preferences-addin.c b/src/libide/gui/ide-preferences-addin.c
index eef7dd6c2..58b2407cb 100644
--- a/src/libide/gui/ide-preferences-addin.c
+++ b/src/libide/gui/ide-preferences-addin.c
@@ -38,17 +38,11 @@ ide_preferences_addin_default_init (IdePreferencesAddinInterface *iface)
*
* This interface method is called when a preferences addin is initialized. It
* could be initialized from multiple preferences implementations, so consumers
- * should use the #DzlPreferences interface to add their preferences controls
- * to the container.
- *
- * Such implementations might include a preferences dialog window, or a
- * preferences widget which could be rendered as a perspective.
- *
- * Since: 3.32
+ * should use the #IdePreferencesWindow to add their preferences controls.
*/
void
-ide_preferences_addin_load (IdePreferencesAddin *self,
- DzlPreferences *preferences)
+ide_preferences_addin_load (IdePreferencesAddin *self,
+ IdePreferencesWindow *preferences)
{
g_return_if_fail (IDE_IS_PREFERENCES_ADDIN (self));
g_return_if_fail (DZL_IS_PREFERENCES (preferences));
@@ -65,12 +59,10 @@ ide_preferences_addin_load (IdePreferencesAddin *self,
* This interface method is called when the preferences addin should remove all
* controls added to @preferences. This could happen during desctruction of
* @preferences, or when the plugin is unloaded.
- *
- * Since: 3.32
*/
void
-ide_preferences_addin_unload (IdePreferencesAddin *self,
- DzlPreferences *preferences)
+ide_preferences_addin_unload (IdePreferencesAddin *self,
+ IdePreferencesWindow *preferences)
{
g_return_if_fail (IDE_IS_PREFERENCES_ADDIN (self));
g_return_if_fail (DZL_IS_PREFERENCES (preferences));
diff --git a/src/libide/gui/ide-preferences-addin.h b/src/libide/gui/ide-preferences-addin.h
index 70fa8f098..6ff747220 100644
--- a/src/libide/gui/ide-preferences-addin.h
+++ b/src/libide/gui/ide-preferences-addin.h
@@ -20,7 +20,9 @@
#pragma once
-#include <dazzle.h>
+#if !defined (IDE_GUI_INSIDE) && !defined (IDE_GUI_COMPILATION)
+# error "Only <libide-gui.h> can be included directly."
+#endif
#include <libide-core.h>
@@ -28,24 +30,24 @@ G_BEGIN_DECLS
#define IDE_TYPE_PREFERENCES_ADDIN (ide_preferences_addin_get_type())
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE (IdePreferencesAddin, ide_preferences_addin, IDE, PREFERENCES_ADDIN, GObject)
struct _IdePreferencesAddinInterface
{
GTypeInterface parent_interface;
- void (*load) (IdePreferencesAddin *self,
- DzlPreferences *preferences);
- void (*unload) (IdePreferencesAddin *self,
- DzlPreferences *preferences);
+ void (*load) (IdePreferencesAddin *self,
+ IdePreferencesWindow *preferences);
+ void (*unload) (IdePreferencesAddin *self,
+ IdePreferencesWindow *preferences);
};
-IDE_AVAILABLE_IN_3_32
-void ide_preferences_addin_load (IdePreferencesAddin *self,
- DzlPreferences *preferences);
-IDE_AVAILABLE_IN_3_32
-void ide_preferences_addin_unload (IdePreferencesAddin *self,
- DzlPreferences *preferences);
+IDE_AVAILABLE_IN_ALL
+void ide_preferences_addin_load (IdePreferencesAddin *self,
+ IdePreferencesWindow *preferences);
+IDE_AVAILABLE_IN_ALL
+void ide_preferences_addin_unload (IdePreferencesAddin *self,
+ IdePreferencesWindow *preferences);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]