SASM icon indicating copy to clipboard operation
SASM copied to clipboard

Allow for other source code filetypes

Open SirClickALot opened this issue 2 years ago • 5 comments

I would like to be able to configure SASM so that it can browse and open .s files (source files) as well as the default .asm files?

Is that configurable somewhere?

Should we add a configuration option to set up other extensions perhaps?

Thank you.

SirClickALot avatar Jul 20 '23 11:07 SirClickALot

It seems you can set this up in your OS settings.

Dman95 avatar Jul 20 '23 12:07 Dman95

Apologies for being unclear here but I was asking about associating filetypes with applications, I was referring to the (limited to only one - .asm) types on the Open file dialogue window.

Thanks

SirClickALot avatar Jul 20 '23 12:07 SirClickALot

For now, you can select the "All files" option. Perhaps a separate option for .s files will be added in future versions.

Dman95 avatar Jul 20 '23 13:07 Dman95

@SirClickALot To accomplish this, you'll need to tweak the openFile method within the Mainwindow class found in mainwindow.cpp at line 596. Specifically, you can adjust line 598 to allow for browsing and opening .s/.S source files by updating it as follows:

QString fileName = QFileDialog::getOpenFileName(this, tr("Open file"), saveOpenDirectory,
                                                    tr("Assembler source files (*.asm *.S *.s);;All files (*)"));

ABHIJITH-EA avatar Feb 13 '24 06:02 ABHIJITH-EA

422

faezlool avatar Apr 04 '24 07:04 faezlool