SF.net SVN: geany-plugins:[775] trunk/geany-plugins/geanylua
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Jun 23 12:24:32 UTC 2009
Revision: 775
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=775&view=rev
Author: ntrel
Date: 2009-06-23 12:24:31 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Look for support library in LIBDIR/geany-plugins/geanylua.
Read scripts from DATADIR/geany-plugins/geanylua.
Init plugin_key_group fields to zero in case support library is not
found.
Modified Paths:
--------------
trunk/geany-plugins/geanylua/ChangeLog
trunk/geany-plugins/geanylua/geanylua.c
trunk/geany-plugins/geanylua/glspi_init.c
Modified: trunk/geany-plugins/geanylua/ChangeLog
===================================================================
--- trunk/geany-plugins/geanylua/ChangeLog 2009-06-22 18:43:31 UTC (rev 774)
+++ trunk/geany-plugins/geanylua/ChangeLog 2009-06-23 12:24:31 UTC (rev 775)
@@ -1,3 +1,9 @@
+June 23, 2009 (ntrel)
+ Look for support library in LIBDIR/geany-plugins/geanylua.
+ Read scripts from DATADIR/geany-plugins/geanylua.
+ Init plugin_key_group fields to zero in case support library is not
+ found.
+
June 19, 2009 (ntrel)
Move to geany-plugins project, add i18n support.
Rename from GeanyLua to 'Lua Script'.
Modified: trunk/geany-plugins/geanylua/geanylua.c
===================================================================
--- trunk/geany-plugins/geanylua/geanylua.c 2009-06-22 18:43:31 UTC (rev 774)
+++ trunk/geany-plugins/geanylua/geanylua.c 2009-06-23 12:24:31 UTC (rev 775)
@@ -48,7 +48,6 @@
#define GETSYM(name,ptr) ( g_module_symbol(libgeanylua, name, (gpointer) &ptr) && ptr )
-#define MKPATH(dir) g_build_path(G_DIR_SEPARATOR_S, dir, "plugins", "geanylua", SUPPORT_LIB, NULL);
PLUGIN_EXPORT
PLUGIN_VERSION_CHECK(MY_GEANY_API_VER)
@@ -60,7 +59,7 @@
GeanyFunctions *geany_functions;
PLUGIN_EXPORT
-GeanyKeyGroup plugin_key_group[1];
+GeanyKeyGroup plugin_key_group[1] = {NULL, NULL, 0, NULL};
@@ -138,15 +137,15 @@
main_locale_init(LOCALEDIR, GETTEXT_PACKAGE);
geany_data=data;
- libname=MKPATH(data->app->configdir);
+ libname=g_build_path(G_DIR_SEPARATOR_S, data->app->configdir, "plugins", "geanylua", SUPPORT_LIB, NULL);
if ( !g_file_test(libname,G_FILE_TEST_IS_REGULAR) ) {
g_free(libname);
- libname=MKPATH(data->app->datadir);
+ libname=g_build_path(G_DIR_SEPARATOR_S, LIBDIR, "geany-plugins", "geanylua", SUPPORT_LIB, NULL);
}
if ( !g_file_test(libname,G_FILE_TEST_IS_REGULAR) ) {
+ g_printerr(_("%s: Can't find support library %s!\n"), PLUGIN_NAME, libname);
g_free(libname);
libname=NULL;
- g_printerr(_("%s: Can't find support library!\n"), PLUGIN_NAME);
return;
}
libgeanylua=g_module_open(libname,0);
Modified: trunk/geany-plugins/geanylua/glspi_init.c
===================================================================
--- trunk/geany-plugins/geanylua/glspi_init.c 2009-06-22 18:43:31 UTC (rev 774)
+++ trunk/geany-plugins/geanylua/glspi_init.c 2009-06-23 12:24:31 UTC (rev 775)
@@ -8,9 +8,9 @@
#define DIR_SEP G_DIR_SEPARATOR_S
-#define SCRIPT_FOLDER DIR_SEP "plugins" DIR_SEP "geanylua"
+#define USER_SCRIPT_FOLDER DIR_SEP "plugins" DIR_SEP "geanylua"
-#define EVENTS_FOLDER SCRIPT_FOLDER DIR_SEP "events" DIR_SEP
+#define EVENTS_FOLDER USER_SCRIPT_FOLDER DIR_SEP "events" DIR_SEP
#define ON_SAVED_SCRIPT EVENTS_FOLDER "saved.lua"
#define ON_OPENED_SCRIPT EVENTS_FOLDER "opened.lua"
@@ -416,6 +416,7 @@
local_data.script_list=g_slist_concat(local_data.script_list,script_names);
return menu_item;
}
+ g_printerr("%s: No scripts found in %s\n", PLUGIN_NAME, script_dir);
return NULL;
}
@@ -439,17 +440,17 @@
void glspi_init (GeanyData *data, GeanyFunctions *functions, GeanyKeyGroup *kg)
{
GeanyApp *app = data->app;
-
+
glspi_geany_data = data;
glspi_geany_functions = functions;
local_data.script_dir =
- g_strconcat(app->configdir, SCRIPT_FOLDER, NULL);
+ g_strconcat(app->configdir, USER_SCRIPT_FOLDER, NULL);
if (!g_file_test(local_data.script_dir, G_FILE_TEST_IS_DIR)) {
g_free(local_data.script_dir);
local_data.script_dir =
- g_strconcat(app->datadir, SCRIPT_FOLDER, NULL);
+ g_build_path(G_DIR_SEPARATOR_S, DATADIR, "geany-plugins", "geanylua", NULL);
}
if (app->debug_mode) {
g_printerr(_(" ==>> %s: Building menu from '%s'\n"),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list