Skip to content

Commit

Permalink
- Bug fix #85 Can't enable/disable Advanced option in v5.5.0
Browse files Browse the repository at this point in the history
- A little improvement #84 UI elements not optimized for monitors with low screen resolution.
  • Loading branch information
Bing committed Jul 14, 2023
1 parent f6d3954 commit e18b12f
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 73 deletions.
150 changes: 104 additions & 46 deletions Main.py

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions advanced_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,15 @@ def _onOk(self, e):
print(f"Setting Magisk Package Name to: {self.package_name.GetValue()}")
set_magisk_package(self.package_name.GetValue())

if self.file_explorer.GetValue() != get_file_explorer():
print(f"Setting Linux File Explorer to: {self.file_explorer.GetValue()}")
set_file_explorer(self.file_explorer.GetValue())

if self.shell.GetValue() != get_linux_shell():
print(f"Setting Linux Shell to: {self.shell.GetValue()}")
set_linux_shell(self.shell.GetValue())
with contextlib.suppress(Exception):
if self.file_explorer.GetValue() != get_file_explorer():
print(f"Setting Linux File Explorer to: {self.file_explorer.GetValue()}")
set_file_explorer(self.file_explorer.GetValue())

with contextlib.suppress(Exception):
if self.shell.GetValue() != get_linux_shell():
print(f"Setting Linux Shell to: {self.shell.GetValue()}")
set_linux_shell(self.shell.GetValue())

if self.force_codepage_checkbox.GetValue():
if self.code_page.GetValue() and self.code_page.GetValue().isnumeric():
Expand Down
2 changes: 1 addition & 1 deletion build-on-mac.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ exe = EXE(pyz,
icon='images/icon-256.icns')
app = BUNDLE(exe,
name='PixelFlasher.app',
version='5.5.0.0',
version='5.5.1.0',
icon='./images/icon-256.icns',
bundle_identifier='com.badabing.pixelflasher')
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
rm -rf build dist
VERSION=5.5.0.0
VERSION=5.5.1.0
NAME="PixelFlasher"
DIST_NAME="PixelFlasher"

Expand Down
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

APPNAME = 'PixelFlasher'
CONFIG_FILE_NAME = 'PixelFlasher.json'
VERSION = '5.5.0.0'
VERSION = '5.5.1.0'
SDKVERSION = '33.0.3'
WIDTH = 1400
HEIGHT = 1040
Expand Down
31 changes: 19 additions & 12 deletions modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,25 @@ def populate_boot_list(self, sortColumn=None, sorting_direction='ASC'):
self.list.SetItemColumnImage(i, 0, -1)
i += 1

auto_resize_boot_list(self)

# disable buttons
self.config.boot_id = None
self.config.selected_boot_md5 = None
if self.list.ItemCount == 0 :
if self.config.firmware_path:
print("\nPlease Process the firmware!")
else:
print("\nPlease select a boot image!")
self.update_widget_states()
# we need to do this, otherwise the focus goes on the next control, which is a radio button, and undesired.
self.process_firmware.SetFocus()


# ============================================================================
# Function auto_resize_boot_list
# ============================================================================
def auto_resize_boot_list(self):
# auto size columns to largest text, including the header (except the last column)
cw = 0
column_widths = copy.deepcopy(self.boot_column_widths)
Expand All @@ -284,18 +303,6 @@ def populate_boot_list(self, sortColumn=None, sorting_direction='ASC'):
available_width = self.list.BestVirtualSize.Width - cw - 10
self.list.SetColumnWidth(self.list.ColumnCount - 1, available_width)

# disable buttons
self.config.boot_id = None
self.config.selected_boot_md5 = None
if self.list.ItemCount == 0 :
if self.config.firmware_path:
print("\nPlease Process the firmware!")
else:
print("\nPlease select a boot image!")
self.update_widget_states()
# we need to do this, otherwise the focus goes on the next control, which is a radio button, and undesired.
self.process_firmware.SetFocus()


# ============================================================================
# Function identify_sdk_version
Expand Down
2 changes: 1 addition & 1 deletion windows-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/DudeNr33/pyinstaller-versionfile
# create-version-file windows-metadata.yaml --outfile windows-version-info.txt
Version: 5.5.0.0
Version: 5.5.1.0
FileDescription: PixelFlasher
InternalName: PixelFlasher
OriginalFilename: PixelFlasher.exe
Expand Down
8 changes: 4 additions & 4 deletions windows-version-info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0. Must always contain 4 elements.
filevers=(5,5,0,0),
prodvers=(5,5,0,0),
filevers=(5,5,1,0),
prodvers=(5,5,1,0),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
Expand All @@ -32,12 +32,12 @@ VSVersionInfo(
u'040904B0',
[StringStruct(u'CompanyName', u''),
StringStruct(u'FileDescription', u'PixelFlasher'),
StringStruct(u'FileVersion', u'5.5.0.0'),
StringStruct(u'FileVersion', u'5.5.1.0'),
StringStruct(u'InternalName', u'PixelFlasher'),
StringStruct(u'LegalCopyright', u''),
StringStruct(u'OriginalFilename', u'PixelFlasher.exe'),
StringStruct(u'ProductName', u'PixelFlasher'),
StringStruct(u'ProductVersion', u'5.5.0.0')])
StringStruct(u'ProductVersion', u'5.5.1.0')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down

0 comments on commit e18b12f

Please sign in to comment.