847 // up to date. |
847 // up to date. |
848 updateFileList(); |
848 updateFileList(); |
849 return; |
849 return; |
850 } |
850 } |
851 |
851 |
852 str name; |
|
853 if (f->name() == "") |
|
854 name = "<anonymous>"; |
|
855 else |
|
856 name = basename (f->name()); |
|
857 |
|
858 if (f == LDFile::current()) |
852 if (f == LDFile::current()) |
859 ui->fileList->setCurrentItem (f->listItem()); |
853 ui->fileList->setCurrentItem (f->listItem()); |
860 |
854 |
861 if (f->implicit()) |
855 if (f->implicit()) |
862 f->listItem()->setForeground (QColor (96, 96, 96)); |
856 f->listItem()->setForeground (QColor (96, 96, 96)); |
863 |
857 |
864 f->listItem()->setText (name); |
858 f->listItem()->setText (f->getShortName()); |
865 f->listItem()->setIcon (f->hasUnsavedChanges() ? getIcon ("file-save") : QIcon()); |
859 f->listItem()->setIcon (f->hasUnsavedChanges() ? getIcon ("file-save") : QIcon()); |
866 } |
860 } |
867 |
861 |
868 void ForgeWindow::beginAction (QAction* act) { |
862 void ForgeWindow::beginAction (QAction* act) { |
869 // Open the history so we can record the edits done during this action. |
863 // Open the history so we can record the edits done during this action. |