[eog] More fixes to work with libpeas-0.7
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] More fixes to work with libpeas-0.7
- Date: Sun, 2 Jan 2011 23:42:39 +0000 (UTC)
commit 40bedbf33812e65f4a8e79691b1fadfaace94035
Author: Felix Riemann <friemann gnome org>
Date: Sun Jan 2 21:51:03 2011 +0100
More fixes to work with libpeas-0.7
- Plugin keyfile extension and content was simplified
- Remove unneeded and broken libpeasui includes
- Search paths are no longer a constructor property
https://bugzilla.gnome.org/show_bug.cgi?id=626091
plugins/Makefile.am | 10 ++++----
...gin.desktop.in => fullscreen.plugin.desktop.in} | 2 +-
plugins/reload/eog-reload-plugin.c | 1 -
...-plugin.desktop.in => reload.plugin.desktop.in} | 2 +-
plugins/statusbar-date/eog-statusbar-date-plugin.c | 1 -
...desktop.in => statusbar-date.plugin.desktop.in} | 3 +-
src/eog-plugin-engine.c | 22 ++++++++++----------
7 files changed, 19 insertions(+), 22 deletions(-)
---
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index f2461e3..70a0bc1 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -15,8 +15,8 @@ plugins_LTLIBRARIES = \
reload/libreload.la
plugins_in_files = \
- fullscreen/fullscreen.eog-plugin.desktop.in \
- reload/reload.eog-plugin.desktop.in
+ fullscreen/fullscreen.plugin.desktop.in \
+ reload/reload.plugin.desktop.in
# Fullscreen plugin
fullscreen_libfullscreen_la_SOURCES = \
@@ -41,14 +41,14 @@ statusbar_date_libstatusbar_date_la_SOURCES = \
statusbar-date/eog-statusbar-date-plugin.c
statusbar_date_libstatusbar_date_la_LIBADD = $(EOG_LIBS)
-plugins_in_files += statusbar-date/statusbar-date.eog-plugin.desktop.in
+plugins_in_files += statusbar-date/statusbar-date.plugin.desktop.in
endif
# Generate plugin info files
-%.eog-plugin: %.eog-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(AM_V_GEN)$(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(AM_V_GEN)$(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-plugins_DATA = $(plugins_in_files:.eog-plugin.desktop.in=.eog-plugin)
+plugins_DATA = $(plugins_in_files:.plugin.desktop.in=.plugin)
DISTCLEANFILES = $(plugins_DATA)
CLEANFILES = $(plugins_DATA)
diff --git a/plugins/fullscreen/fullscreen.eog-plugin.desktop.in b/plugins/fullscreen/fullscreen.plugin.desktop.in
similarity index 95%
rename from plugins/fullscreen/fullscreen.eog-plugin.desktop.in
rename to plugins/fullscreen/fullscreen.plugin.desktop.in
index 057f669..4426e4b 100644
--- a/plugins/fullscreen/fullscreen.eog-plugin.desktop.in
+++ b/plugins/fullscreen/fullscreen.plugin.desktop.in
@@ -1,4 +1,4 @@
-[Eog Plugin]
+[Plugin]
Module=fullscreen
IAge=2
_Name=Fullscreen with double-click
diff --git a/plugins/reload/eog-reload-plugin.c b/plugins/reload/eog-reload-plugin.c
index 88e3ed4..4b099f0 100644
--- a/plugins/reload/eog-reload-plugin.c
+++ b/plugins/reload/eog-reload-plugin.c
@@ -8,7 +8,6 @@
#include <glib/gi18n-lib.h>
#include <libpeas/peas.h>
-#include <libpeasui/peas-ui.h>
#include <eog-debug.h>
#include <eog-scroll-view.h>
diff --git a/plugins/reload/reload.eog-plugin.desktop.in b/plugins/reload/reload.plugin.desktop.in
similarity index 94%
rename from plugins/reload/reload.eog-plugin.desktop.in
rename to plugins/reload/reload.plugin.desktop.in
index 2ddf5e7..7fb9fc5 100644
--- a/plugins/reload/reload.eog-plugin.desktop.in
+++ b/plugins/reload/reload.plugin.desktop.in
@@ -1,4 +1,4 @@
-[Eog Plugin]
+[Plugin]
Module=reload
IAge=2
_Name=Reload Image
diff --git a/plugins/statusbar-date/eog-statusbar-date-plugin.c b/plugins/statusbar-date/eog-statusbar-date-plugin.c
index a253ca4..de72d07 100644
--- a/plugins/statusbar-date/eog-statusbar-date-plugin.c
+++ b/plugins/statusbar-date/eog-statusbar-date-plugin.c
@@ -29,7 +29,6 @@
#include <glib/gi18n-lib.h>
#include <libpeas/peas.h>
-#include <libpeasui/peas-ui.h>
#include <eog-debug.h>
#include <eog-scroll-view.h>
diff --git a/plugins/statusbar-date/statusbar-date.eog-plugin.desktop.in b/plugins/statusbar-date/statusbar-date.plugin.desktop.in
similarity index 94%
rename from plugins/statusbar-date/statusbar-date.eog-plugin.desktop.in
rename to plugins/statusbar-date/statusbar-date.plugin.desktop.in
index a3dc817..93ed60d 100644
--- a/plugins/statusbar-date/statusbar-date.eog-plugin.desktop.in
+++ b/plugins/statusbar-date/statusbar-date.plugin.desktop.in
@@ -1,5 +1,4 @@
-
-[Eog Plugin]
+[Plugin]
Module=statusbar-date
IAge=2
_Name=Date in statusbar
diff --git a/src/eog-plugin-engine.c b/src/eog-plugin-engine.c
index 8a73f2b..1f2a923 100644
--- a/src/eog-plugin-engine.c
+++ b/src/eog-plugin-engine.c
@@ -93,7 +93,7 @@ EogPluginEngine *
eog_plugin_engine_new (void)
{
EogPluginEngine *engine;
- gchar **search_paths;
+ gchar *user_plugin_path;
/* This should be moved to libpeas */
g_irepository_require (g_irepository_get_default (),
@@ -101,26 +101,26 @@ eog_plugin_engine_new (void)
g_irepository_require (g_irepository_get_default (),
"PeasUI", "1.0", 0, NULL);
- search_paths = g_new (gchar *, 5);
-
- search_paths[0] = g_build_filename (eog_util_dot_dir (), USER_EOG_PLUGINS_LOCATION, NULL);
- search_paths[1] = g_strdup (search_paths [0]);
- search_paths[2] = g_strdup (EOG_PLUGIN_DIR);
- search_paths[3] = g_strdup (EOG_PLUGIN_DIR);
- search_paths[4] = NULL;
-
engine = EOG_PLUGIN_ENGINE (g_object_new (EOG_TYPE_PLUGIN_ENGINE,
/* "base-module-dir", modules_dir, */
- "search-paths", search_paths,
NULL));
+ user_plugin_path = g_build_filename (eog_util_dot_dir (),
+ USER_EOG_PLUGINS_LOCATION, NULL);
+ /* Find per-user plugins */
+ peas_engine_add_search_path (PEAS_ENGINE (engine),
+ user_plugin_path, user_plugin_path);
+ /* Find system-wide plugins */
+ peas_engine_add_search_path (PEAS_ENGINE (engine),
+ EOG_PLUGIN_DIR, EOG_PLUGIN_DIR);
+
g_settings_bind (engine->priv->plugins_settings,
EOG_CONF_PLUGINS_ACTIVE_PLUGINS,
engine,
"loaded-plugins",
G_SETTINGS_BIND_DEFAULT);
- g_strfreev (search_paths);
+ g_free (user_plugin_path);
return engine;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]