Skip to content

Adding global messagebox and commandline parameter parsing classes. #2538

Open
@pgScorpio

Description

@pgScorpio

What is the current behaviour and why should it be changed?

Currently messageboxes for errors, warnings and info are created all over the code. Disadvantage is that they don't have a parent dialog and are inconsistent in message title.

Also commandline parameters are now parsed by several functions in main and passed via-via through several constructor parameters. A class accessible anywhere in the code would be more efficient and more versatile.

Describe possible approaches

All this is in preparation of the "sound-redesign"

A static messagebox class will provide messageboxes that can be opened anywhere in the code, but are always child of CClientdlg and will have a consistant title (including any clientname).

The commandline parsing functions in main will be moved to a (static) class that is accessible anywhere in the code so commandline parameters can be retrieved anywhere in the code, no need to pass then via-via through constructors.
Also we will be able to use "special" commandline parameters (normally rejected) for debugging and testing purposes.

Has this feature been discussed and generally agreed?

The commandline parsing class was already suggested in the comments in the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringNon-behavioural changes, Code cleanup

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions