Skip to content

Commit

Permalink
removed all test options
Browse files Browse the repository at this point in the history
In this commit I removed all the test options, which included many of the kivy built-in SettingItem types as well as our 'hard-shutdown', which is not a trigger that we've actually implemented yet.

At this point I think we may have finished with this feature.

TODO: test that the triggers actually work on all three platforms. If all is well, then merge to dev.
  • Loading branch information
maltfield committed Jun 11, 2023
1 parent a9ad9b5 commit c965cab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 58 deletions.
7 changes: 0 additions & 7 deletions src/buskill_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,13 +1127,6 @@ def build_config(self, config):
Config.read( self.bk.CONF_FILE )
Config.setdefaults('buskill', {
'trigger': 'lock-screen',
# TODO: remove these (just for testing future options & types)
'drive': 'all',
'flag': True,
'count': 42,
'which': "medium",
'name': "John Smith",
'file': "/tmp/some_file"
})
Config.set('kivy', 'exit_on_escape', '0')
Config.set('input', 'mouse', 'mouse,multitouch_on_demand')
Expand Down
55 changes: 4 additions & 51 deletions src/packages/buskill/settings_buskill.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,9 @@
"desc": "Choose what happens when BusKill's cable is disconnected",
"section": "buskill",
"key": "trigger",
"options": ["lock-screen", "soft-shutdown", "hard-shutdown"],
"options_long": ["BusKill will lock your screen", "BusKill will immediately initiate a soft shutdown sequence, May cause data loss!","BusKill will immediately shutdown your computer as fast as possible. May cause data corruption!"],
"confirmation": ["", "This selection may cause data loss! Are you sure you want to continue?\n\nThe 'soft-shutdown' trigger will immediately cause your computer to shutdown. This could cause you to lose work if, for example, you're writing an email or typing a text document.\n\nAre you sure you want to select the 'soft-shutdown' trigger, despite the risk of data loss?", "This selection may cause data corruption!\n\nThe 'hard-shutdown' trigger will immediately shutdown your computer as-fast-as-possible, byapssing your operating system's normal shutdown procedure. Doing this may cause permanent corruption of files on your computer. Depending on your filesystem and the files that become corrupt, this could cause signifcant harm to your system, including the inability to boot your computer and therefore the loss of all your data.\n\nAre you sure you want to select the 'hard-shutdown' trigger, despite the risk of data corruption?"],
"options_icons": ["\ue1bf","\ue62a","\ue201"]
},
{
"type": "complex-options",
"title": "BusKill USB Drive",
"desc": "Choose which drive should cause BusKill to trigger when BusKill is armed.",
"section": "buskill",
"key": "drive",
"options": ["v1","v2"],
"options_long": ["v1 long description", "v2 long description" ],
"options_icons": ["\ue8b8","\ue8b8"],
"confirmation": ["", "", ""]
},
{
"type": "bool",
"title": "On or Off?",
"desc": "Test of boolean types",
"section": "buskill",
"key": "flag"
},
{
"type": "numeric",
"title": "How many?",
"desc": "Test of numeric type",
"section": "buskill",
"key": "count"
},
{
"type": "options",
"title": "Which one?",
"desc": "Test of built-in kivy 'options' type",
"section": "buskill",
"key": "which",
"options": ["short","medium","tall"]
},
{
"type": "string",
"title": "What's your name?",
"desc": "Test of string type",
"section": "buskill",
"key": "name"
},
{
"type": "path",
"title": "Where is it?",
"desc": "Test of path type",
"section": "buskill",
"key": "file"
"options": ["lock-screen", "soft-shutdown"],
"options_long": ["BusKill will lock your screen", "BusKill will immediately initiate a soft shutdown sequence, May cause data loss!"],
"confirmation": ["", "This selection may cause data loss! Are you sure you want to continue?\n\nThe 'soft-shutdown' trigger will immediately cause your computer to shutdown. This could cause you to lose work if, for example, you're writing an email or typing a text document.\n\nAre you sure you want to select the 'soft-shutdown' trigger, despite the risk of data loss?" ],
"options_icons": ["\ue1bf","\ue62a"]
}
]

0 comments on commit c965cab

Please sign in to comment.