Code structure for error alert variants is confusing

Bug #1043392 reported by Matthew Paul Thomas
8
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.

Revision history for this message
Evan (ev) wrote :

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.

Changed in apport:
assignee: nobody → Evan Dandrea (ev)
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.