mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 19:07:39 +00:00
treewide: Port to libpeas-2
Closes #609 Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/746>
This commit is contained in:
parent
506a1cfc34
commit
26484766d3
21 changed files with 35 additions and 31 deletions
2
debian/control
vendored
2
debian/control
vendored
|
@ -21,7 +21,7 @@ Build-Depends:
|
|||
libgtk-3-dev,
|
||||
libgtk-3-doc <!nodoc>,
|
||||
libmm-glib-dev (>= 1.12.0),
|
||||
libpeas-dev,
|
||||
libpeas-2-dev,
|
||||
librsvg2-common,
|
||||
libsecret-1-dev,
|
||||
libsofia-sip-ua-glib-dev,
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name" : "libpeas",
|
||||
"name" : "libpeas-2",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Ddemos=false",
|
||||
|
@ -64,8 +64,8 @@
|
|||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : "https://download.gnome.org/sources/libpeas/1.34/libpeas-1.34.0.tar.xz",
|
||||
"sha256": "4305f715dab4b5ad3e8007daec316625e7065a94e63e25ef55eb1efb964a7bf0"
|
||||
"url" : "https://download.gnome.org/sources/libpeas/2.0/libpeas-2.0.3.tar.xz",
|
||||
"sha256": "39e3b507c29d2d01df1345e9b3380fd7a9d0aeb5b2e657d38e6c2bea5023e5f0"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "calls-provider.h"
|
||||
#include "calls-dummy-origin.h"
|
||||
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
#include <glib-unix.h>
|
||||
|
||||
static const char * const supported_protocols[] = {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "calls-provider.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ i18n_plugin = i18n.merge_file(
|
|||
dummy_deps = [
|
||||
dependency('gobject-2.0'),
|
||||
dependency('gtk4', version: '>= @0@'.format(gtk_version)),
|
||||
dependency('libpeas-1.0'),
|
||||
dependency('libpeas-2'),
|
||||
]
|
||||
|
||||
dummy_sources = files(
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "calls-origin.h"
|
||||
|
||||
#include <libmm-glib.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
static const char * const supported_protocols[] = {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
#include <gio/gio.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ mm_deps = [
|
|||
dependency('gtk4', version: '>= @0@'.format(gtk_version)),
|
||||
dependency('ModemManager'),
|
||||
dependency('mm-glib', version: '>= 1.12.0'),
|
||||
dependency('libpeas-1.0'),
|
||||
dependency('libpeas-2'),
|
||||
]
|
||||
|
||||
mm_sources = files(
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <libgdbofono/gdbo-modem.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
static const char * const supported_protocols[] = {
|
||||
"tel",
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
#include <gio/gio.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ i18n_plugin = i18n.merge_file(
|
|||
ofono_deps = [
|
||||
dependency('gobject-2.0'),
|
||||
dependency('gtk4', version: '>= @0@'.format(gtk_version)),
|
||||
dependency('libpeas-1.0'),
|
||||
dependency('libpeas-2'),
|
||||
]
|
||||
|
||||
ofono_sources = files(
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "calls-sip-util.h"
|
||||
#include "calls-util.h"
|
||||
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
#include <sofia-sip/nua.h>
|
||||
#include <sofia-sip/su_glib.h>
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "calls-sip-origin.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ sip_deps = [
|
|||
dependency('gstreamer-1.0'),
|
||||
dependency('gtk4'),
|
||||
dependency('libadwaita-1', version: '>= 1.4'),
|
||||
dependency('libpeas-1.0'),
|
||||
dependency('libpeas-2'),
|
||||
dependency('sofia-sip-ua-glib'),
|
||||
dependency('libsecret-1'),
|
||||
]
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <glib.h>
|
||||
#include <gst/gst.h>
|
||||
#include <sofia-sip/su_uniqueid.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
typedef struct {
|
||||
CallsSipProvider *provider;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "enum-types.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
#define LIBFEEDBACK_USE_UNSTABLE_API
|
||||
#include <libfeedback.h>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "calls-plugin-manager.h"
|
||||
#include "calls-util.h"
|
||||
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
/**
|
||||
* SECTION:plugin-manager
|
||||
|
@ -217,6 +217,7 @@ calls_plugin_manager_init (CallsPluginManager *self)
|
|||
{
|
||||
g_autofree char *default_plugin_dir_provider = NULL;
|
||||
const char *dir;
|
||||
uint n_plugins;
|
||||
|
||||
self->plugin_engine = peas_engine_new ();
|
||||
|
||||
|
@ -228,7 +229,7 @@ calls_plugin_manager_init (CallsPluginManager *self)
|
|||
|
||||
if (g_file_test (plugin_dir_provider, G_FILE_TEST_EXISTS)) {
|
||||
g_debug ("Adding '%s' to plugin search path", plugin_dir_provider);
|
||||
peas_engine_prepend_search_path (self->plugin_engine, plugin_dir_provider, NULL);
|
||||
peas_engine_add_search_path (self->plugin_engine, plugin_dir_provider, NULL);
|
||||
} else {
|
||||
g_warning ("Not adding '%s' to plugin search path, because the directory doesn't exist.\n"
|
||||
"Check if env CALLS_PLUGIN_DIR is set correctly", plugin_dir_provider);
|
||||
|
@ -245,8 +246,11 @@ calls_plugin_manager_init (CallsPluginManager *self)
|
|||
|
||||
self->providers = g_list_store_new (CALLS_TYPE_PROVIDER);
|
||||
|
||||
for (const GList *node = peas_engine_get_plugin_list (self->plugin_engine); node; node = node->next) {
|
||||
PeasPluginInfo *info = node->data;
|
||||
n_plugins = g_list_model_get_n_items (G_LIST_MODEL (self->plugin_engine));
|
||||
|
||||
for (uint i = 0; i < n_plugins; i++) {
|
||||
g_autoptr (PeasPluginInfo) info =
|
||||
g_list_model_get_item (G_LIST_MODEL (self->plugin_engine), i);
|
||||
CallsPlugin *plugin = calls_plugin_new (info);
|
||||
|
||||
g_debug ("Created plugin '%s', found in '%s'",
|
||||
|
|
|
@ -67,7 +67,7 @@ calls_plugin_set_property (GObject *object,
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_PLUGIN_INFO:
|
||||
self->info = g_value_get_boxed (value);
|
||||
self->info = g_value_get_object (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -146,7 +146,7 @@ calls_plugin_class_init (CallsPluginClass *klass)
|
|||
* The #PeasPluginInfo containing information about the plugin
|
||||
*/
|
||||
props[PROP_PLUGIN_INFO] =
|
||||
g_param_spec_boxed ("plugin-info",
|
||||
g_param_spec_object ("plugin-info",
|
||||
"",
|
||||
"",
|
||||
PEAS_TYPE_PLUGIN_INFO,
|
||||
|
@ -264,7 +264,7 @@ calls_plugin_load (CallsPlugin *self,
|
|||
GError **error)
|
||||
{
|
||||
PeasEngine *peas = peas_engine_get_default ();
|
||||
PeasExtension *extension;
|
||||
GObject *extension;
|
||||
|
||||
g_return_val_if_fail (CALLS_IS_PLUGIN (self), FALSE);
|
||||
|
||||
|
@ -384,7 +384,7 @@ calls_plugin_get_description (CallsPlugin *self)
|
|||
}
|
||||
|
||||
|
||||
const char **
|
||||
const char * const *
|
||||
calls_plugin_get_authors (CallsPlugin *self)
|
||||
{
|
||||
g_return_val_if_fail (CALLS_IS_PLUGIN (self), NULL);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "calls-provider.h"
|
||||
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -44,7 +44,7 @@ CallsProvider *calls_plugin_get_provider (CallsPlugin *self);
|
|||
const char *calls_plugin_get_module_name (CallsPlugin *self);
|
||||
const char *calls_plugin_get_name (CallsPlugin *self);
|
||||
const char *calls_plugin_get_description (CallsPlugin *self);
|
||||
const char **calls_plugin_get_authors (CallsPlugin *self);
|
||||
const char* const *calls_plugin_get_authors (CallsPlugin *self);
|
||||
const char *calls_plugin_get_copyright (CallsPlugin *self);
|
||||
const char *calls_plugin_get_version (CallsPlugin *self);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "calls-util.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <libpeas/peas.h>
|
||||
#include <libpeas.h>
|
||||
|
||||
/**
|
||||
* SECTION:calls-provider
|
||||
|
|
|
@ -29,11 +29,11 @@ subdir('dbus')
|
|||
src_include = include_directories('.')
|
||||
calls_includes = [ top_include, src_include ]
|
||||
|
||||
calls_deps = [ dependency('gobject-2.0', version: '>= 2.58'),
|
||||
calls_deps = [ dependency('gobject-2.0', version: '>= 2.74'),
|
||||
dependency('gtk4', version: '>= @0@'.format(gtk_version)),
|
||||
dependency('libadwaita-1', version: '>= 1.4'),
|
||||
dependency('libfeedback-0.0'),
|
||||
dependency('libpeas-1.0'),
|
||||
dependency('libpeas-2'),
|
||||
dependency('gom-1.0'),
|
||||
dependency('libebook-contacts-1.2'),
|
||||
dependency('folks'),
|
||||
|
|
Loading…
Reference in a new issue