Commit Graph

73 Commits

Author SHA1 Message Date
Lirusaito
8fef329437 Fix UB, thanks Router and Clang for the heads up 2019-06-29 21:23:07 -04:00
Lirusaito
bf176ffd4d Prevent the texteditor from parsing highlights when it shouldn't 2019-05-11 22:49:56 -04:00
Lirusaito
6a7695a8f0 Refactor appendAndHighlightTextImpl's Highlight impl and fix selection 2019-05-11 22:40:17 -04:00
Lirusaito
2a40ca6295 LLTextEditor's setText and setWText shouldn't always enforce linking 2019-05-10 16:45:20 -04:00
Lirusaito
93af7491ee Attempt at fixing beware's selection lost bug once and for all 2019-05-07 01:07:48 -04:00
Lirusaito
2075d92369 Fix crash when SinguReplaceLinks is false reported by Beware 2019-05-07 00:33:39 -04:00
Lirusaito
b34021abd5 Fix Beware's notecard embed crash by immediately reflowing upon remove
We'll want to revisit this later and more optimally fix it.
2019-04-28 06:22:42 -04:00
Lirusaito
190e3e8c2f Fix link replacement being enforced improperly, thanks Beware! 2019-04-21 22:06:33 -04:00
Lirusaito
1244d5df03 Fix the chat bug, save the world~
Also fix badly written parts of LL stuff synced.
2019-04-19 01:16:27 -04:00
Lirusaito
8979f12111 Fix the chat bug, I think... also momre text base sync, yay! 2019-04-18 14:45:21 -04:00
Lirusaito
7fc90d3dce Feature Request: Add SinguAlwaysUnderlineLinks to always underline links 2019-04-11 04:15:12 -04:00
Lirusaito
7be177e9ab Fix a text editor bug with selection being lost when url segments updated
By doing it the right way, and calculating where the selection should be
after the change is applied.
Also no longer consider text editor modified if nothing was changed.
Also update cursor position so it doesn't move to the wrong place on update
2019-03-26 05:10:21 -04:00
Lirusaito
f0b3527bb5 Fix crash on saving notecards noticed by Torric 2019-03-06 15:58:19 -05:00
Lirusaito
4fdc1f3311 hide_border should save to xml 2019-03-05 13:50:36 -05:00
Lirusaito
2493c401f9 Force replacing registered urls everywhere that's not from another user
I think I covered all my bases:
Local Chat, IMs/Group/Conference Chats
Script Dialogs
Group Notices

There are a few others maybe, like notifications EMs can spawn but if
those are intentionally tricking people, grid owners should be informed.
2019-02-09 16:51:15 -05:00
Lirusaito
0478d90578 Right click linked names/groups/objects in chat, copy key 2019-02-03 17:38:43 -05:00
Lirusaito
0d22841da1 Woops, that's some inverted logic! 2019-02-01 10:13:07 -05:00
Lirusaito
d20dbaa7d2 Feature Request: Allow use of a separate color for linked usernames.
The setting is HTMLAgentColor, I will not add this to preferences for now.

Note that usernames before the colon in the chat are cached,
set before login to change it for everyone or relog.
Also hook up getStyle() for the registered urls,
cleans up some code in lltexteditor.
2019-02-01 08:12:12 -05:00
Inusaito Sayori
dd7ab5a0ff Underline all registered urls on hover 2019-01-21 08:48:54 -05:00
Lirusaito
865061faf0 Don't split link underlines, since we're not even using the query color 2019-01-20 15:46:29 -05:00
Lirusaito
02c06f1654 Don't leave links underlined if the mouse leaves 2019-01-20 15:45:52 -05:00
Lirusaito
8a08964755 Request: Underline links when hovering over them, for distinguishability 2019-01-20 14:25:56 -05:00
Lirusaito
d8c95f844f Add url menus to the text editor!!
Hey there, Alpha User! This commit is riddled with complex words,
but here's what matters to you: This adds the ability to right click a
Name, URL, SLURL, or Object Name, or even an Email, and get some awesome
options just like v3 gets! Buuuut, unlike V3, if there was something else
you might want to do, we've still got you covered in the same menu!!

Also make the text editor's default menu an xml
Synced a lot from upstream
Unlike Upstream, actually combine the base menu with the url menu if we have a selection
Unlike Upstream and previously, don't create a new menu per text editor
Unlike Upstream, don't create a separate FriendSignal and ObjectBlockedSignal per text editor we need it in!!
Unlike Upstream, always show a Select All option
2019-01-20 09:40:56 -05:00
Lirusaito
1317f26d04 Remove debug spew, my bad 2019-01-20 09:24:44 -05:00
Lirusaito
7112e163e6 Update our url stuffs!
Adds support for JIRA link labels from Alchemy. (Made less of a mess by me)
Adds support for x-grid-info, the future of x-grid-info-location from Alchemy.
Updates uriparser latest from Alchemy.
Updates llstring to be more in line with upstream Alchemy.
Fixes our LLURI Implementation
Updates LLURLAction to modern C++ stuffies~
Adds Email protocol support from alchemy
Sync LLSLURL with Alchemy, adding x-grid-info support.
Also keep NoProtocol Support because yaaassss~
(also we won't suffer from MAINT-5019 because we're not dumb.)
2019-01-20 09:13:05 -05:00
Lirusaito
4b4c8c8e37 Woops, each link needs its own style! Thanks for testing, Torric! 2019-01-20 04:37:53 -05:00
Lirusaito
3a159111f3 Don't duplicate code, that's silly. 2019-01-20 04:36:39 -05:00
Lirusaito
f6beee3693 Don't look for clicking urls during draw, do that later upon click 2019-01-20 04:35:21 -05:00
Lirusaito
74af7dc80e Add LLTextEditor::setLinkColor for when links need to be another color!
This fixes blue on blue in notices for the classic skin,
while it does affect other skins, it's not very noticeable.
Actually this change kinda makes links match skins better overall...
2019-01-19 06:18:44 -05:00
Lirusaito
4a0b012f5b Oops, I never meant to stage this tentative change. 2019-01-18 23:56:43 -05:00
Lirusaito
e643bcfc98 Fix the ran off segmentation end bug properly (Torric's Notes bug)
Default segments are now any segment that have no distinct features,
these segments can be combined into a contiguous segment to save space
and to cut down on calculation complexity!
2019-01-18 23:21:23 -05:00
Lirusaito
526079d76c Text editor small sync with upstream 2019-01-18 05:48:02 -05:00
Lirusaito
0c8f2f1ea0 Cleanup and add back an opt in text editor 2019-01-18 02:14:31 -05:00
Lirusaito
466b4bf5e4 Add keyboard shortcut Ctrl-Shift-C for Copy Raw 2019-01-16 14:34:27 -05:00
Lirusaito
a5632c08c7 Add "Copy URL" option to text editor right click menu when right clicking links. 2019-01-16 14:33:53 -05:00
Lirusaito
1dea1123de Fix the issue with profile font and selection
Thanks for testing, Router!
2019-01-16 14:32:31 -05:00
Lirusaito
269576805b Replace URLs everywhere in text editors, like upstream.
This works for notifications, and profiles, and chats, and even updates!
Amazing, right?
SinguReplaceLinks is on by default, URL highlighting works regardless, no rogue labels with this off.

Select, right click, Copy Raw lets you copy the link with its hidden url shown
and you can paste it back the same way if you're wanting to paste it all over!

LLTextEditor overhaul synced the code with upstream LLTextBase as much as we could.
appendStyledText is now just appendText
Every setText appendText's now and adds a style based on the texteditor's color and font, this could slightly increase the weight of text editors (one extra segment) but it fixes a nasty bug with running past segmentation.
Also no longer update the utf8
Removed append() which was no longer being used
LLTextEditor and LLViewerTextEditor now have an extra boolean at the end of their constructors to have this replacement turned on at construction time (this also sets them read only)
Update TextSegments to have a Tooltip string, like upstream.
Hardened notecard previews so they don't accidentally replace the text when they go read only.

Thanks to Deltek and Router Gray for helping me test and debug this commit!
2019-01-16 01:01:19 -05:00
Shyotl
f4a713a500 Merge. 2017-03-14 04:02:53 -05:00
Shyotl
bf3dbd66b8 Fix rlva force-detach crash, and autoresponse message setting not being updated. 2016-06-15 23:22:10 -05:00
Lirusaito
a41ce2d281 When LLTextEditor calls onCommit, update its setting value if applicable.
Hook up commit on focus lost, too, have the autoresponse messages do that.
2016-06-14 03:59:35 -04:00
miKaぴょん
c2c8e7f281 Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer 2016-06-09 01:11:21 +02:00
Lirusaito
b8a2122b28 Fix SV-2054 2016-06-08 15:42:19 -04:00
Shyotl
4f4a6d4588 Avoid excessive string allocations in updateLineStartList. Fixes some performance issues. 2016-06-04 01:19:12 -05:00
Inusaito Sayori
0b70603a0c Tweak removeWord code to make it work for text editors and make more sense 2015-07-17 22:07:35 -04:00
Shyotl
1c627317ec No longer include llerrorlegacy.h. Updated llstl to include deletion utilites. 2015-06-19 03:54:20 -05:00
Inusaito Sayori
72080e79e9 Sync llcommon with Alchemy a bit.
llmath::llround->ll_round
LL_ICC->LL_INTELC
Add llpredicate
Add LL_CPP11 macro
Remove llhash
Update llinitparam, llsd and all relatives of it.
2015-03-20 22:04:04 -04:00
Shyotl
b7454f5f43 Cleanup in llfontgl, as well as more aggressive bounds checking. 2015-02-15 21:45:33 -06:00
Drake Arconis
948ebe5213 All your codebase are belong to us. 2014-08-22 00:15:09 -04:00
Inusaito Sayori
7fd61c3bf1 Fix delete not working in text editors 2013-11-25 21:03:36 -05:00
Inusaito Sayori
979d139af1 Address Issue 352: Ctrl-Backspace in editable text fields 2013-09-29 19:14:56 -04:00