From 0b1269a7704d0e89f690bddd9b63f6fb596dff33 Mon Sep 17 00:00:00 2001 From: waker Date: Fri, 5 Nov 2010 22:13:31 +0100 Subject: added fallback gtkui plugin --- plugins.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'plugins.c') diff --git a/plugins.c b/plugins.c index 61a95d33..161ba138 100644 --- a/plugins.c +++ b/plugins.c @@ -639,8 +639,8 @@ plug_load_all (void) { int i; for (i = 0; i < n; i++) { - // no hidden files - while (namelist[i]->d_name[0] != '.') + // skip hidden files and fallback plugins + while (namelist[i]->d_name[0] != '.' && !strstr (namelist[i]->d_name, ".fallback.")) { int l = strlen (namelist[i]->d_name); if (l < 3) { @@ -679,7 +679,14 @@ plug_load_all (void) { void *handle = dlopen (fullname, RTLD_NOW); if (!handle) { trace ("dlopen error: %s\n", dlerror ()); - break; + strcpy (fullname + strlen(fullname) - 3, ".fallback.so"); + handle = dlopen (fullname, RTLD_NOW); + if (!handle) { + break; + } + else { + fprintf (stderr, "successfully started fallback plugin %s\n", fullname); + } } d_name[l-3] = 0; strcat (d_name, "_load"); -- cgit v1.2.3