Skip to content

Commit

Permalink
Merge pull request #34 from kloptops/main
Browse files Browse the repository at this point in the history
control.txt: fixed a few issues on ArkOS, updated default_theme
  • Loading branch information
kloptops authored Nov 11, 2023
2 parents 46ea038 + 84e617c commit 8d8c2cf
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 16 deletions.
2 changes: 1 addition & 1 deletion PortMaster/PortMaster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ESUDO chmod -R +x .
if [[ -e "/storage/.config/.OS_ARCH" ]] || [ "${OS_NAME}" == "JELOS" ] || [ "${OS_NAME}" == "UnofficialOS" ]; then
toolsfolderloc="/storage/roms/ports"
else
isitthera=$($GREP "title=" "/usr/share/plymouth/themes/text.plymouth")
isitthera=$(grep "title=" "/usr/share/plymouth/themes/text.plymouth")
if [[ $isitthera == *"TheRA"* ]]; then
if [ -d "/opt/tools/PortMaster/" ]; then
toolsfolderloc="/opt/tools"
Expand Down
6 changes: 5 additions & 1 deletion PortMaster/control.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ fi
SDLDBFILE="${SDL_GAMECONTROLLERCONFIG_FILE}"
[ -z "${SDLDBFILE}" ] && SDLDBFILE="${controlfolder}/gamecontrollerdb.txt"
SDLDBUSERFILE="${HOME}/.config/SDL-GameControllerDB/gamecontrollerdb.txt"
[ ! -f "${SDLDBUSERFILE}" ] && SDLDBUSERFILE="${controlfolder}/gamecontrollerdb.txt"

get_controls() {

Expand Down Expand Up @@ -142,7 +143,10 @@ fi
echo "" > /tmp/gamecontrollerdb.txt
fi

$controlfolder/mapper.txt /tmp/gamecontrollerdb.txt > /dev/null 2>&1
if [ -f "${HOME}/.config/emulationstation/es_input.cfg" ]; then
$controlfolder/mapper.txt /tmp/gamecontrollerdb.txt > /dev/null 2>&1
fi

SDLDBUSERFILE="${HOME}/.config/SDL-GameControllerDB/gamecontrollerdb.txt"

sdl_controllerconfig="$(< "${SDL_GAMECONTROLLERCONFIG_FILE}")"
Expand Down
2 changes: 1 addition & 1 deletion PortMaster/pugwash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

## -- BEGIN PORTMASTER INFO --
PORTMASTER_VERSION = '8.5.5'
PORTMASTER_VERSION = '8.5.6'
PORTMASTER_RELEASE_CHANNEL = 'beta'
## -- END PORTMASTER INFO --

Expand Down
10 changes: 5 additions & 5 deletions PortMaster/pylibs/default_theme/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,12 @@
"area": [ 0.01, 0.05, 1.0, 0.10 ],
"align": "center",
"text": "{scene.title}",
"font-size": 20,
"font-color": "general_font"
"font-size": 25,
"font-color": "list_selected"
},

"port_info": {
"area": [ 0.0, 0.1, 1.0, 0.3 ],
"area": [ 0.0, 0.15, 1.0, 0.33 ],
"image": "{featured_ports.image}"
},

Expand Down Expand Up @@ -782,15 +782,15 @@

"port_title": {
"parent": "port_info_title_area_featured",
"area": [ 0.0, 0.0, 1.0, 1.0 ],
"area": [ 0.3, 0.0, 1.0, 1.0 ],
"text": "{featured_ports.name}",
"font-size": 22,
"font-color": "list_selected",
"align": "center"
},

"featured_image": {
"area": [ 0.0, 0.2, 0.3, 0.35 ],
"area": [ 0.0, 0.2, 0.29, 0.35 ],
"image": "{featured_ports.image}",
"area[3:2|wide]": [ 0.0, 0.1, 0.3, 0.21 ]
},
Expand Down
47 changes: 39 additions & 8 deletions PortMaster/pylibs/pugscene.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,22 +432,26 @@ def __init__(self, gui):
self.tags['option_list'].reset_options()
self.tags['option_list'].add_option(None, _("System"))

self.tags['option_list'].add_option(
'runtime-manager',
_("Runtime Manager"),
description=_("Manage port runtimes."))

self.tags['option_list'].add_option(
'update-ports',
_("Update Ports"),
description=_("Update all ports and associated information"))

self.tags['option_list'].add_option(
'update-portmaster',
_("Update PortMaster"),
description=_("Force check for a new PortMaster version."))
# self.tags['option_list'].add_option(
# 'source-manager',
# _("Source Manager"),
# description=_("Manage port sources."))

self.tags['option_list'].add_option(
'runtime-manager',
_("Runtime Manager"),
description=_("Manage port runtimes."))
'release-channel',
_("Release Channel: {channel}").format(
channel=self.gui.hm.cfg_data.get('release_channel', "stable")),
description=_("Change release channel of PortMaster, either beta or stable."))

if len(self.gui.hm.get_gcd_modes()) > 0:
gcd_mode = self.gui.hm.get_gcd_mode()
Expand Down Expand Up @@ -479,7 +483,7 @@ def __init__(self, gui):
description=_("Select a theme for PortMaster."))

schemes = self.gui.themes.get_theme_schemes_list()
if len(schemes) > 0:
if len(schemes) > 1:
self.tags['option_list'].add_option(
'select-scheme',
_("Select Color Scheme"),
Expand Down Expand Up @@ -532,6 +536,33 @@ def do_update(self, events):

return True

if selected_option == 'release-channel':
channel_change = {
"stable": "beta",
"beta": "stable",
}
current_channel = self.gui.hm.cfg_data.get('release_channel', "stable")
new_channel = channel_change[current_channel]

if self.gui.message_box(
_("Are you sure you want to change the release channel from {current_channel} to {new_channel}?\n\nPortMaster will upgrade or downgrade accordingly.").format(
current_channel=current_channel,
new_channel=new_channel,
),
want_cancel=True):

self.gui.hm.cfg_data['release_channel'] = new_channel
self.gui.hm.cfg_data['update_checked'] = None
self.gui.hm.save_config()
self.gui.events.running = False

if not harbourmaster.HM_TESTING:
reboot_file = (harbourmaster.HM_TOOLS_DIR / "PortMaster" / ".pugwash-reboot")
if not reboot_file.is_file():
reboot_file.touch(0o644)

return True

if selected_option == 'toggle-music':
self.gui.hm.cfg_data['music-disabled'] = self.gui.sounds.music_is_disabled = not self.gui.sounds.music_is_disabled
self.gui.hm.save_config()
Expand Down

0 comments on commit 8d8c2cf

Please sign in to comment.