Sadie Powell
55e4f1c42e
Implement support for strikethrough text.
...
https://defs.ircdocs.horse/info/formatting.html
2021-06-20 10:39:39 -05:00
John Levon
163608d7fd
Use pango_font_metrics_get_height() to calculate font height ( #2500 )
2020-09-07 18:53:31 +02:00
Patrick Griffis
eb942fc274
Revert "xtext: Always use Pango to get correct glyph width on Unix"
...
This reverts commit d3f1ab78138a1f9256ec02842799ed6cd1e3ec1e.
The performance even on Linux is just too poor in many cases.
2018-03-13 21:18:16 -04:00
Patrick Griffis
7510ab36b7
xtext: Fix accidental truncation
...
Fixes #2121
2018-02-11 17:24:32 -05:00
Peng Wu
d3f1ab7813
xtext: Always use Pango to get correct glyph width on Unix
...
This should be slower but pango seems to be reasonably fast
on Unix though extremely slow on Windows.
https://bugzilla.redhat.com/show_bug.cgi?id=1536298
2018-02-06 17:06:50 -05:00
Patrick Griffis
4cdf6460b6
xtext: Fix invalid utf-8 from truncation
2018-02-06 17:06:50 -05:00
Patrick Griffis
5d3bf39103
xtext: Remove unused code
2018-02-06 17:06:50 -05:00
Rodri
4a228d1efe
This patch hopefully solves a bug that causes that when a tab (channel or private) is left with the scrollbar at the bottom, and some new text arrives, and then we select again that tab, sometimes the scrollbar is not completely down and there is hidden text and we have to scroll manually to the bottom to show all text.
...
This was previously submitted as an issue in: https://github.com/hexchat/hexchat/issues/1948
Maybe it isn't the ideal way to solve it, but at least I tested it and it seems to work.
2018-01-18 15:07:14 -05:00
Francisco Couzo
ee8926503c
Prevent undefined behaviour on memcpy
2018-01-18 04:49:10 -05:00
Pavel Djundik
971e5cf4fe
Emit word_click even as long as user is not selecting any text when releasing button
...
This fixes the need to do pixel-perfect clicks to open links in chat
2016-01-10 12:37:30 -08:00
Patrick Griffis
c8539b93fe
xtext: Fix overflow on long lines
...
xtext keeps a static buffer and uses it for various things
and asserts that every text entry is < 4096. It does
this check on gtk_xtext_append*() except it does the check only on
the right half of text when indent is enabled.
This overflow caused corruption in the xtext struct
changing the url check functions making hovering
with the mouse do 'undefined' things.
In the long term this should be removed for a dynamically
allocated buffer so no arbitrary size limit exists and
text gets cut off.
Fixes #1465
Fixes #1186
Fixes #1206
2015-10-30 01:22:13 -04:00
RichardHitt
9664b1b7e3
Fix select regression.
...
Fix selection when part of the selected text is above/below a border.
Also, fix problems uncovered by static analysis.
Fixes #1261 .
2015-08-20 00:23:17 +02:00
RichardHitt
f7bea16e37
xtext: Fix poor performance with nick indent enabled
...
This fixes xtext re-rendering multiple times when the
indent width is not sufficient
Fixes #1364
Closes #1367
2015-05-18 06:31:00 -04:00
Arnavion
e42da22716
Revert "xtext: Unselect old selection on button press" - breaks clicking URLs to open them.
...
This reverts commit 8ca96d7ea3ec0281802eb08174ca2fdcbcc8263f.
2015-02-20 02:54:41 -08:00
RichardHitt
8ca96d7ea3
xtext: Unselect old selection on button press
...
Fixes #943
Closes #1293
2015-02-15 13:17:55 -05:00
Arnavion
9858784eb6
Better project files.
...
- Output directly to rel\ instead of to bin\ and then copying files over.
- Deduped Win32 vs x64 configs
- Moved some common properties to hexchat.props
- All build intermediates (except htm's intermediates) are no longer emitted in the source directory
2015-02-11 10:01:29 -08:00
TingPing
2a28289314
Don't return 0 in place of NULL
2014-12-31 11:31:17 -05:00
TingPing
83032b1aa3
Use glib for all allocations
...
- Removes need to check for malloc failure
- Removes need for NULL checks on free
- Adds checks for integer overflows
- Removes some extra memset calls
- Removes chance of mixing libc and glib malloc/free
2014-12-28 06:44:44 -05:00
TingPing
aeb5d15871
More consistently include config.h
2014-12-17 18:21:10 -05:00
TingPing
05a6097dc6
Fix copying timestamp with server-time and indent nicks off
2014-11-30 22:33:30 -05:00
TingPing
85557f2416
Fix duplicate timestamps on selection
...
Fixes #1226
2014-11-30 22:27:00 -05:00
Campbell Barton
f83d78dd28
Warning cleanup
...
- ignoring const
- declarations after statements
- some C files didnt include own headers (risking them getting out of sync)
Closes #1064
2014-11-02 14:41:20 -05:00
RichardHitt
6653582f0a
Fix textbox not scrolling to to bottom on resize
...
Set buf->scrollbar_down conditionally when vertically resizing text window
If resize to enlarge appears to go to last line, set buf->scrollbar_down to be sure.
Fixes #1151
Closes #1171
2014-10-10 13:35:00 -04:00
Farow
fd95c729d5
xtext: Add word and line selection modes
...
Similar to a GtkTextView if you double click you enter word selection mode
and if you triple click you enter line selection mode.
Allowing you to drag and select more than a single character.
Closes #1108
2014-09-01 17:53:03 -04:00
TingPing
b8c02f71d9
win32: Use config.h instead of config-win32.h
2014-06-04 10:30:18 -04:00
RichardHitt
5706550cc1
Rework gtk_xtext_selection_draw(), simplify calls to _selection_render()
...
Fixes #992 .
2014-05-31 02:40:28 -07:00
RichardHitt
6fb8cf40e1
Fixes #959 . In xtext.c:find_x() return offset to hidden text if appropriate.
2014-05-22 07:06:51 -07:00
RichardHitt
0f828dd74f
Add marker-line functionality for scrollback, instant seek.
...
Fixes #662 .
2014-04-02 16:14:45 -07:00
RichardHitt
46e449f110
Correctly scroll down autojoined channels
...
Fixes #58
2014-03-19 10:31:52 -04:00
RichardHitt
0487daf865
Fix three miscellaneous bugs in gtk_xtext_get_word()
...
* Use utf8 functions for moving within string
* Fix memory leak
* Fix non-indent select problem
2014-03-19 10:31:26 -04:00
TingPing
34cf164aa2
Use a single marshal file for entire project
2014-02-06 20:17:08 -05:00
TingPing
5f7321280e
Use a standard GtkScrolledWindow with xtext
...
Used in maingui, fkeys, text events, rawlog
This also implements the set_scroll_adjustments signal in xtext
2014-02-06 20:17:07 -05:00
RichardHitt
4c1fd3ee67
Fix many many problems in xtext.c related to character width.
...
* Rework multiline logic to use a GSList, not an array
* Remove all multibyte booleans; everything is potentially multibyte
- Except for gtk_xtext_get_word(), which needs special attention
* Enhance pango work for bold and italics (attr_list -> attr_lists[4])
* Enhance gtk_xtext_strip_color () to save bold, italics info
* Involve emphasis information in all pixel-width calculations
* Rework find_x () to account for emphasis info in widths
Closes #891
Fixes #872
2014-02-04 21:26:58 -05:00
RichardHitt
007f49c39f
Fixes #881 Fix two bugs --
...
gtk_xtext_find_char() adjust negative y for int typecast
gtk_xtext_find_x() return out_of_bounds TRUE if line outside windodw
gtk_xtext_selection_draw() recognize TRUE out_of_bounds
2014-01-29 11:56:23 -08:00
TingPing
093bdd8b1c
Fix warning
...
Leftovers from 38cbabea
2014-01-20 01:25:35 -05:00
TingPing
38cbabea02
Revert GtkObject removal until Gtk3
2014-01-18 21:48:41 -05:00
TingPing
ce09cb4a91
Update most deprecated gtk functions
2014-01-18 14:47:17 -05:00
TingPing
fa1eb92a7b
Update most deprecated gdk functions
2014-01-18 14:47:17 -05:00
TingPing
4319f8009c
Don't use SCROLL_HACK on osx
2014-01-14 22:14:27 -05:00
RichardHitt
3821e7a750
Fixes #836 . Move to line boundary in _scroll{down,up}_timeout() not _scroll().
2013-11-14 19:18:07 -08:00
RichardHitt
1aca24f3de
Fixes #837 . Rewrite gtk_xtext_scroll{down,up}_timeout().
2013-11-12 15:02:38 -08:00
RichardHitt
811caaaa3d
Fixes #836 . In gtk_xtext_scroll() always force line integral line boundary.
2013-11-11 12:55:38 -08:00
TingPing
7cf9ea83cb
xtext: Get proper text width with attributes
2013-10-26 08:51:50 -04:00
TingPing
a72d40284d
fix some warnings
2013-10-22 06:21:58 -04:00
TingPing
cbf275777c
xtext: store palette as GdkColors
2013-10-10 21:02:24 -04:00
TingPing
1f06922803
Revert 2d5cb3ec7bc62e5c4e7b550ecade22bb53efd9f6
...
Scrolling has issues i couldn't easily fix, will get back to
later but lets keep this usable
2013-10-09 13:59:07 -04:00
TingPing
2d5cb3ec7b
Round 3 of Gtk accessor functions: xtext
2013-10-08 21:01:07 -04:00
TingPing
c537dae7f8
Use Pango Attributes for bold and italics
2013-09-28 23:02:38 -04:00
TingPing
0d2feba69c
Revert fast scrolling with background image
2013-09-27 18:23:51 -04:00
TingPing
958f4099f1
Remove overdraw
2013-09-27 17:40:53 -04:00