[nautilus-sendto] Fix for newer libpeas



commit 83537f49d4cde85c6e18b4c843d4f57621561feb
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Oct 11 19:11:20 2010 +0100

    Fix for newer libpeas
    
    Updated API, renamed plugins files, and fix introspection
    annotations.

 configure.in                                       |    2 +-
 src/nautilus-sendto-command.c                      |   29 ++++++++-----------
 src/plugins/evolution/Makefile.am                  |    2 +-
 .../{evolution.nst-plugin => evolution.plugin}     |    2 +-
 src/plugins/nautilus-sendto-plugin.c               |    4 +-
 src/plugins/removable-devices/Makefile.am          |    2 +-
 ...devices.nst-plugin => removable-devices.plugin} |    2 +-
 src/plugins/socialweb/Makefile.am                  |    2 +-
 .../{socialweb.nst-plugin => socialweb.plugin}     |    2 +-
 9 files changed, 21 insertions(+), 26 deletions(-)
---
diff --git a/configure.in b/configure.in
index 7a63ffd..8d2cead 100644
--- a/configure.in
+++ b/configure.in
@@ -39,7 +39,7 @@ NAUTILUS_EXTENSION=2.30.1
 DBUS_REQUIRED=1.0
 DBUS_GLIB_REQUIRED=0.60
 GUPNP_REQUIRED=0.13
-LIBPEAS_REQUIRED=0.5.5
+LIBPEAS_REQUIRED=0.7.0
 
 AC_SUBST(GLIB_REQUIRED)
 AC_SUBST(GTHREAD_REQUIRED)
diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c
index dda6bfc..1517cbc 100644
--- a/src/nautilus-sendto-command.c
+++ b/src/nautilus-sendto-command.c
@@ -503,30 +503,25 @@ nautilus_sendto_plugin_init (NautilusSendto *nst)
 
 	search_paths = g_ptr_array_new ();
 
-	/* Add uninstalled plugins */
-	if (run_from_build_dir) {
-		g_ptr_array_add (search_paths, "plugins/");
-		g_ptr_array_add (search_paths, "plugins/");
-	}
-
-	/* Add user plugins */
-	user_dir = g_build_filename (g_get_user_config_dir (), "nautilus-sendto", "plugins", NULL);
-	g_ptr_array_add (search_paths, user_dir);
-	g_ptr_array_add (search_paths, user_dir);
-
-	/* Add system-wide plugins */
-	g_ptr_array_add (search_paths, PLUGINDIR);
-	g_ptr_array_add (search_paths, PLUGINDIR);
-
 	/* Terminate array */
 	g_ptr_array_add (search_paths, NULL);
 
 	/* Init engine */
 	paths = (char **) g_ptr_array_free (search_paths, FALSE);
-	engine = peas_engine_new ("Nst",
-				  (const gchar **) paths);
+	engine = peas_engine_get_default ();
+
+	/* Add uninstalled plugins */
+	if (run_from_build_dir)
+		peas_engine_add_search_path (engine, "plugins/", "plugins/");
+
+	/* Add user plugins */
+	user_dir = g_build_filename (g_get_user_config_dir (), "nautilus-sendto", "plugins", NULL);
+	peas_engine_add_search_path (engine, user_dir, user_dir);
 	g_free (user_dir);
 
+	/* Add system-wide plugins */
+	peas_engine_add_search_path (engine, PLUGINDIR, PLUGINDIR);
+
 	/* Create the extension set */
 	exten_set = peas_extension_set_new (PEAS_ENGINE (engine),
 					    NAUTILUS_SENDTO_TYPE_PLUGIN,
diff --git a/src/plugins/evolution/Makefile.am b/src/plugins/evolution/Makefile.am
index d5b55fb..79c9d74 100644
--- a/src/plugins/evolution/Makefile.am
+++ b/src/plugins/evolution/Makefile.am
@@ -1,6 +1,6 @@
 plugindir = $(libdir)/nautilus-sendto/plugins
 
-plugin_DATA = evolution.nst-plugin
+plugin_DATA = evolution.plugin
 
 INCLUDES =                                      \
         -DDATADIR=\"$(datadir)\"                \
diff --git a/src/plugins/evolution/evolution.nst-plugin b/src/plugins/evolution/evolution.plugin
similarity index 88%
rename from src/plugins/evolution/evolution.nst-plugin
rename to src/plugins/evolution/evolution.plugin
index 4082885..e4b371a 100644
--- a/src/plugins/evolution/evolution.nst-plugin
+++ b/src/plugins/evolution/evolution.plugin
@@ -1,4 +1,4 @@
-[Nst Plugin]
+[Plugin]
 Module=nstevolution
 IAge=1
 Name=Email
diff --git a/src/plugins/nautilus-sendto-plugin.c b/src/plugins/nautilus-sendto-plugin.c
index 2c66e2c..02de804 100644
--- a/src/plugins/nautilus-sendto-plugin.c
+++ b/src/plugins/nautilus-sendto-plugin.c
@@ -48,10 +48,10 @@ nautilus_sendto_plugin_default_init (NautilusSendtoPluginInterface *iface)
 }
 
 /**
- * nautilus_sendto_get_object:
+ * nautilus_sendto_plugin_get_object:
  * @plugin: a #NautilusSendtoPlugin instance
  *
- * Returns: (transfer none): a reference to the #NautilusSendtoPlugin instance.
+ * Returns: (transfer none): a #NautilusSendtoPlugin object.
  */
 GObject *
 nautilus_sendto_plugin_get_object (NautilusSendtoPlugin *plugin)
diff --git a/src/plugins/removable-devices/Makefile.am b/src/plugins/removable-devices/Makefile.am
index 61f4adc..d88db6d 100644
--- a/src/plugins/removable-devices/Makefile.am
+++ b/src/plugins/removable-devices/Makefile.am
@@ -1,6 +1,6 @@
 plugindir = $(libdir)/nautilus-sendto/plugins
 
-plugin_DATA = removable-devices.nst-plugin
+plugin_DATA = removable-devices.plugin
 
 INCLUDES =                                      \
         -DDATADIR=\"$(datadir)\"                \
diff --git a/src/plugins/removable-devices/removable-devices.nst-plugin b/src/plugins/removable-devices/removable-devices.plugin
similarity index 92%
rename from src/plugins/removable-devices/removable-devices.nst-plugin
rename to src/plugins/removable-devices/removable-devices.plugin
index d29f2c1..279c03a 100644
--- a/src/plugins/removable-devices/removable-devices.nst-plugin
+++ b/src/plugins/removable-devices/removable-devices.plugin
@@ -1,4 +1,4 @@
-[Nst Plugin]
+[Plugin]
 Module=nstremovable_devices
 IAge=1
 Name=Removable disks and shares
diff --git a/src/plugins/socialweb/Makefile.am b/src/plugins/socialweb/Makefile.am
index 30af2ad..f07b784 100644
--- a/src/plugins/socialweb/Makefile.am
+++ b/src/plugins/socialweb/Makefile.am
@@ -1,6 +1,6 @@
 plugindir = $(libdir)/nautilus-sendto/plugins
 
-plugin_DATA = socialweb.nst-plugin
+plugin_DATA = socialweb.plugin
 
 INCLUDES =                                      \
         -DDATADIR=\"$(datadir)\"                \
diff --git a/src/plugins/socialweb/socialweb.nst-plugin b/src/plugins/socialweb/socialweb.plugin
similarity index 90%
rename from src/plugins/socialweb/socialweb.nst-plugin
rename to src/plugins/socialweb/socialweb.plugin
index fbb51ca..ca8cdbd 100644
--- a/src/plugins/socialweb/socialweb.nst-plugin
+++ b/src/plugins/socialweb/socialweb.plugin
@@ -1,4 +1,4 @@
-[Nst Plugin]
+[Plugin]
 Module=nstsocialweb
 IAge=1
 Name=libsocialweb photo uploader



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]