2731 |
set_title(_("File Properties")); |
set_title(_("File Properties")); |
2732 |
eName.set_width_chars(50); |
eName.set_width_chars(50); |
2733 |
|
|
2734 |
|
connect(eFileFormat, &PropDialog::set_FileFormat); |
2735 |
connect(eName, &DLS::Info::Name); |
connect(eName, &DLS::Info::Name); |
2736 |
connect(eCreationDate, &DLS::Info::CreationDate); |
connect(eCreationDate, &DLS::Info::CreationDate); |
2737 |
connect(eComments, &DLS::Info::Comments); |
connect(eComments, &DLS::Info::Comments); |
2793 |
quitButton.grab_focus(); |
quitButton.grab_focus(); |
2794 |
quitButton.signal_clicked().connect( |
quitButton.signal_clicked().connect( |
2795 |
sigc::mem_fun(*this, &PropDialog::hide)); |
sigc::mem_fun(*this, &PropDialog::hide)); |
|
eFileFormat.signal_value_changed().connect( |
|
|
sigc::mem_fun(*this, &PropDialog::onFileFormatChanged)); |
|
2796 |
|
|
2797 |
quitButton.show(); |
quitButton.show(); |
2798 |
vbox.show(); |
vbox.show(); |
2804 |
void PropDialog::set_file(gig::File* file) |
void PropDialog::set_file(gig::File* file) |
2805 |
{ |
{ |
2806 |
m_file = file; |
m_file = file; |
2807 |
|
update(file->pInfo); |
2808 |
|
|
2809 |
// update file format version combo box |
// update file format version combo box |
2810 |
const std::string sGiga = "Gigasampler/GigaStudio v"; |
const std::string sGiga = "Gigasampler/GigaStudio v"; |
2820 |
std::vector<const char*> texts; |
std::vector<const char*> texts; |
2821 |
for (int i = 0; i < txts.size(); ++i) texts.push_back(txts[i].c_str()); |
for (int i = 0; i < txts.size(); ++i) texts.push_back(txts[i].c_str()); |
2822 |
texts.push_back(NULL); values.push_back(0); |
texts.push_back(NULL); values.push_back(0); |
2823 |
|
|
2824 |
|
update_model++; |
2825 |
eFileFormat.set_choices(&texts[0], &values[0]); |
eFileFormat.set_choices(&texts[0], &values[0]); |
2826 |
eFileFormat.set_value(major); |
eFileFormat.set_value(major); |
2827 |
|
update_model--; |
2828 |
} |
} |
2829 |
|
|
2830 |
void PropDialog::onFileFormatChanged() { |
void PropDialog::set_FileFormat(int value) |
|
const int major = eFileFormat.get_value(); |
|
|
if (m_file) m_file->pVersion->major = major; |
|
|
} |
|
|
|
|
|
void PropDialog::set_info(DLS::Info* info) |
|
2831 |
{ |
{ |
2832 |
update(info); |
m_file->pVersion->major = value; |
2833 |
} |
} |
2834 |
|
|
2835 |
|
|
3065 |
file_is_changed = false; |
file_is_changed = false; |
3066 |
|
|
3067 |
propDialog.set_file(gig); |
propDialog.set_file(gig); |
|
propDialog.set_info(gig->pInfo); |
|
3068 |
|
|
3069 |
instrument_name_connection.block(); |
instrument_name_connection.block(); |
3070 |
int index = 0; |
int index = 0; |