[grisbi-cvs] grisbi/src gsb_plugins.c, 1.23, 1.24 main.c, 1.172, 1.173 main.h, 1.11, 1.12 parse_cmdline.c, 1.16, 1.17

Pierre Biava pbiava at users.sourceforge.net
Sat Apr 24 20:38:29 CEST 2010


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv778/src

Modified Files:
	gsb_plugins.c main.c main.h parse_cmdline.c 
Log Message:
fixes a bug of detection plugins with an architecture x86_64

Index: parse_cmdline.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parse_cmdline.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- parse_cmdline.c	23 Nov 2008 09:44:40 -0000	1.16
+++ parse_cmdline.c	24 Apr 2010 18:38:27 -0000	1.17
@@ -166,7 +166,7 @@
 void show_version(void)
 {
 #ifdef HAVE_PLUGINS
-    gsb_plugins_scan_dir ( PLUGINS_DIR );
+    gsb_plugins_scan_dir ( PLUGINS_DIRECTORY );
 #endif
 
     g_print(N_("Grisbi version %s, %s\n"), VERSION, gsb_plugin_get_list());
@@ -195,7 +195,7 @@
  *
  * \private
  */
-void   show_usage(gint errval, gchar* extra)
+void show_usage ( gint errval, gchar* extra )
 {
     show_errstr(errval,extra);
     g_printerr(USAGE_STRING);

Index: gsb_plugins.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_plugins.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- gsb_plugins.c	5 Apr 2010 21:24:53 -0000	1.23
+++ gsb_plugins.c	24 Apr 2010 18:38:27 -0000	1.24
@@ -68,8 +68,7 @@
 	if ( strncmp ( split_filename[1], G_MODULE_SUFFIX, strlen(G_MODULE_SUFFIX) ) )
 	    continue;
 
-	complete_filename = g_build_filename ( PLUGINS_DIR,
-					       filename, NULL );
+	complete_filename = g_build_filename ( dirname, filename, NULL );
 
 	if ( ! ( plugin -> handle = 
 		 g_module_open (complete_filename, 0 ) ) )

Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -r1.172 -r1.173
--- main.c	14 Apr 2010 20:54:13 -0000	1.172
+++ main.c	24 Apr 2010 18:38:27 -0000	1.173
@@ -67,7 +67,6 @@
 static  void main_window_destroy_event( GObject* obj, gpointer data);
 /*END_STATIC*/
 
-
 /* vbox ajoutée dans la fenetre de base, contient le menu et la fenetre d'utilisation */
 G_MODULE_EXPORT GtkWidget *window = NULL;
 GtkWidget *window_vbox_principale = NULL;
@@ -114,14 +113,32 @@
 #if IS_DEVELOPMENT_VERSION == 1
 	struct lconv *conv;
 #endif
-
 #ifndef _WIN32
     struct sigaction sig_sev;
 #endif
 #ifdef _MSC_VER
-	gchar * gtkrc_file;
+	gchar *gtkrc_file;
+#endif
+
+#ifdef G_OS_UNIX
+    if ( g_file_test ( PLUGINS_DIR, G_FILE_TEST_IS_DIR ) )
+        PLUGINS_DIRECTORY = g_strdup ( PLUGINS_DIR );
+
+    else
+    {
+        gchar *ptr;
+        gchar *dir_name;
+
+        ptr = g_strrstr ( PLUGINS_DIR, "/grisbi" );
+        dir_name = g_strndup ( PLUGINS_DIR, ( ptr - PLUGINS_DIR ) );
+        dir_name = g_strconcat ( dir_name, "64/grisbi", NULL );
+        
+        if ( g_file_test ( dir_name, G_FILE_TEST_IS_DIR ) )
+            PLUGINS_DIRECTORY = dir_name;
+    }
 #endif
 
+
 #if GSB_GMEMPROFILE
     g_mem_set_vtable(glib_mem_profiler_table);
 #endif
@@ -178,7 +195,7 @@
     }
 
 #ifdef HAVE_PLUGINS
-    gsb_plugins_scan_dir ( PLUGINS_DIR );
+    gsb_plugins_scan_dir ( PLUGINS_DIRECTORY );
 #endif
 
     /* create the icon of grisbi (set in the panel of gnome or other) */
@@ -328,6 +345,7 @@
     gtk_main ();
 
     gsb_plugins_release ( );
+    g_free ( PLUGINS_DIRECTORY );
 
     /* sauvegarde les raccourcis claviers */
     gtk_accel_map_save (path);

Index: main.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- main.h	5 Apr 2010 21:24:53 -0000	1.11
+++ main.h	24 Apr 2010 18:38:27 -0000	1.12
@@ -3,6 +3,7 @@
 /* START_INCLUDE_H */
 /* END_INCLUDE_H */
 
+gchar *PLUGINS_DIRECTORY;
 
 /* START_DECLARATION */
 gboolean gsb_grisbi_close ( void );



More information about the cvs mailing list