Age | Commit message (Collapse) | Author | Files | Lines |
|
Avoid crash when detaching the widget from the accessible object
without destroying that widget.
In such situations, the widget is still valid but we will have
destroyed the orphaned accessible object. Thus, we must make sure we
disconnected the signal handlers the late accessible had set up on the
widget, as they won't be implicitly disconnected by widget
finalization in this case.
|
|
|
|
|
|
These are used to ensure popup windows are fully on-screen but after this
change, this doesn't always work on GTK+ 3.22 / Wayland.
|
|
|
|
setting the owning window by calling gtk_window_set_transient_for.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Rerun make deps to cover recntly added files.
|
|
|
|
|
|
|
|
|
|
Either remove the parameter name if it is never used, or mark it with
G_GNUC_UNUSED when it might be used depending on some preprocessor
flags.
|
|
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.
|
|
|
|
GTK clipboard is asynchronous, which means that the answer to a request
can theoretically arrive at any moment in the future after the request.
This poses a problem as the receiving code has to make sure the object
on which the paste was requested still actually exists by the time the
response arrives, as it could have been destroyed in the meantime.
A possible solution is to add a reference to the object during the
query so that it is kept alive as needed. However, this means that if
the paste request really takes a long time to get answered, it can
prevent the application from destroying the object explicitly,
possibly at the user's request.
So instead, use a helper object adding a weak reference to the object,
and only process the paste request response if the object is still
alive then.
All this is fairly theoretical though, as in practice paste is
generally not effectively asynchronous (GTK tries and calls the
response callback directly in the request call when possible), and when
it is effectively asynchronous, it generally is very fast.
|
|
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
|
|
|
|
Allow out-of-sources build by setting Make variable srcdir.
This still generates the scintilla.a library in the source directory, though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Currently, the ScintillaObject signals can't be used from python code via
gobject-introspection. This is because g-ir-scanner does not properly scan
the signals.
For signals, there is the additional requirement that parameters have are
registered GTypes. For the sci-notify signal, this can be accomplished by
boxing SCNotification.
In addition, g-ir-scanner also runs on Scintilla.h where it picks up
additional structs.
test/gi/ is updated accordingly. The test python script is enhanced
to showcase the signals (some fixes to the makefile are included as well).
|
|
This makes it easier to update or add new marshallers.
Also, re-generate the current one using a current version of
glib-genmarshal, which generates different output (accessing different
fields for enum and flags) since at least 2008. Although neither of
these types are currently used, it seems safer this way.
|
|
|
|
Currently, the ScintillaObject signals can't be used from python code via
gobject-introspection. This is because g-ir-scanner does not properly scan
the signals.
For signals, there is the additional requirement that parameters have are
registered GTypes. For the sci-notify signal, this can be accomplished by
boxing SCNotification.
In addition, g-ir-scanner also runs on Scintilla.h where it picks up
additional structs.
test/gi/ is updated accordingly. The test python script is enhanced
to showcase the signals (some fixes to the makefile are included as well).
|
|
The idle callback removal clause in the ScintillaGTK destructor got
broken in 4e5c321dda8e69104cb7b639c3107dc11dbc00f6, 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.
|
|
matches g_iconv exactly. Make character set name buffer dynamically sized.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
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
2px-scrolling on GTK 3.20's default theme.
|
|
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.
|
|
|
|
For Qt on Unix, set to build as C++11. Avoid deprecation warnings in PySide.
For GTK+ allow turning off C++11 <regex> with make NO_CXX11_REGEX=1.
|
|
|
|
Platform-independent caching is available and there is no performance difference
after removal.
|
|
and gdk_threads_add_timeout() instead of g_timeout_add()
* The g_idle/g_timeout watchers are not executed with the Gdk lock
held. This causes memory corruptions and crashes when accessing
the Scintilla object from the non-main-loop-thread.
At least this was the case after Gdk 3.6 since Scintilla
used gdk_threads_enter()/leave() for earlier versions.
The timeout handlers have possibly always been broken.
* The new version should work with non-deprecated APIs in all Gdk
versions.
* Even though this only fixes the idle handlers in Gdk >= 3.6 where
gdk_threads_enter() is deprecated (the only way to provoke
above situation) - and the timers of course - this patch makes
the code more elegant.
|
|
|