Commit b235771
authored
Fix GTK critical error causing freeze when changing Bible books (#1272)
Fixed a critical bug where Xiphos would freeze when attempting to change
Bible books, throwing the GTK error:
"gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed"
Root cause: The parallel_vbox widget was being packed into widgets.page
twice - once during creation in _create_parallel_tab() and again by the
caller in tabbed_browser.c during session restore. GTK does not allow a
widget to be added to a container when it already has a parent.
Remove the automatic packing of parallel_vbox into widgets.page from
_create_parallel_tab(). The function now only creates and returns the
widget, following GTK best practices of separating widget creation from
placement.
Uncomment a gtk_box_pack_start() call to ensure the parallel tab widget
is properly packed when opening a parallel view in a new tab.
The widget is now packed exactly once by the caller, preventing the
"widget already has a parent" error and eliminating the freeze.1 parent 5dd72ea commit b235771
2 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
| 230 | + | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1467 | 1467 | | |
1468 | 1468 | | |
1469 | 1469 | | |
1470 | | - | |
1471 | | - | |
| 1470 | + | |
| 1471 | + | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | 1474 | | |
| |||
0 commit comments