Skip to content

Commit fa00307

Browse files
committed
✨ feat: feat: replace zenity with GTK4/Adwaita and add Orca accessibility
- Create gtk_dialog.py as universal GTK4/Adw CLI dialog utility (progress, question, error, info, list subcommands) - Rewrite biglinux-verify-md5sum from bash/zenity to Python GTK4/Adw with Adw.StatusPage, Adw.ToolbarView, HeaderBar, Stack transitions - Replace all 8 zenity calls in calamares-biglinux with gtk_dialog.py - Update services.py to call the new Python verify tool - Add accessibility.py module for calamares (announce, set_label, set_description, set_labelled_by, start_orca) - Add Orca accessibility to all calamares pages: window.py (nav buttons, page transitions), widgets.py (option cards), main_page.py (info bar, forum link), maintenance_page.py (cards), minimal_page.py (spinner, listbox, switches, package count), tips_page.py (preferences page) - Add Super+Alt+S keyboard shortcut to launch Orca in app.py - Remove obsolete scripts: md5error.sh, biglinux-verify-md5sum.sh - Remove empty script/ directory - Remove zenity from PKGBUILD depends (no longer needed)
1 parent f9e79ab commit fa00307

15 files changed

Lines changed: 1123 additions & 254 deletions

File tree

biglinux-livecd/usr/bin/biglinux-verify-md5sum

Lines changed: 397 additions & 100 deletions
Large diffs are not rendered by default.

biglinux-livecd/usr/bin/calamares-biglinux

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
# Package: biglinux-livecd
88
#
99
# Dependencies:
10-
# - zenity (GUI dialogs)
11-
# - python3 (installer interface)
10+
# - python3 (installer interface & GTK4 dialogs)
1211
# - calamares-manjaro (installation backend)
1312
# - curl (log upload)
1413
#===============================================================================
@@ -32,19 +31,25 @@ elif [[ -f /usr/bin/gnome-text-editor ]]; then
3231
text_editor="gnome-text-editor"
3332
fi
3433

34+
#-------------------------------------------------------------------------------
35+
# GTK4 Dialog Helper
36+
#-------------------------------------------------------------------------------
37+
GTK_DIALOG="python3 /usr/share/biglinux/calamares/gtk_dialog.py"
38+
3539
#-------------------------------------------------------------------------------
3640
# Wait for MD5 Verification (if running)
3741
#-------------------------------------------------------------------------------
3842
if [[ -n "$(ps -e | grep biglinux-verify)" ]]; then
39-
windowID="$(xprop -root '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"
40-
sleep 600 | zenity --attach="$windowID" --width=300 --progress --title=$"Please wait..." --pulsate --no-cancel --auto-close --text $"Checking the integrity of the download and storage device..." &
43+
sleep 600 | $GTK_DIALOG progress --title=$"Please wait..." --pulsate --no-cancel --auto-close --text $"Checking the integrity of the download and storage device..." &
4144
fi
4245

4346
while [[ -n "$(ps -e | grep biglinux-verify)" ]]; do
4447
sleep 1
4548
done
4649

47-
killall zenity
50+
# Kill the waiting dialog if still open
51+
kill %1 2>/dev/null
52+
wait %1 2>/dev/null
4853

4954
#-------------------------------------------------------------------------------
5055
# Verify ISO Checksum
@@ -60,11 +65,11 @@ fi
6065
# Alert if ISO is Older Than 30 Days
6166
#-------------------------------------------------------------------------------
6267
if [[ "$(echo $(( $(date +%s) / 86400 )))" -gt "$(( $(cat /etc/big-release | grep UNIX_TIMESTAMP= | cut -d "=" -f2) + 30 ))" ]] && ! grep -qi community /etc/os-release; then
63-
zenity --question \
68+
$GTK_DIALOG question \
6469
--icon-name=emblem-warning \
6570
--width=500 \
6671
--title=$"Outdated Version" \
67-
--text=$"<b>Do you want to proceed with the installation of this old version anyway?</b>\n\nBigLinux is a system with weekly updates and this version was released more than a month ago.\nWe recommend downloading a more recent version." \
72+
--text=$"Do you want to proceed with the installation of this old version anyway? BigLinux is a system with weekly updates and this version was released more than a month ago. We recommend downloading a more recent version." \
6873
--ok-label=$"Continue" \
6974
--cancel-label=$"Close"
7075

@@ -337,17 +342,12 @@ if [[ -d /sys/firmware/efi ]] && [[ "$(cat /tmp/efi-partitions)" = "" ]]; then
337342
PARTITION=LEGACY
338343

339344
TEXT_01=$"Do you want to proceed with the installation in EFI mode?"
340-
TEXT_02=$"The current boot is using <span color='#CC2222'>EFI</span> mode, but I did not find any EFI partition on this computer.
341-
342-
If this computer already has another system installed and you intend
343-
to keep it installed, you will probably need to change the
344-
configuration in the BIOS to boot in Legacy mode, also
345-
called BIOS mode."
346-
zenity --question \
345+
TEXT_02=$"The current boot is using EFI mode, but I did not find any EFI partition on this computer. If this computer already has another system installed and you intend to keep it installed, you will probably need to change the configuration in the BIOS to boot in Legacy mode, also called BIOS mode."
346+
$GTK_DIALOG question \
347347
--icon-name=drive-harddisk \
348348
--width=500 \
349349
--title=$"Install the system" \
350-
--text="<b>$TEXT_01</b>\n\n$TEXT_02" \
350+
--text="$TEXT_01 $TEXT_02" \
351351
--ok-label=$"Continue" \
352352
--cancel-label=$"Close"
353353

@@ -361,15 +361,12 @@ if [[ ! -d /sys/firmware/efi ]] && [[ "$(cat /tmp/efi-partitions)" != "" ]]; the
361361
LIVEBOOT=LEGACY
362362
PARTITION=EFI
363363
TEXT_03=$"Do you want to proceed with the installation in Legacy/BIOS mode?"
364-
TEXT_04=$"The current boot is using <span color='#CC2222'>Legacy/BIOS</span> mode, but I found at least one EFI partition on this computer.
365-
366-
For the installation to be successful, you will probably need to
367-
change the configuration in the BIOS to boot in EFI or UEFI mode."
368-
zenity --question \
364+
TEXT_04=$"The current boot is using Legacy/BIOS mode, but I found at least one EFI partition on this computer. For the installation to be successful, you will probably need to change the configuration in the BIOS to boot in EFI or UEFI mode."
365+
$GTK_DIALOG question \
369366
--icon-name=drive-harddisk \
370367
--width=500 \
371368
--title=$"Install the system" \
372-
--text="<b>$TEXT_03</b>\n\n$TEXT_04" \
369+
--text="$TEXT_03 $TEXT_04" \
373370
--ok-label=$"Continue" \
374371
--cancel-label=$"Close"
375372

@@ -435,7 +432,7 @@ if [[ -e "/tmp/start_calamares" ]]; then
435432
sudo -u $user curl -X POST --data-binary "@/home/$user/calamares_error.log" \
436433
-H "Content-Type: application/octet-stream" \
437434
"https://filebin.net/$binId/$fileName" 2>/dev/null | tee "/home/$user/transfer.url" | \
438-
zenity --modal --progress --pulsate --no-cancel --auto-close --text $"Sending, please wait..."
435+
$GTK_DIALOG progress --pulsate --no-cancel --auto-close --text $"Sending, please wait..."
439436

440437
# Extract bin ID from response and construct URL
441438
responseBin=$(cat "/home/$user/transfer.url" | grep -o '"bin":"[^"]*"' | cut -d'"' -f4)
@@ -459,19 +456,19 @@ if [[ -e "/tmp/start_calamares" ]]; then
459456
sudo -u $user falkon "$fileUrl"
460457
else
461458
# No browser found - display URL to user
462-
zenity --info \
459+
$GTK_DIALOG info \
463460
--title=$"Log Sent" \
464-
--text=$"Log successfully sent!\n\nURL: $fileUrl\n\nYou can use this URL to share the log." \
461+
--text=$"Log successfully sent! URL: $fileUrl You can use this URL to share the log." \
465462
--width=400
466463
fi
467464
}
468465

469466
# Handle specific efibootmgr error (EFI entry write failure)
470467
if grep -q 'grub-install: error: efibootmgr failed to register the boot entry: Input/output error.' /home/$user/calamares_error.log; then
471-
zenity --question \
468+
$GTK_DIALOG question \
472469
--width=480 \
473470
--title=$"calamares LOG" \
474-
--text=$"It was not possible to write the EFI entry to the motherboard, likely due to insufficient space.\n\nCheck the EFI manager for any entries that can be deleted and try installing the system again." \
471+
--text=$"It was not possible to write the EFI entry to the motherboard, likely due to insufficient space. Check the EFI manager for any entries that can be deleted and try installing the system again." \
475472
--ok-label=$"Open the EFI manager" \
476473
--cancel-label=$"Close"
477474

@@ -481,18 +478,18 @@ if [[ -e "/tmp/start_calamares" ]]; then
481478
fi
482479

483480
# Prompt user for log action (view/send/close)
484-
log_action=$(zenity --list \
481+
log_action=$($GTK_DIALOG list \
485482
--width=480 \
486483
--height=350 \
487484
--title="Calamares LOG" \
488-
--text=$"Do you want to view or send the installation log file to the cloud?\nGenerate a link to send in support groups." \
485+
--text=$"Do you want to view or send the installation log file to the cloud? Generate a link to send in support groups." \
489486
--radiolist \
490487
--hide-column=2 \
491488
--print-column=2 \
492489
--column="" --column="ID" --column=$"Action" \
493-
TRUE "open" $"Open" \
494-
FALSE "send" $"Send to the cloud" \
495-
FALSE "close" $"Close")
490+
--row TRUE --row "open" --row $"Open" \
491+
--row FALSE --row "send" --row $"Send to the cloud" \
492+
--row FALSE --row "close" --row $"Close")
496493

497494
echo "log action: $log_action"
498495
case "$log_action" in

0 commit comments

Comments
 (0)