[gnome-builder] libide/tweaks: ensure type availability
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/tweaks: ensure type availability
- Date: Sat, 30 Jul 2022 00:20:40 +0000 (UTC)
commit 1a1629842db9045144ae2d587363b2cb1f6ff272
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 29 17:19:25 2022 -0700
libide/tweaks: ensure type availability
src/libide/tweaks/ide-tweaks-init.c | 34 ++++++++++++++++++++++++++++++++++
src/libide/tweaks/ide-tweaks-init.h | 29 +++++++++++++++++++++++++++++
src/libide/tweaks/meson.build | 1 +
src/main.c | 22 ++++++++++++++--------
src/meson.build | 1 +
5 files changed, 79 insertions(+), 8 deletions(-)
---
diff --git a/src/libide/tweaks/ide-tweaks-init.c b/src/libide/tweaks/ide-tweaks-init.c
new file mode 100644
index 000000000..0b63d9a47
--- /dev/null
+++ b/src/libide/tweaks/ide-tweaks-init.c
@@ -0,0 +1,34 @@
+/* ide-tweaks-init.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "ide-tweaks-init"
+
+#include "config.h"
+
+#include "libide-tweaks.h"
+
+#include "ide-tweaks-init.h"
+
+void
+_ide_tweaks_init (void)
+{
+ g_type_ensure (IDE_TYPE_TWEAKS_ITEM);
+ g_type_ensure (IDE_TYPE_TWEAKS_PAGE);
+}
diff --git a/src/libide/tweaks/ide-tweaks-init.h b/src/libide/tweaks/ide-tweaks-init.h
new file mode 100644
index 000000000..fc6ee65e3
--- /dev/null
+++ b/src/libide/tweaks/ide-tweaks-init.h
@@ -0,0 +1,29 @@
+/* ide-tweaks-init.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+void _ide_tweaks_init (void);
+
+G_END_DECLS
diff --git a/src/libide/tweaks/meson.build b/src/libide/tweaks/meson.build
index 648161830..03c5b0e74 100644
--- a/src/libide/tweaks/meson.build
+++ b/src/libide/tweaks/meson.build
@@ -24,6 +24,7 @@ libide_tweaks_public_sources = [
]
libide_tweaks_private_sources = [
+ 'ide-tweaks-init.c',
]
#
diff --git a/src/main.c b/src/main.c
index 771610f6c..6f2495bcd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,20 +22,24 @@
#include "config.h"
-#include <girepository.h>
+#include <locale.h>
+#include <sched.h>
+#include <stdlib.h>
+#include <unistd.h>
+
#include <glib/gi18n.h>
+
+#include <girepository.h>
#include <gtksourceview/gtksource.h>
+
+#ifdef ENABLE_TRACING_SYSCAP
+# include <sysprof-capture.h>
+#endif
+
#include <libide-core.h>
#include <libide-code.h>
#include <libide-gui.h>
#include <libide-threading.h>
-#include <locale.h>
-#ifdef ENABLE_TRACING_SYSCAP
-# include <sysprof-capture.h>
-#endif
-#include <sched.h>
-#include <stdlib.h>
-#include <unistd.h>
#include "ide-application-private.h"
#include "ide-build-ident.h"
@@ -46,6 +50,7 @@
#include "ide-shell-private.h"
#include "ide-terminal-private.h"
#include "ide-thread-private.h"
+#include "ide-tweaks-init.h"
#include "ide-private.h"
#include "bug-buddy.h"
@@ -297,6 +302,7 @@ main (gint argc,
_ide_guess_user_path ();
/* Ensure availability of some symbols possibly dropped in link */
+ _ide_tweaks_init ();
_ide_gtk_init ();
_ide_search_init ();
_ide_editor_init ();
diff --git a/src/meson.build b/src/meson.build
index c9a44e418..ce66a21e4 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -73,6 +73,7 @@ gnome_builder_deps = [
libide_sourceview_dep,
libide_terminal_dep,
libide_threading_dep,
+ libide_tweaks_dep,
libide_vcs_dep,
libide_tree_dep,
]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]