237 Commits

Author SHA1 Message Date
Colomban Wendling
a31a43efe1 GTK: Fix reporting deletion length in the accessible
We cannot compute the length in characters after the text has been
deleted, so we need to compute it in BEFOREDELETE.  However, we need to
emit the signal once the buffer has actually changed, so we need to
cache the value in-between those events.
2016-12-20 21:45:29 +01:00
Colomban Wendling
745d15de2e GTK: Fix off-by-one error in accessible attribute runs 2016-12-20 21:45:29 +01:00
Colomban Wendling
2f327b767b GTK: Fix accessible object lifetime on GTK < 3.8 2016-12-20 21:45:29 +01:00
Colomban Wendling
407cb36ceb GTK: Add some documentation on accessible object reference ownerships 2016-12-20 21:45:29 +01:00
Colomban Wendling
aa11c3ea48 Update Scintilla to version 3.7.1 2016-12-05 14:23:34 +01:00
Colomban Wendling
6834c5a830 GTK: Don't forward calls to NULL scrollbars
Once Dispose() has been called, scrollbars will be NULL, so we need to
check against this in code that might run after Dispose().

Fixes scary warnings on certain widget destruction scenarios.

Closes #993.

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1873/
X-Scintilla-Commit-ID: 4e67e6ee45732a048907ef1577cf1efc25729313
2016-10-24 11:03:58 +02:00
Colomban Wendling
f5c4b1b6e5 Update Scintilla to version 3.7.0 2016-10-16 22:37:40 +02:00
Colomban Wendling
db6f671135 GTK: Fix autoc font size on GTK >= 3.21.0
GTK 3.21.0 fixed font size handling, leading to properly interpreting
pixels and points in CSS declarations.  However, as older versions
incorrectly handled those, the code has to handle both behaviours.

From CSS, GTK < 3.21.0 actually applied the conversion to points, but
incorrectly: 10px was used as 10pt, but 10pt was scaled up twice.

So, assuming 96 DPI, it leads to:

font-size | 3.20.0  | 3.21.0  |
----------|---------|---------|
10px      | 13.33px | 10px    |
10pt      | 17.77px | 13.33px |

So, we need to fix the code to accommodate for both (either scaling
ourselves, or adapting the unit: I chose the second, simpler, option).

See https://git.gnome.org/browse/gtk+/commit/?id=df08fc91bdc1d2e4c866122304fabe4dd298a7de

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1859/
X-Scintilla-Commit-ID: a4b5da8b3a0a05a1e67ba7eb08474106d421b088
2016-09-07 11:05:17 +02:00
Colomban Wendling
18db459632 Update Scintilla to version 3.6.7
Fixes #1143.
2016-09-05 22:31:52 +02:00
Jiří Techet
f95656cbe8 Remove makefile.win32 based build system
No more needed using MSYS2.
2016-07-21 13:21:32 +02:00
Thomas Martitz
c6f1fadf0b plugin api: export scnotification_get_type
Updated scintilla_changes.patch accordingly
2016-06-22 16:18:35 +02:00
Colomban Wendling
04296390de scintilla: Don't build with C++11 regex support
It seems to cause some compatibility issues with some current compilers
and we don't use it nor need it for extended regex support, so stay on
the safe side at least for the moment.
2016-05-26 19:22:27 +02:00
Colomban Wendling
934b47158c scintilla: Remove obsolete flag building Scintilla
`-DG_THREADS_IMPL_NONE` was a hack, and it has no effect since 3.6.5,
so drop it altogether.
2016-05-26 19:21:49 +02:00
Colomban Wendling
64025cfcfc Update Scintilla to version 3.6.6 2016-05-26 19:21:38 +02:00
Colomban Wendling
cb8151b29b GTK: Avoid possible IdleWork() calls on destructed objects
The idle callback removal clause in the ScintillaGTK destructor got
broken in the last Scintilla update [1], leading to the callback not
being removed thus possibly running after the instance destruction.
Indeed, gdk_threads_add_idle() wraps g_idle_add() with a custom user
data, thus making the g_source_remove_by_user_data() call in the
destructor incorrect, as we give it our own user data, not GDK's
wrapper one.

Fix the callback removal not to use user data matching to avoid this.

Closes #1033.

[1] 4e5c321dda/

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1827/
X-Scintilla-Commit-ID: d889200cd9de032e278745f48b9c3108ccfa5984
2016-05-12 15:02:15 +02:00
Neil Hodgson
bf3140004d Do not call deprecated functions on newer GTK+.
X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: 5e4f2e6c167ee30e2c2bfadd1b1579c3d8716c60
2016-05-02 15:19:26 +02:00
Neil Hodgson
0a0c9bb7ce Move function braces for consistency.
X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: cdded8beb41e4a494e68b76a6bafeeae14b0d103
2016-05-02 15:19:26 +02:00
Colomban Wendling
ba58a391c7 GTK: Get border for the exact current style's state on GTK 3
GTK 3.20 doesn't seem to like it so much when looking up details of a
non-exact current style context state, so use the current one.

This is GTK being really picky as in this case we are just missing the
`DIR_LTR` flag, which we definitely don't care about, but let's make it
happy.

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: 9fc624da4a3d935633c45fb56d0e9a77ef9b5af1
2016-05-02 15:19:26 +02:00
Colomban Wendling
abf0365e43 GTK: Fix auto-completion popup sizing code for GTK 3.20
GTK 3.20's GtkScrolledWinodw doesn't like having a too small allocation
and spews scary assertion failures.  Fix that by requesting the real
size we'd like instead of hard-coding 1 as small-enough value in our
overriding height requisition method.

The actual value doesn't really matter so long as it's small enough
anyway, as we resize the popup to fit later on.

Note: this moves the actual implementation of ListBoxX::GetRowHeight()
to the new convenience function treeViewGetRowHeight(), with no changes
in implementation.

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: 5a0afdd87d56d837dd8068e234aed8e2b6bdbe93
2016-05-02 15:19:26 +02:00
Colomban Wendling
2723727ecd GTK: Plug a memory leak
X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: 4f96ed32ebb94809ca419c0f77d37de41984cf76
2016-05-02 15:19:26 +02:00
Colomban Wendling
ead0e9ee5f GTK: Fix fetching the frame border width on GTK 3.20
GTK 3.20 introduced a sub-node named "border" to the frame, requiring
to lookup the border on that sub-node rather than on the frame itself.

Unfortunately supporting this requires to be built against GTK 3.20, as
it requires API this version introduced.  This means that a build
against an older version won't be able to get the popup sizing right if
running on 3.20.  To mitigate this, add reasonable fallback defaults
when running 3.20 but built on an earlier version, to try and avoid

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: 83d56b1fc63a206e4c1b776f5991b3b17ccb3473
2px-scrolling on GTK 3.20's default theme.
2016-05-02 15:19:26 +02:00
Colomban Wendling
28a99f8188 GTK: Properly ask wText what size it wants to please GTK 3.20
It's not really of any use as we do know any size would do as wText is
ours anyway, but GTK 3.20 doesn't like allocating without querying the
preferred size beforehand, so do it.

As wText has a size_request() of 100x100, this might change how we
allocate in case we used to underallocate it, but AFAIK we don't, and
it is the real minimum size expected.

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: d06e3db3e26842cd136328df17eb6f864b3adc02
2016-05-02 15:19:26 +02:00
Colomban Wendling
915e8b781c GTK: Fix popup font on GTK >= 3.20
X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1825/
X-Scintilla-Commit-ID: a28863773874af35d3cc8912ae3c028fb0462ea9
2016-05-02 15:19:26 +02:00
Colomban Wendling
1403d352b2 Update Scintilla to version 3.6.5 2016-04-29 01:12:20 +02:00
Colomban Wendling
24f91981c0 Update Scintilla to version 3.6.4 2016-03-13 15:50:36 +01:00
Thomas Martitz
a032ed506e scintilla: add scintilla_object_* to the plugin api
Analogous to their legacy counterparts. Also required for gir-bindings
generated via g-ir-scanner.
2016-01-19 17:05:30 +01:00
Colomban Wendling
99938dd821 Update Scintilla to version 3.6.3
Includes improvements for Lua 5.3 and Perl 5.22.
2016-01-18 04:22:26 +01:00
Ben Wiederhake
29a6b9c003 Fix typos
All of these typos were found by codespell, so credits go the
the authors of this incredibly useful tool.

I manually confirmed and adapted all changes, which includes
reflowing over-long lines or filling up with spaces for alignment.

Some of these typos may need forwarding to their original authors.
codespell reported a lot words where I am unsure; I have not
included those corrections.
2016-01-03 18:33:25 +01:00
Colomban Wendling
8afbc7a0b6 Update Scintilla to version 3.6.2
Keep scrollbar disposal changes that were backported and are not part
of 3.6.2.
2015-11-16 19:07:59 +01:00
Colomban Wendling
945d6b6364 Merge pull request #746 from techee/scintilla_dispose
Backport Scintilla patch correctly disposing scrollbars
2015-11-15 00:19:53 +01:00
Jiří Techet
3d439b4cfc Backport Scintilla patch correctly disposing scrollbars
The unparent method should be called in dispose(), not in finalize().
This patch fixes that which removes some ugly warnings from OS X command
line.
2015-11-14 10:26:07 +01:00
Colomban Wendling
c21db7d80c Fix line end movement on display lines when EOLs are visible
Closes #712.

X-Scintilla-Bug-URL: http://sourceforge.net/p/scintilla/bugs/1772/
X-Scintilla-Commit-ID: 2ce775c433b4910f2fde53c4b5d89bb16b45e3eb
2015-11-12 18:04:27 +01:00
Colomban Wendling
a1145c6ef6 GTK: Fix autoc popup row height on GTK2 when it changes at runtime
Now the popup is cached the row height has to be re-computed when the
font changes on GTK2 too.

Mostly closes #702.

X-Scintilla-Bug-URL: http://sourceforge.net/p/scintilla/bugs/1774/
X-Scintilla-Commit-ID: 547de78f2477e16b0d7241a217a1ead83a14c42b
2015-11-12 17:55:59 +01:00
Colomban Wendling
04ef30ea06 Update Scintilla to version 3.6.1 2015-09-20 18:39:15 +02:00
Colomban Wendling
67b464a586 GTK: Fix runtime completion popup warning
GtkScrolledWindow in GTK 3.16 might have a minimum and natural height
of 0 if GTK_OVERLAY_SCROLLING is enabled (which is the default), so we
need to fix our overridden minimal height to never be greater than the
natural height.

Do that by only changing the minimal height if it is greater than what
we want.

I don't know why we didn't use to set 0 here, but it might be that a
height of 0 caused problems on older GTK versions, so keep 1 to be sure.

X-Scintilla-Commit-ID: e9f9c964236a6b740f75d09a8b0ac76e5d6dd09f
2015-06-18 01:37:00 +02:00
Colomban Wendling
9b98d55def Update Scintilla to 3.5.6 pre-release
Fixes broken auto-completion popup on Windows.
2015-05-24 18:44:37 +02:00
Colomban Wendling
10a04f71c3 Update Scintilla to version 3.5.5 2015-04-21 16:21:37 +02:00
Matthew Brush
87ee835ef2 Export scintilla_get_type() from libgeany
This is useful for plugins to be able to subclass the ScintillaObject
and use its full GObject features. The Overview plugin is one known
plugin that needs this.

Also update scintilla_changes.patch by running update-scintilla.sh
script with patch application commented-out and generating a reverse
diff using `git -R`, and manually remove `a/` and `b/` prefixes from
the resulting diff so it can be used with update-scintilla.sh script.
2015-04-11 13:35:11 -07:00
Colomban Wendling
f3078ebbc6 Merge branch 'kugel-/linkage-cleanup_rebase-for-merge'
This merges PR#429 with only small history cleanup (no code changes),
and ABI bump.

Closes #355, #358 and #429.
2015-04-10 16:54:30 +02:00
Colomban Wendling
9eee68b71d Fix exporting Scintilla symbols 2015-04-10 16:08:08 +02:00
Colomban Wendling
9644fb0ae2 Define GEANY_{EXPORT,API}_SYMBOL from the build system
This makes it easier to define it consistently to what the compiler
and platform supports, and avoids having to include a special header
everywhere, which is some kind of a problem for separate libraries
like TagManager and especially Scintilla.

As we only use these macros from the source and not the headers, it
is fine for it to be defined to a configure-time check from the build
system.

Warning: Although Waf and Windows makefiles are updated they are not
         tested an will probably required tuning.
2015-04-10 16:08:08 +02:00
Colomban Wendling
1bed458ab9 Merge pull request #270 from b4n/zephir-filetype
Zephir filetype
2015-04-09 01:06:57 +02:00
Colomban Wendling
78a45805f1 autotools: Fix make dist after Scintilla makefile.win32 move
8ebac60901c239a7dc36461a077139595bed12b8 moved the makefile.win32,
so we need to use the new location.
2015-03-15 15:38:47 +01:00
Colomban Wendling
bc013ae9fe Rename LIBGEANY_LIBS to LIBGEANY_LDFLAGS and only use it on libgeany.la
The flags in this variables are used to tune the linker behavior on the
final libgeany (currently set the version information), so should only
used on really linked libraries, not Libtool helper libraries.
2015-03-10 23:16:49 +01:00
Matthew Brush
eb36500ac4 Improve Autotools build system for libgeany
Checks if the compiler supports -fvisibility and the linker supports
-dynamic-list arguments and use them instead of hardcoding. The new
geany-lib.m4 also accomodates future use of Libtool versioning.
2015-03-10 23:10:06 +01:00
Matthew Brush
d33758da92 Move Geany's core into a library (libgeany)
This will allow plugins to link against the core when accessing API
functions, now that the macro/struct/funcptr stuff is gone.

Also convert the helper libraries into Libtool helper libraries as
linking a shared library against static libraries is (apparently) not
portable.
2015-03-10 23:09:46 +01:00
Colomban Wendling
8ac86ce423 Update Scintilla to version 3.5.4 2015-03-08 14:30:34 +01:00
Jiří Techet
7fa8b3a695 Backport adaptive scrolling patch from scintilla 2015-03-04 12:40:45 +01:00
Nick Treleaven
8ebac60901 Fix strangely undefined GTK for PlatGtk.cxx by moving build dir (#1001) 2015-01-24 16:30:54 +00:00
Nick Treleaven
6cad08ae1e Port scintilla/gtk/makefile differences (Windows makefiles) 2015-01-22 17:02:21 +00:00