From f4cfc7b5ce404910486ecbce2af9d4991c5c76e4 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Tue, 29 Sep 2009 14:09:11 +0000 Subject: [PATCH] Update to API 159. git-svn-id: https://geany-plugins.svn.sourceforge.net/svnroot/geany-plugins/trunk/geany-plugins@961 e8383189-8249-0410-b506-acc975200cbd --- geanylua/ChangeLog | 3 +++ geanylua/glspi_init.c | 32 +------------------------------- geanylua/glspi_ver.h | 2 +- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/geanylua/ChangeLog b/geanylua/ChangeLog index 4025de702..9777e1d35 100644 --- a/geanylua/ChangeLog +++ b/geanylua/ChangeLog @@ -1,3 +1,6 @@ +September 29, 2009 (ntrel) + Update to API 159. + September 24, 2009 (ntrel) Use new plugin_configure_single() instead of using plugin_configure() wrongly. diff --git a/geanylua/glspi_init.c b/geanylua/glspi_init.c index 5211cedd6..b6611837c 100644 --- a/geanylua/glspi_init.c +++ b/geanylua/glspi_init.c @@ -363,39 +363,9 @@ static void init_menu(gpointer data, gpointer user_data) -/* - * Borrowed from Geany's utils_get_file_list() but modified because I want the - * list to store the full path to each file... - * - * Gets a sorted list of files in the specified directory. - * The list and the data in the list should be freed after use. - * Returns: The list or NULL if no files found. - */ -static GSList *get_file_list(const gchar *path) -{ - GSList *list = NULL; - GDir *dir; - GError *err = NULL; - g_return_val_if_fail(path && *path, NULL); - dir = g_dir_open(path, 0, &err); - if (dir) { - while (1) { - const gchar *filename = g_dir_read_name(dir); - if (!filename) { break; } - list = g_slist_insert_sorted( - list, g_strconcat(path, DIR_SEP, filename, NULL), (GCompareFunc) strcasecmp); - } - g_dir_close(dir); - } - if (err) {g_error_free(err);} - return list; -} - - - static GtkWidget* new_menu(GtkWidget *parent, gchar* script_dir, gchar*title) { - GSList *script_names=get_file_list(script_dir); + GSList *script_names=utils_get_file_list_full(script_dir, TRUE, TRUE, NULL); if (script_names) { GtkWidget *menu = gtk_menu_new(); GtkWidget *menu_item = gtk_menu_item_new_with_mnemonic(title); diff --git a/geanylua/glspi_ver.h b/geanylua/glspi_ver.h index 45d5704b8..85c4fe5f5 100644 --- a/geanylua/glspi_ver.h +++ b/geanylua/glspi_ver.h @@ -12,7 +12,7 @@ #define PLUGIN_AUTHOR "Jeff Pohlmeyer" -#define MY_GEANY_API_VER 153 +#define MY_GEANY_API_VER 159 #define LUA_MODULE_NAME "geany"