Feature #12247

Remove lists of if clauses

Added by alant 2017-02-17 14:27:39 . Updated 2020-04-15 06:01:38 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2017-02-17
Due date:
% Done:

100%

Feature Branch:
greeter:feature/12247-replace-lists-of-if
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Welcome Screen
Deliverable for:

Description

The greeter code has several ugly lists of if clauses:

        if row == self.listboxrow_text:
            tailsgreeter.utils.popover_toggle(self.text_setting.popover)
        elif row == self.listboxrow_keyboard:
            tailsgreeter.utils.popover_toggle(self.keyboard_setting.popover)
        elif row == self.listboxrow_formats:
            tailsgreeter.utils.popover_toggle(self.format_setting.popover)
        elif row == self.listboxrow_tz:
            tailsgreeter.utils.popover_toggle(self.timezone_setting.popover)

They should be replaced by some metaprogramming, making it easier to add new settings.


Subtasks


History

#1 Updated by alant 2017-02-17 14:44:25

  • Subject changed from Use metaprogrammation to replace lists of if clauses to Remove lists of if clauses

#2 Updated by alant 2017-02-17 15:07:10

  • Assignee changed from alant to intrigeri
  • QA Check set to Ready for QA
  • Feature Branch set to greeter:feature/12247-replace-lists-of-if

#3 Updated by alant 2017-02-17 15:43:27

  • Status changed from New to In Progress

#4 Updated by intrigeri 2017-02-18 07:45:04

  • Target version set to Tails_3.0

#5 Updated by intrigeri 2017-03-17 12:15:25

  • Description updated

#6 Updated by intrigeri 2017-03-17 12:16:10

  • Assignee changed from intrigeri to alant
  • % Done changed from 0 to 30
  • QA Check changed from Ready for QA to Dev Needed

conflicts with current feature/stretch

#7 Updated by intrigeri 2017-03-18 12:34:35

  • Priority changed from Low to Normal

(3.0 blockers are now Elevated or higher)

#8 Updated by alant 2017-03-18 17:42:04

  • Assignee changed from alant to intrigeri
  • % Done changed from 30 to 50
  • QA Check changed from Dev Needed to Ready for QA

> conflicts with current feature/stretch

It now applies on feature/stretch, and works when installing the .deb in a booted ISO.

#9 Updated by intrigeri 2017-03-18 18:19:07

  • Assignee changed from intrigeri to alant
  • QA Check changed from Ready for QA to Dev Needed

alant wrote:
> > conflicts with current feature/stretch
>
> It now applies on feature/stretch

You probably forgot to push your conflict resolution.

#10 Updated by intrigeri 2017-03-18 19:05:47

  • Status changed from In Progress to Resolved
  • Assignee deleted (alant)
  • % Done changed from 50 to 100
  • QA Check changed from Dev Needed to Pass

Released in 1.0.0~beta6. Thanks for caring about the code sanity!

#11 Updated by intrigeri 2017-05-27 07:01:29

#12 Updated by intrigeri 2020-04-15 06:01:38

  • Affected tool changed from Greeter to Welcome Screen