*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/* This is a modified version of ephy-module.c from Epiphany source code.
GTypeModule parent_instance;
GModule *library;
+ gboolean resident;
gchar *path;
GType type;
module->library = g_module_open (module->path, 0);
if (!module->library) {
- g_warning (g_module_error ());
+ g_warning ("%s", g_module_error ());
return FALSE;
}
/* extract symbols from the lib */
if (!g_module_symbol (module->library, "register_evince_backend",
(void *) ®ister_func)) {
- g_warning (g_module_error ());
+ g_warning ("%s", g_module_error ());
g_module_close (module->library);
return FALSE;
return FALSE;
}
+ if (module->resident)
+ g_module_make_resident (module->library);
+
return TRUE;
}
}
EvModule *
-ev_module_new (const gchar *path)
+ev_module_new (const gchar *path,
+ gboolean resident)
{
EvModule *result;
g_type_module_set_name (G_TYPE_MODULE (result), path);
result->path = g_strdup (path);
+ result->resident = resident;
return result;
}