← Back to team overview

kicad-developers team mailing list archive

Re: wxFileDialog issues

 

On 5/12/2010 11:28 AM, Dick Hollenbeck wrote:
> Wayne Stambaugh wrote:
>> On 5/12/2010 10:52 AM, Dick Hollenbeck wrote:
>>  
>>> Wayne Stambaugh wrote:
>>>    
>>>> On 5/11/2010 8:44 AM, Lorenzo Marcantonio wrote:
>>>>  
>>>>      
>>>>> A minor nuisance... but I don't get why it does this on pcbnew:
>>>>>
>>>>> - If at the beginning you do an 'Open board' you get the dialog
>>>>> with the
>>>>>   'Printed circuit board file' wildcard active, and thats good.
>>>>>
>>>>> - If there is a board loaded, doing an 'Open board' starts with no
>>>>>   wildcard active and you must select it to show only the .brd
>>>>> files...
>>>>>
>>>>> I presume this is because pcbnew does this:
>>>>>
>>>>>         wxFileName fn = GetScreen()->m_FileName;
>>>>>
>>>>>         wxFileDialog dlg( this, _( "Open Board File" ), wxEmptyString,
>>>>> fn.GetFullName(),
>>>>>                           PcbFileWildcard, wxFD_OPEN |
>>>>> wxFD_FILE_MUST_EXIST );
>>>>>
>>>>> ... and the fnGetFullName() somewhat confuses the wxFileDialog...
>>>>>
>>>>> Oh, BTW PcbFileWildcard is mostly the same as BoardFileWildcard,
>>>>> I propose to pick one and junk the other one (no sense in keeping both
>>>>> of them).
>>>>>
>>>>> Eeschema doesn't suffer the problem... what it does is:
>>>>>
>>>>>         wxFileDialog dlg( this, _( "Open Schematic" ), wxGetCwd(),
>>>>>                           wxEmptyString, SchematicFileWildcard,
>>>>>                           wxFD_OPEN | wxFD_FILE_MUST_EXIST );
>>>>>
>>>>> I don't get why it's done differently (I'm no expert in wx), but I
>>>>> guess
>>>>> that doing the same in pcbnew would fix the nuisance. I'll try that
>>>>> later...
>>>>>             
>>>> I've been digging around the source and this inconsistency occurs in
>>>> some of the other Kicad apps as well.  I'll change all of the Kicad
>>>> apps
>>>> open file dialog behavior to mimic the file dialog behavior in EESchema
>>>> if no one objects.  I looked at a least a dozen other apps and all of
>>>> them had no file name defined in the open file dialog.  Putting the
>>>> file
>>>> name of the file you already have open in the open file dialog doesn't
>>>> make a lot of sense.
>>>>       
> 
> If you want to back out of changes and reload the same file....  It
> might be that the original author should be given a chance to comment on
> this, and perhaps he is on vacation?

I don't really have a preference either way.  We can leave the file name
empty or use the currently open file name in the open file dialog.  I do
have a strong preference that the behavior to be consistent among all of
the Kicad apps.  I'll wait a while and give everyone a chance to comment.

> 
> 
> I don't think we should be afraid of being different than the other apps
> you tested.  How can you be better if you are the same?   Start with the
> assumption that you are the best software developer in the world, if
> that helps establish the proper mindset, and that you are free to
> improve on the ideas that others have had before you.  Improvement means
> change and differences.  Nothing in this statement means that you cannot
> also adopt good ideas unchanged, when you decide they are good ideas. 
> But that decision needs to be made consciously.

Absolutely.  I was not suggesting that we do something just because
everyone else is doing that way.  I was merely observing how it was
being done by other applications.  The problem with doing something
different for tasks that people are familiar with (like open file
dialogs) is that you have to overcome a lot of built up inertia.  In our
case it is probably not a very big deal.  In some cases, you can have
some rather interesting reactions.  The UI changes to the latest version
of Ubuntu come quickly to mind.

Wayne

> 
> If we only mimic other's ideas, and not improve on them, then we will
> always be following, not leading.
> 
> Dick
> 
> 
> 
> _______________________________________________
> 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
> 



References