[Geany-devel] Patches required by gproject

Jiří Techet techet at xxxxx
Thu Jun 17 20:56:06 UTC 2010

Hi Nick,

sure, the explanation follows next:

On Thu, Jun 17, 2010 at 16:28, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:
> On Wed,  9 Jun 2010 21:49:03 +0200
> Jiří Techet <techet at gmail.com> wrote:
>> The following patches are required by gproject to build and
>> run correctly. More details in the individual patches.
>> [PATCH 1/3] Add a signal that is emitted before build starts

I want to be able to save all project files before the build starts.
Currently geany saves only the active file but does nothing with the
other open files, so you may be compiling the old version. I think
emitting the signal before build might be useful for other plugins too
(e.g. if they pre-process the files before the build and so on)

>> [PATCH 2/3] Make it possible to fill some fields of find in files dialog by plugins

There are two fields that I find it useful to pre-set in the find in
files dialog:

* the path - my plugin displays a project file tree in the sidebar and
right-clicking a folder and selecting "find in directory" pre-fills
the directory in the dialog for the user. This saves a lot of time
especially when the directory structure is deep.

* extra options - in my plugin the project files are defined by a set
of patterns, so by providing a base path and patterns like
*.c;*.h;*.am he defines the files he'll see in the sidebar and that
are "inside" the project. Search in project files applies only to
these files (and for big projects you really don't want to search *.o
and others) so you need to restrict grep by something like

--include=*.c --include=*.h --include=*.am

Unfortunately the more file types you have, the more typing it
involves so the plugin does this for you.

I can imagine that other plugins might find it useful to change the
"search for" field and that the "extra options" checkbox might be also
plugin-settable so I could add those too if you wish.

>> [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)

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.



> Can you explain more about how you want to use these changes?
> Regards,
> Nick
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

More information about the Devel mailing list