Skip to content

Commit

Permalink
Bei einem 'Create New Image' wird der aktuelle Imagetyp im Dialogtite…
Browse files Browse the repository at this point in the history
…l angezeigt.
  • Loading branch information
ProgrammingHobby committed Oct 29, 2022
1 parent 77d06dd commit 059ea5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CIFE/Sources/CreateFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ void CreateFileDialog::setImageFileName(wxString fileName) {
editImageFile->SetInsertionPoint(fileName.length());
}

// --------------------------------------------------------------------------------
void CreateFileDialog::setImageType(wxString typeName) {
wxString title = "New Image : " + typeName;
this->SetTitle(title);
}

// --------------------------------------------------------------------------------
wxString CreateFileDialog::getImageFileName() {
return (editImageFile->GetValue());
Expand Down
1 change: 1 addition & 0 deletions CIFE/Sources/CreateFileDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class CreateFileDialog : public Ui_CreateFileDialog {

public: // Methods
void setImageFileName(wxString fileName);
void setImageType(wxString typeName);
wxString getImageFileName();
wxString getBootTrackFile();
wxString getFileSystemLabel();
Expand Down
1 change: 1 addition & 0 deletions CIFE/Sources/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ void MainWindow::onImageFileClose(wxCommandEvent &event) {
void MainWindow::onImageFileNew(wxCommandEvent &event) {
CreateFileDialog *dialog = new CreateFileDialog(this, cpmfs->getBootTracksEnabled(),
true);
dialog->setImageType(comboboxImageType->GetValue());

if (dialog->ShowModal() == wxID_OK) {
editImageFile->SetValue(dialog->getImageFileName());
Expand Down

0 comments on commit 059ea5e

Please sign in to comment.