popup menu for multi-reference bookmark navigation (#crossref)#1335
Merged
Conversation
Add a user-controlled option for navigating multi-reference bookmarks: - When a bookmark key contains multiple references (semicolons, commas, or verse ranges), the user can choose between two behaviours via a new 'Open cross-references in a popup menu' toggle in the bookmark context menu. - When enabled (checked): a popup menu lists each reference individually; clicking one navigates directly to that verse. Verse ranges (e.g. Mt 15:1-9) are displayed with their full label but navigate to the first verse of the range. - When disabled (unchecked): the full key is passed to main_url_handler which displays all references in the Verse List as before. - Single references and studypad bookmarks are unaffected. - The preference is saved to and restored from the Xiphos config file under misc/crossref_popup (default: 0 = verse list behaviour).
Contributor
|
This seemed good. I will make one adjustment to provide for initialization in xml.c. |
karlkleinpaste
added a commit
that referenced
this pull request
Jul 4, 2026
Contributor
Contributor
Author
|
Ok this week I'm busy busy!! Next week I will look at this. |
Contributor
|
No sweat. The sole problem is that you still need to pass the bookmark's verse list through Sword just as is done when preparing the verse list dump in the default no-popup case. |
Contributor
Author
LAfricain
pushed a commit
to LAfricain/xiphos
that referenced
this pull request
Jul 15, 2026
- **Truncated multi-reference bookmarks**: `BackEnd::parse_verse_list()`
used `popError()` as a loop-termination condition, which also fires
when a single element in the list fails to resolve — silently
dropping every element after it, even valid ones. Switched to
indexed access (`getCount()` / `getElement()`), so one bad reference
no longer swallows the rest of a bookmark's verse list.
- **Unreadable text on dark tag colors**: the current-verse `<font
color="...">` wrapper was applied unconditionally, overriding the
contrast color already computed for the tag background. It's now
skipped whenever a tag color is active, so the computed
black/white contrast color is respected instead.
- **Major bug: verse text turning invisible for the rest of the
chapter**: the tag-color `<span>` and the current-verse/annotation
`<span><font>` were opened independently but shared a single,
under-conditioned closing statement. When a verse had a tag color
but wasn't the current verse, the highlight span was opened is
never opened but its closing tag was still emitted, corrupting the
HTML structure for every subsequent verse in the chapter. Each span
now tracks its own open/close state explicitly.
- **Strong's/morphology links ignoring computed contrast**: verse
numbers and linked words are colored via a global CSS `a:link`
rule, which overrides any `color` inherited from an ancestor
`<span>`. Added a `.tagcolor a:link { color: inherit !important }`
rule and tagged the relevant span with `class="tagcolor"` so link
text respects the computed contrast color too.
- **On/off toggle**: added "Colorize verses by folder color" as a
right-click checkbox item on the bookmarks tree (rather than
buried in Preferences), matching the existing "Popup menu for
cross-references" toggle added by crosswire#1335. Defaults to on, persists
across restarts, and takes effect immediately.
- **Status bar bookmark info on hover**: hovering (not clicking) a
verse number that belongs to a bookmark now shows "<containing
folder>: <bookmark name>" in the status bar, making it easier to
identify which of several similarly-colored bookmarks a verse
belongs to — without exposing the full nested folder path.
- The luminance/contrast calculation itself (`text_color_for_bg`)
was already correct; the "dark green on black" and "white on
white" issues were caused by other elements overriding its output,
not by the luminance formula.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add a user-controlled option for navigating multi-reference bookmarks:
When a bookmark key contains multiple references (semicolons, commas, or verse ranges), the user can choose between two behaviours via a new 'Open cross-references in a popup menu' toggle in the bookmark context menu.
When enabled (checked): a popup menu lists each reference individually; clicking one navigates directly to that verse. Verse ranges (e.g. Mt 15:1-9) are displayed with their full label but navigate to the first verse of the range.
When disabled (unchecked): the full key is passed to main_url_handler which displays all references in the Verse List as before.
Single references and studypad bookmarks are unaffected.
The preference is saved to and restored from the Xiphos config file under misc/crossref_popup (default: 0 = verse list behaviour).