← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Fix lockfile placement on Linux/OSX

 

Jose,

The formatting of the if/else if statements does not follow the coding
policy.  They should be formatted:

if( condition )
{
}
else if( condition )
{
}

Thanks,

Wayne

On 1/5/2015 4:36 PM, José Ignacio wrote:
> Whoops, I didn't realize my pre-approval email went through the list
> after all, sorry for littering the mailing list with two slightly
> different versions of the same patch. the one in this thread is the
> most current.
> 
> Cheers,
> José
> 
> On Mon, Jan 5, 2015 at 6:33 PM, Adam Wolf <adamwolf@xxxxxxxxxxxxxxxxxxxx> wrote:
>> I will test this on OS X.
>>
>> Adam Wolf
>> Cofounder and Engineer
>> W&L
>>
>> On Mon, Jan 5, 2015 at 3:31 PM, José Ignacio <jose.cyborg@xxxxxxxxx> wrote:
>>>
>>> Hello, I wrote a patch to fix the issue of Kicad creating lock/PID
>>> files for applications and open files in the user's home directory,
>>> which is unsightly and wrong according to the XDG[1]/Apple[2]
>>> standards/spec.
>>>
>>> To fix it I created a new function in common.cpp which fetches the
>>> proper path to use using environment variables and a couple fallbacks,
>>> and edited all calls to wxSingleInstanceChecker's constructor to use
>>> it. According to wxwidgets's documentation [3] the constructor
>>> *should* ignore that extra argument on windows since it uses mutexes
>>> instead of lock files. In Mac OSX I used the standard user-specific
>>> cache directory, choosing somewhat arbitrarily "org.kicad-pcb.kicad"
>>> as the app bundle name, feel free to change it if you think something
>>> else would suit better.
>>>
>>> In any case, it does need testing in those platforms. It works as
>>> expected on Debian Jessie.
>>>
>>> [1]:
>>> http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
>>> [2]:
>>> https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html#//apple_ref/doc/uid/TP40010672-CH10-SW1
>>> [3]:
>>> http://docs.wxwidgets.org/trunk/classwx_single_instance_checker.html#aa69725041ea6c0479f65f6b468a42f1e
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References