Olivier Sessink | 3 Jul 2010 20:49
Picon
Gravatar

file naming conventions (for GtkUIManager and more)

Hi all,

the current file names in the bluefish code do not really follow a
convention. Only the bftextview* files are named in a logical way. I was
thinking of a file name convention, first to be used for the
GtkUIManager migration.

The convention:

- foo.h declares all functions about 'foo'
- foo.c implements all public functions about 'foo'
- foo_bar.h decares 'bar' helper functions for 'foo' that are
only/mostly called from foo_*.c files, not from other files
- foo_bar.c implements these helper functions

So when we migrate to GtkUIManager, we get rid of menu.c and menu.h,
gui.c and gui.h, and we create bfwin.c and bfwin.h and bfwin_uimanager.c
for the GtkUIManager and GtkActions.

What do you think?
1) do we need a convention?
2) Is this a useful convention?
3) is the bfwin* proposal a good proposal?

Olivier
Olivier Sessink | 27 Jul 2010 08:50
Picon
Gravatar

Re: file naming conventions (for GtkUIManager and more)

On 07/27/2010 06:30 AM, Jim Hayward wrote:
> On Mon, 2010-07-26 at 20:48 +0200, Olivier Sessink wrote:
>> Hi Jim,
>>
>> I hoped you would give some feedback on my post about file naming
>> conventions.. Any ideas about that?
>
> I missed that one. I probably clicked on it and then never read it.
>
> Sounds pretty good. It would probably keep things organized better.

yeah, it has grown messy in time

> Although, might consider using bluefish instead of just bf to more
> closely follow GTK's naming conventions.

hm, but it makes function names quite long.. (and gtk also doesn't use
gimptoolkit_bla() ;-)

Olivier

(redirect discussion back to the mailinglist)

Jim Hayward | 1 Aug 2010 15:39

Re: file naming conventions (for GtkUIManager and more)

On Tue, 2010-07-27 at 08:50 +0200, Olivier Sessink wrote:
> On 07/27/2010 06:30 AM, Jim Hayward wrote:
> 
> > Although, might consider using bluefish instead of just bf to more
> > closely follow GTK's naming conventions.
> 
> hm, but it makes function names quite long.. (and gtk also doesn't use
> gimptoolkit_bla() ;-)

Public functions would be candidates for a bluefish* prefix. Especially
if a better plugin API was developed. I don't see a need for static
functions to have the prefix.

Regards,
	Jim H


Gmane