Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Fix showing Current slot suffix, current slot and Switch Slot button
Browse files Browse the repository at this point in the history
  • Loading branch information
likeadragonmaid committed Feb 25, 2023
1 parent 299e752 commit adc34d7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion manifest.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"desktop": "switch-my-slot.desktop"
}
},
"version": "0.5",
"version": "0.6",
"maintainer": "Shoko <shou@disroot.org>",
"framework" : "ubuntu-sdk-20.04"
}
4 changes: 2 additions & 2 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ msgid "HAL Version: "
msgstr "Version de HAL: "

#: ../qml/Main.qml:37
msgid "App Version: v0.5"
msgstr "Version de l'application: v0.5"
msgid "App Version: v0.6"
msgstr "Version de l'application: v0.6"

#: ../qml/Main.qml:45
msgid "Number of slots: "
Expand Down
4 changes: 2 additions & 2 deletions po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ msgid "HAL Version: "
msgstr "HAL-versie: "

#: ../qml/Main.qml:37
msgid "App Version: v0.5"
msgstr "Appversie: 0.5"
msgid "App Version: v0.6"
msgstr "Appversie: 0.6"

#: ../qml/Main.qml:45
msgid "Number of slots: "
Expand Down
4 changes: 2 additions & 2 deletions po/switch-my-slot.shouko.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: switch-my-slot.shouko\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-12 22:58+0000\n"
"POT-Creation-Date: 2023-02-25 00:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -26,7 +26,7 @@ msgid "HAL Version: "
msgstr ""

#: ../qml/Main.qml:37
msgid "App Version: v0.5"
msgid "App Version: v0.6"
msgstr ""

#: ../qml/Main.qml:45
Expand Down
2 changes: 1 addition & 1 deletion qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MainView {
top: halVersionLabel.bottom
}
id: appVersionLabel
text: i18n.tr('App Version: v0.5')
text: i18n.tr('App Version: v0.6')
}

Label {
Expand Down
16 changes: 8 additions & 8 deletions src/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@

stream = os.popen(prefix + 'get-current-slot')
output = stream.read()
temp = output
temp = (int(output))

if temp.__eq__(0):
if (temp == 0):
pyotherside.send('currentSlot', "A")

elif s1.__eq__(1):
elif (temp == 1):
pyotherside.send('currentSlot', "B")

stream = os.popen(prefix + 'get-suffix ' + temp)
stream = os.popen(prefix + 'get-suffix ' + str(temp))
output = stream.read()
pyotherside.send('currentSlotSuffix', output)

def switchSlotFunc():
if temp.__eq__(0):
os.system(prefix + 'set-active-boot-slot ' + '1 && sudo reboot') # will only reboot if no password is set on device
elif temp.__eq__(1):
os.system(prefix + 'set-active-boot-slot ' + '0 && sudo reboot')
if (temp == 0):
os.system(prefix + 'set-active-boot-slot 1 && sudo reboot') # will only reboot if no password is set on device
elif (temp == 1):
os.system(prefix + 'set-active-boot-slot 0 && sudo reboot')

0 comments on commit adc34d7

Please sign in to comment.