← Back to team overview

kicad-developers team mailing list archive

Re: Show in eeschema window title full/short path to open file -- patch

 

On Wed, Jul 21, 2010 at 10:22:31AM +0100, Brian Sidebotham wrote:
> The replacement adds the suffix Sheet, but not the sheet name. I think
> it would be good to keep the sheet name. So perhaps something along
> the lines of "filename/sheetname (/path/to/filename)"

Done. But with little change:
[filename sheetname] (/path/to/filedir)

I use " " (space) between file name and sheet name instead of
"/". Reason is sheetname begin from "/" and in this way we get
not nice header "filename// or filename//sheetname".

Patch in attachment.

Regards,
--
    Yury Khalyavin
=== modified file eeschema/eeredraw.cpp
--- eeschema/eeredraw.cpp	2010-03-18 20:35:29 +0000
+++ eeschema/eeredraw.cpp	2010-07-21 10:01:35 +0000
@@ -76,9 +76,15 @@
     }
     else
     {
+        /**
+         * Window title format:
+         * [filename sheetname] (/path/to/filedir)
+         */
+        wxFileName t(GetScreen()->m_FileName);
         title = wxT( "[" );
-        title << GetScreen()->m_FileName << wxT( "]  " ) << _( "Sheet" );
-        title << wxT( " " ) << m_CurrentSheet->PathHumanReadable();
+        title << t.GetName() << wxT( " " );
+        title << m_CurrentSheet->PathHumanReadable() << wxT( "]  " );
+        title << wxT( "(" ) << t.GetPath() << wxT( ")" );
         SetTitle( title );
     }
 }

Follow ups

References