[gnome-bluetooth] lib: Remove the ability to load uninstalled plugins
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Remove the ability to load uninstalled plugins
- Date: Tue, 28 Jun 2011 08:44:58 +0000 (UTC)
commit 60e25f356f1f32a11f991f63729df17b50615bf5
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jun 27 16:56:58 2011 +0100
lib: Remove the ability to load uninstalled plugins
lib/bluetooth-plugin-manager.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/lib/bluetooth-plugin-manager.c b/lib/bluetooth-plugin-manager.c
index f8a4a65..7f44bec 100644
--- a/lib/bluetooth-plugin-manager.c
+++ b/lib/bluetooth-plugin-manager.c
@@ -41,12 +41,7 @@
#include "bluetooth-client.h"
-#define UNINSTALLED_PLUGINDIR "../lib/plugins"
-
-#define SOEXT ("." G_MODULE_SUFFIX)
-#define SOEXT_LEN (strlen (SOEXT))
-
-GList *plugin_list = NULL;
+static GList *plugin_list = NULL;
static void
bluetooth_plugin_dir_process (const char *plugindir)
@@ -65,7 +60,7 @@ bluetooth_plugin_dir_process (const char *plugindir)
g_error_free (err);
} else {
while ((item = g_dir_read_name(dir))) {
- if (g_str_has_suffix (item, SOEXT)) {
+ if (g_str_has_suffix (item, "." G_MODULE_SUFFIX)) {
char *module_path;
p = g_new0(GbtPlugin, 1);
@@ -86,7 +81,7 @@ bluetooth_plugin_dir_process (const char *plugindir)
gbt_init_plugin (p);
- plugin_list = g_list_append (plugin_list, p);
+ plugin_list = g_list_append (plugin_list, p);
}
}
g_dir_close (dir);
@@ -103,11 +98,6 @@ bluetooth_plugin_dir_process (const char *plugindir)
gboolean
bluetooth_plugin_manager_init (void)
{
- if (g_file_test (UNINSTALLED_PLUGINDIR, G_FILE_TEST_IS_DIR) != FALSE) {
- /* Try to load the local plugins */
- bluetooth_plugin_dir_process ("../lib/plugins/.libs/");
- }
-
bluetooth_plugin_dir_process (PLUGINDIR);
return g_list_length (plugin_list) != 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]