[Geany-devel] GProject - missing Geany patches
lists.ban at xxxxx
Sat Apr 30 21:53:11 UTC 2011
Le 28/04/2011 22:18, Jiří Techet a écrit :
>>> 4774306b7f65237ef75b01e8d6c8312dcc5c526e Make project patterns visible
>> The patch looks reasonable (read ahead), though the UI is wrongly
>> packed, and should better use a GtkEntry now it's single-lined. I fixed
> Agree, I just reused what was there before.
>>> 57b4120f94e611e8143fba89e397588de8693ec3 Use project patterns in the FIF dialog
>> Why not. Though, pattern matching don't work when not searching in
>> subdirs (this isn't a flaw of your patch, the same happens currently,
>> need to fix this).
>> However, I'm not sure to understand why this functionality is this
>> important for you and your plugin?
>> I understand that if your plugin makes use of some file patterns, it
>> then makes sense to show them in the FIF dialog. But Geany don't use
>> project patterns, and adding such patters to projects seems useless to
>> me since their only usage is to show them in the FIF dialog... but IMHO
>> they don't make much sense since they don't mean anything more than an
>> arbitrary set of patterns stored with the project files (we have pattern
>> history, isn't that sufficient here?).
>> So maybe there are good reason, but couldn't simply your plugin provide
>> the functionality? (though showing them in FIF dialog would probably not
>> be possible ATM)
> I think it is useful for several reasons:
> 1. If you switch between several projects with different file types,
> you set the patterns only once and every time you open the project,
> the patterns in the FIF dialog are set automatically. I tend to forget
> to set the right patterns when switching projects which then leads to
> not finding the string you are searching for. Also finding the right
> patterns for the current project can be challenging if you have a list
> of very similar patterns (and different permutations like *.c *.h as
> one pattern and *.h *.c as another). Apart from that, to insert the
> right patterns for the first time you'd have to first open the project
> preferences and copy the patterns from there which is much less
> 2. Other plugins can use the patterns. For instance the file browser
> plugin could be extended to use the patterns to filter the file list.
> I have another work-in-progress plugin which can be used to generate
> (and search) a ctags file for the whole project. I use the project
> patterns to search for tags in only those files that match the
> In general, the patterns define what files belong to the project and
> anybody who's interested in that information can use it. At the moment
> the project is defined just by the base directory but nothing more,
> which isn't sufficient in some cases.
Ok, seems reasonable. Both committed now with some small changes, thanks
for the patches.
More information about the Devel