Code structure for error alert variants is confusing
Bug #1043392 reported by
Matthew Paul Thomas
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
Triaged
|
Medium
|
Evan |
Bug Description
While making changes to gtk/apport-gtk, I noticed that the variations of icon, primary text, secondary text, checkbox presence and text, and buttons for various error types are mingled together in large if/elif/else blocks.
This makes it hard to add a new error type, or even tell whether a particular type has been implemented yet (e.g. bug 1033902).
I'm no programmer, but I'd expect each alert variation to be a subclass of a general error alert class, with "icon", "primary_text", "secondary_text", and "buttons" parameters.
To post a comment you must log in.
This was my fault. I'm assigning it to myself so I don't forget about it, but if someone else wants to pick this up, by all means go for it.