comparison libgui/src/m-editor/file-editor-tab.cc @ 15981:e3873531dd7c

gui: correct tab title for new editor file if short title setting is selected * file-editor-tab.cc (update_window_title): display "unnamed" in tab title of a new file even if short title format is selected in the settings
author Torsten <ttl@justmail.de>
date Sun, 27 Jan 2013 15:50:49 +0100
parents 6c0fce0632a4
children 131d40cd805b
comparison
equal deleted inserted replaced
15980:6c0fce0632a4 15981:e3873531dd7c
659 { 659 {
660 QString title (""); 660 QString title ("");
661 if (_file_name.isEmpty () || _file_name.at (_file_name.count () - 1) == '/') 661 if (_file_name.isEmpty () || _file_name.at (_file_name.count () - 1) == '/')
662 title = UNNAMED_FILE; 662 title = UNNAMED_FILE;
663 else 663 else
664 title = _file_name; 664 {
665 if ( !_long_title ) 665 if ( _long_title )
666 { 666 title = _file_name;
667 QFileInfo file(_file_name); 667 else
668 title = file.fileName(); 668 {
669 QFileInfo file(_file_name);
670 title = file.fileName();
671 }
669 } 672 }
670 673
671 if ( modified ) 674 if ( modified )
672 { 675 {
673 emit file_name_changed (title.prepend("* ")); 676 emit file_name_changed (title.prepend("* "));