genius r721 - in trunk: . src



Author: jirka
Date: Mon Feb 16 06:11:40 2009
New Revision: 721
URL: http://svn.gnome.org/viewvc/genius?rev=721&view=rev

Log:

Mon Feb 16 00:11:29 2009  Jiri (George) Lebl <jirka 5z com>

	* src/gnome-genius.c, src/plugin.c: minor fixes.  Display help for
	  plugin loading, don't do lazy binding (can lead to stupid crashes,
	  better just not load bad plugins) also pass the LOCAL flag to
	  plugins to be safer.

	* src/Makefile.am: add the NOGUI libs to gnome-genius.  That will
	  make plugins work again



Modified:
   trunk/ChangeLog
   trunk/src/Makefile.am
   trunk/src/gnome-genius.c
   trunk/src/plugin.c

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Mon Feb 16 06:11:40 2009
@@ -97,6 +97,7 @@
 	-lmpfr					\
 	@LEXLIB@				\
 	$(GENIUS_LIBS)				\
+	$(GENIUS_NOGUI_LIBS)			\
 	$(GSV_LIBS)				\
 	@READLINE_LIB@				\
 	@TERMCAP_LIB@

Modified: trunk/src/gnome-genius.c
==============================================================================
--- trunk/src/gnome-genius.c	(original)
+++ trunk/src/gnome-genius.c	Mon Feb 16 06:11:40 2009
@@ -25,6 +25,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <vte/vte.h>
+#include <libgnomevfs/gnome-vfs.h>
 
 #include <string.h>
 #include <unistd.h>
@@ -4468,7 +4469,6 @@
 static void
 loadup_files_from_cmdline (int argc, char *argv[])
 {
-	GValue value = { 0, };
 	int i;
 
 	for (i = 1; i < argc && argv[i] != NULL; i++) {

Modified: trunk/src/plugin.c
==============================================================================
--- trunk/src/plugin.c	(original)
+++ trunk/src/plugin.c	Mon Feb 16 06:11:40 2009
@@ -144,13 +144,16 @@
 					   ".",
 					   G_MODULE_SUFFIX,
 					   NULL);
-		mod = g_module_open (fname, G_MODULE_BIND_LAZY);
-		/* printf ("error: '%s'\n", g_module_error ()); */
+		if (access (fname, R_OK) == 0)
+			mod = g_module_open (fname,
+					     G_MODULE_BIND_LOCAL);
+		else if (access (plug->file, R_OK) == 0)
+			mod = g_module_open (plug->file,
+					     G_MODULE_BIND_LOCAL);
 		g_free (fname);
-		if (mod == NULL)
-			mod = g_module_open (plug->file, G_MODULE_BIND_LAZY);
 		if (mod == NULL) {
 			gel_errorout (_("Can't open plugin!"));
+			gel_errorout ("%s", g_module_error ());
 		 	return NULL;
 		}
 		g_module_make_resident(mod);



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