This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients terry.reedy
Date 2014-05-27.05:09:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401167354.94.0.454935095166.issue21588@psf.upfronthosting.co.za>
In-reply-to
Content
#17390 changes the title bars for (so far), shell and editor windows. While the editor window change helps me (for reasons given on the issue) and got no objection, before being pushed, from people nosy on the issue, others have found it objectionable in practice. Since no one solution satisfies all use cases, I propose to make the editor_title format user configurable. Since extra keywords are ignored, as in
  >>> "{short}".format(short='abc', long='xyz')
  'abc'
users can omit and arrange fields as they please in editor_title, which would then be called with all 3 variable field values. 
  editor_title.format(short=short, long=long, version=version)
I believe editor_title = '{short} - {long}' produces the previous title. That can be the default.

A complication is that EditorWindow is also the base window class for Shell and Output windows. The title is calculated and set in a generic
 def saved_change_hook(self):  # line 921 in 3.3
However, I believe that having non-empty short and long names is unique to editor windows (must recheck). If so. the format call could go in the second line of 
 if short and long:
   title = short + " - " + long
If untitled files were given a 'long' title of '(no file)', then they would be handled by the same clause. Explaining why a window is 'untitled' (no file to title it from) might be a benefit anyway.

Some other possible solutions: Add parameter editor=False to saved_change_hook. Make EditorWindow a subclass of a generic Base Editor and move things specific to EditorWindow to the subclass.
History
Date User Action Args
2014-05-27 05:09:14terry.reedysetrecipients: + terry.reedy
2014-05-27 05:09:14terry.reedysetmessageid: <1401167354.94.0.454935095166.issue21588@psf.upfronthosting.co.za>
2014-05-27 05:09:14terry.reedylinkissue21588 messages
2014-05-27 05:09:13terry.reedycreate