Revision: 2141 http://geany.svn.sourceforge.net/geany/?rev=2141&view=rev Author: ntrel Date: 2008-01-02 05:39:53 -0800 (Wed, 02 Jan 2008)
Log Message: ----------- Use documents->open_files() as it's more efficient when opening multiple files and existing files are open for filetypes with typename colouring.
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/filebrowser.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-01-02 13:17:25 UTC (rev 2140) +++ trunk/ChangeLog 2008-01-02 13:39:53 UTC (rev 2141) @@ -2,6 +2,10 @@
* tagmanager/c.c: Ignore D import statements. + * plugins/filebrowser.c: + Use documents->open_files() as it's more efficient when opening + multiple files and existing files are open for filetypes with + typename colouring.
2007-12-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2008-01-02 13:17:25 UTC (rev 2140) +++ trunk/plugins/filebrowser.c 2008-01-02 13:39:53 UTC (rev 2141) @@ -398,8 +398,10 @@ }
+/* We use documents->open_files() as it's more efficient. */ static void open_selected_files(GList *list) { + GSList *files = NULL; GList *item;
for (item = list; item != NULL; item = g_list_next(item)) @@ -407,9 +409,11 @@ GtkTreePath *treepath = item->data; gchar *fname = get_tree_path_filename(treepath);
- documents->open_file(fname, FALSE, NULL, NULL); - g_free(fname); + files = g_slist_append(files, fname); } + documents->open_files(files, FALSE, NULL, NULL); + g_slist_foreach(files, (GFunc) g_free, NULL); // free filenames + g_slist_free(files); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.