On Fri, Jul 2, 2010 at 14:48, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Sun, 20 Jun 2010 17:24:48 +0200 Jiří Techet techet@gmail.com wrote:
[PATCH 3/3] Open files from msgwindow even if find_in_files_dir is not set
Currently if you want to open a file by double clicking the filename in the msgwindow (e.g. after searching in files), the file is opened only after the project had been opened for the first time (subsequent closing the project doesn't matter). The reason is that find_in_files_dir is initialized to NULL and only set when you open a project and if the project is not open because msgwin_parse_grep_line() stops on
if (string == NULL || msgwindow.find_in_files_dir == NULL) return;
even though it might try to find the file when the provided path is absolute. I don't see any reason in this behaviour and the patch is pretty trivial.
I think the bug might be that msgwindow.find_in_files_dir somewhere didn't get set - I'll look into it.
It's not a bug that msgwindow.find_in_files_dir is not set - I think it's correct that it's not set before you open a project. The problem is that when it's not set, the file in the msgwindow doesn't open when you click it even if there is a full path to that file (which doesn't require the find_in_files_dir)
Sorry for the late reply.
It's confusing that you talk about projects - msgwindow.find_in_files_dir has nothing to do with them, and is set when using Find in Files.
I applied your patch though so that plugins can add messages before FIF is used. Although if a plugin is doing that then we should probably add a function to set msgwindow.find_in_files_dir (and also rename it to messages_dir) so plugins don't have to use absolute paths.
Actually I already did the very same thing :-) - I just used different name than messages_dir, but messages_dir is better than the name I used so I'll rename it. I've also modified gproject to extend the current project functionality rather than replacing it and made several more changes that fix/improve functionality of geany. I'm just not sure how to send the patches - many of them change something in project.c so they depend on each other. Do you prefer to send them to the mailing list (but then you have to apply them in the right order) or is it enough if I publish them in the form of public git repository (easier for me and easier for you too I believe).
Regards,
Jiri
Regards, Nick _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel