SF.net SVN: geany: [1755] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sat Jul 28 11:47:56 UTC 2007


Revision: 1755
          http://geany.svn.sourceforge.net/geany/?rev=1755&view=rev
Author:   eht16
Date:     2007-07-28 04:47:56 -0700 (Sat, 28 Jul 2007)

Log Message:
-----------
Only show the separator between built-in Tools menu items and plugins if there are any plugins.
Use PACKAGE_LIB_DIR.
Load plugins in ~/.geany/plugins/ prior to the default location.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/Makefile.am
    trunk/src/plugins.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-07-28 10:27:42 UTC (rev 1754)
+++ trunk/ChangeLog	2007-07-28 11:47:56 UTC (rev 1755)
@@ -5,6 +5,11 @@
    Allow using auto completion in PHP files outside of the PHP tags,
    generally in comments, for news files without filetype and on
    non-empty lines.
+ * src/Makefile.am, src/plugins.c:
+   Only show the separator between built-in Tools menu items and plugins
+   if there are any plugins.
+   Use PACKAGE_LIB_DIR.
+   Load plugins in ~/.geany/plugins/ prior to the default location.
 
 
 2007-07-27  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am	2007-07-28 10:27:42 UTC (rev 1754)
+++ trunk/src/Makefile.am	2007-07-28 11:47:56 UTC (rev 1755)
@@ -80,7 +80,8 @@
 endif
 
 INCLUDES = \
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\" -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\" -DPACKAGE_LIB_DIR=\""$(libdir)"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
 	-I$(srcdir)/../scintilla/include -I$(srcdir)/../tagmanager/include @GTK_CFLAGS@
 
 clean-local:

Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c	2007-07-28 10:27:42 UTC (rev 1754)
+++ trunk/src/plugins.c	2007-07-28 11:47:56 UTC (rev 1755)
@@ -263,15 +263,9 @@
 }
 
 
-// TODO: Pass -DLIBDIR=\"$(libdir)/geany\" in Makefile.am
-#define LIBDIR \
-	PACKAGE_DATA_DIR G_DIR_SEPARATOR_S ".." G_DIR_SEPARATOR_S "lib" \
-		G_DIR_SEPARATOR_S PACKAGE
-
 static void
-load_plugins()
+load_plugins(const gchar *path)
 {
-	const gchar *path = LIBDIR;
 	GSList *list, *item;
 
 	list = utils_get_file_list(path, NULL, NULL);
@@ -297,14 +291,22 @@
 void plugins_init()
 {
 	GtkWidget *widget;
+	gchar *path_user;
 
 	geany_data_init();
 
 	widget = gtk_separator_menu_item_new();
-	gtk_widget_show(widget);
 	gtk_container_add(GTK_CONTAINER(geany_data.tools_menu), widget);
 
-	load_plugins();
+	path_user = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "plugins", NULL);
+	// first load plugins in ~/.geany/plugins/, then in $prefix/lib/geany
+	load_plugins(path_user);
+	load_plugins(PACKAGE_LIB_DIR G_DIR_SEPARATOR_S "geany");
+
+	if (g_list_length(plugin_list) > 0)
+		gtk_widget_show(widget);
+
+	g_free(path_user);
 }
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list