Skip to content

Databases list: “read only” behaviour #8

@tmillross

Description

@tmillross

This pseudocode relates to the list of databases visible near the top of the right-hand panel, for a particular selected project. Follows from #7 and provides more detail for coding. Duplicates and extends this issue found on upstream repo.

  1. Read-only checkbox is visible for all rows in the database list (done)
  2. On open, read settings file entries to determine checked state (default=read-only)
  3. On click:
    a. Send signal. Slot/method design described below for 2 possible state changes
    b. Change checked state

Setting a database read-only = true:

  1. Find open activities relating to the checked db in the activity_cache
  2. Call appropriate method to set their tables/rows/cells to read-only and set the Read-Only checkbox to greyed-out (as described in separate upcoming issue by @AnjeKnottnerus )
  3. Activities inventory context menu: Options for “Edit activity” and “New activity” become greyed out (make this change here or on right-click?)
  4. Top-right toolbar buttons: Options for “Edit activity” and “New activity” become greyed out (make this change here or on right-click?)
  5. Insert or update entry in ab_settings file
  6. Checkbox -> checked

Setting a database read-only = false.

  1. Find open activities relating to the checked db in the activity_cache
  2. Set read-only checkbox of open panels to active (not greyed out)
  3. Activities inventory list: Options for “Edit activity” and “New activity” become active again (as above, may be handled on right-click)
  4. Top-right toolbar buttons: Options for “Edit activity” and “New activity” become active again (as above, editability of currently selected activity would determine whether these are active)
  5. Update settings file entry to read-only = false
  6. Checkbox -> unchecked

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions