Hi Colomban,
thanks a lot for the review!
On Thu, Apr 28, 2011 at 01:49, Colomban Wendling lists.ban@herbesfolles.org wrote:
Le 10/04/2011 15:03, Jiří Techet a écrit :
Hi,
Hi,
first sorry for disappearing for such a long time - I didn't have much free time left in the past months and from the time I had I dedicated most of it to the libchamplain library I maintain to make some bigger changes and adapt it to GTK 3 in time for Gnome 3. The good news is that I didn't convert to Eclipse or Emacs meanwhile ;-).
There are still quite many patches I have against geany in my repository and I'd like to have at least part of them merged so I don't have to maintain my own geany branch. So at the moment the highest-priority patches for me are those which are necessary in order to make GProject working so it can become one of official geany plugins. The patches can be found at usual place:
https://gitorious.org/~techy/geany/gproject-geany
under the for_review4 branch. Only the first three of them are needed for GProject so they should have the highest priority when reviewing:
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 this.
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 comfortable.
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 patterns.
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.
Cheers,
Jiri