Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Build-Depends: debhelper-compat (= 12),
libx11-dev,
libxml2-dev,
python3,
python-gi-dev,
yelp-tools,
meson
Standards-Version: 4.5.0
Expand Down
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ pango = dependency('pango')

if gir_dep.found()
xed_conf.set('ENABLE_INTROSPECTION', 1)
pygobject_dep = dependency('pygobject-3.0')
pygobject_version = pygobject_dep.version().split('.')
xed_conf.set('PYGOBJECT_MAJOR_VERSION', pygobject_version[0])
xed_conf.set('PYGOBJECT_MINOR_VERSION', pygobject_version[1])
endif

enable_spell = get_option('enable_spell')
Expand Down
8 changes: 8 additions & 0 deletions xed/xed-app.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@
#include <gtksourceview/gtksource.h>

#ifdef ENABLE_INTROSPECTION
#if PYGOBJECT_MAJOR_VERSION > 3 || (PYGOBJECT_MAJOR_VERSION == 3 && PYGOBJECT_MINOR_VERSION > 50)
#include <girepository/girepository.h>
#else
#include <girepository.h>
#endif
#endif

#include "xed-app.h"
#include "xed-commands.h"
Expand Down Expand Up @@ -191,16 +195,16 @@
static void
extension_added (PeasExtensionSet *extensions,
PeasPluginInfo *info,
PeasExtension *exten,

Check failure on line 198 in xed/xed-app.c

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22-amd64, Mint 22, true) / Mint 22

exten ==> extend, extent
XedApp *app)
{
peas_extension_call (exten, "activate");

Check failure on line 201 in xed/xed-app.c

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22-amd64, Mint 22, true) / Mint 22

exten ==> extend, extent
}

static void
extension_removed (PeasExtensionSet *extensions,
PeasPluginInfo *info,
PeasExtension *exten,

Check failure on line 207 in xed/xed-app.c

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22-amd64, Mint 22, true) / Mint 22

exten ==> extend, extent
XedApp *app)
{
peas_extension_call (exten, "deactivate");
Expand Down Expand Up @@ -992,7 +996,11 @@
g_application_add_main_option_entries (G_APPLICATION (app), options);

#ifdef ENABLE_INTROSPECTION
#if PYGOBJECT_MAJOR_VERSION > 3 || (PYGOBJECT_MAJOR_VERSION == 3 && PYGOBJECT_MINOR_VERSION > 50)
g_application_add_option_group (G_APPLICATION (app), gi_repository_get_option_group ());
#else
g_application_add_option_group (G_APPLICATION (app), g_irepository_get_option_group ());
#endif
#endif

setup_actions (app);
Expand Down
16 changes: 16 additions & 0 deletions xed/xed-plugins-engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
#include <config.h>
#include <string.h>
#include <glib/gi18n.h>
#if PYGOBJECT_MAJOR_VERSION > 3 || (PYGOBJECT_MAJOR_VERSION == 3 && PYGOBJECT_MINOR_VERSION > 50)
#include <girepository/girepository.h>
#else
#include <girepository.h>
#endif

#include "xed-plugins-engine.h"
#include "xed-debug.h"
Expand Down Expand Up @@ -66,7 +70,11 @@ xed_plugins_engine_init (XedPluginsEngine *engine)

typelib_dir = g_build_filename (xed_dirs_get_xed_lib_dir (), "girepository-1.0", NULL);

#if PYGOBJECT_MAJOR_VERSION > 3 || (PYGOBJECT_MAJOR_VERSION == 3 && PYGOBJECT_MINOR_VERSION > 50)
if (!gi_repository_require_private (gi_repository_dup_default (), typelib_dir, "Xed", "1.0", 0, &error))
#else
if (!g_irepository_require_private (g_irepository_get_default (), typelib_dir, "Xed", "1.0", 0, &error))
#endif
{
g_warning ("Could not load Xed repository: %s", error->message);
g_error_free (error);
Expand All @@ -76,14 +84,22 @@ xed_plugins_engine_init (XedPluginsEngine *engine)
g_free (typelib_dir);

/* This should be moved to libpeas */
#if PYGOBJECT_MAJOR_VERSION > 3 || (PYGOBJECT_MAJOR_VERSION == 3 && PYGOBJECT_MINOR_VERSION > 50)
if (!gi_repository_require (gi_repository_dup_default (), "Peas", "1.0", 0, &error))
#else
if (!g_irepository_require (g_irepository_get_default (), "Peas", "1.0", 0, &error))
#endif
{
g_warning ("Could not load Peas repository: %s", error->message);
g_error_free (error);
error = NULL;
}

#if PYGOBJECT_MAJOR_VERSION > 3 || (PYGOBJECT_MAJOR_VERSION == 3 && PYGOBJECT_MINOR_VERSION > 50)
if (!gi_repository_require (gi_repository_dup_default (), "PeasGtk", "1.0", 0, &error))
#else
if (!g_irepository_require (g_irepository_get_default (), "PeasGtk", "1.0", 0, &error))
#endif
{
g_warning ("Could not load PeasGtk repository: %s", error->message);
g_error_free (error);
Expand Down
Loading