aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
AgeCommit message (Collapse)AuthorFilesLines
2017-03-07GTK: Fix popup positioning on monitors not positioned at 0,0Colomban Wendling1-20/+14
2017-03-08Bug [#1910]. Fixed more duplicate code.Neil1-7/+0
2017-03-07Bug [#1910]. Fixed double declaration.Neil1-3/+0
2017-03-07Bug [#1910]. Accessibility support may be queried and, on GTK+, disabled.Neil4-0/+43
2017-03-06Use several C++11 features as examples so problems with these features are seen.Vicente2-0/+2
Features used are move constructor, unique_ptr, deleted functions, enum class, lambda expression, and range for loop.
2017-03-05For IMEs, do not clear selected text when there is no composition text to show.johnsonj1-1/+4
2017-03-04Use C++11 keyword "override" for methods that override a base class.Neil3-66/+66
2017-02-21Bug [#1910]. GTK a11y: Speed up converting byte offsets to character offsetsColomban Wendling2-1/+22
Use a per-line cache to avoid re-computing the offset from the start of the buffer each time. This dramatically speeds up multiple replacements on large files.
2017-02-26Bug [#1907]. GTK: Fix crash after destroying the widget on GTK < 3.3.6Colomban Wendling1-1/+3
On GTK2 and GTK3 < 3.3.6 there is no GtkAccessibleClass::widget_unset() method, so we can't destroy our accessible object right away. So, to avoid accessing a destroyed widget, we need to check whether the widget still exists in the the ScintillaGTKAccessible destructor. In other methods it's not necessary because the wrapping GObject class makes sure not to forward other when the widget has been destroyed, but we still have to destroy the C++ instance no matter what, so the check has to be on this side.
2017-02-21Bug [#1901]. GTK: Fix double scrolling under X11Colomban Wendling1-1/+1
Really restrict smooth scrolling handling to Wayland.
2017-02-08Bug [#1907]. GTK: Prevent running signal handlers on a destroyed a11y objectColomban Wendling1-0/+1
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.
2017-02-01Bug [#1901]. Make trackpad scrolling work on Wayland.John Flatness2-0/+37
2017-01-04Use new simplified API for showing menu on GTK+ 3.22 as old API was deprecated.Neil1-3/+11
2017-01-04Use newer APIs for screen/monitor/display on GTK+ 3.22 as old APIs deprecated.Neil1-7/+35
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.
2017-01-04Don't set window background on GTK+ 3.22 as this is deprecated.Neil1-1/+3
2017-01-04Fix display of autocompletion lists and calltips on GTK+ 3.22 on Wayland byNeil2-1/+8
setting the owning window by calling gtk_window_set_transient_for.
2016-12-18GTK: Ensure styles are valid when retrieving them for accessibility purposesColomban Wendling2-3/+10
2016-12-18GTK: Fix reporting deletion length in the accessibleColomban Wendling2-2/+10
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-18GTK: Fix off-by-one error in accessible attribute runsColomban Wendling1-3/+3
2016-12-18GTK: Fix accessible object lifetime on GTK < 3.8Colomban Wendling1-20/+20
2016-10-24GTK: Add some documentation on accessible object reference ownershipsColomban Wendling2-0/+23
2016-12-01Ensure application can override right mouse button by returning FALSE.Neil1-0/+1
2016-12-01Sorting list of lexers for 'make deps' to minimize changes.Neil2-23/+42
Rerun make deps to cover recntly added files.
2016-11-23Implementation of MarginRightClick event.Tse Kit Yam1-2/+10
2016-11-07Remove warning suppressions for a version of Clang from 4 years ago.Neil2-10/+0
2016-10-27Mark as const to avoid warning.Neil1-1/+1
2016-10-26Include windows.h on Windows and provide a ATK_CHECK_VERSION if not defined.Neil2-0/+16
2016-10-23Bug [#1874]. GTK: Avoid warnings about unused parametersColomban Wendling4-9/+9
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.
2016-10-23Bug [#1873]. GTK: Don't forward calls to NULL scrollbarsColomban Wendling1-4/+8
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.
2016-10-21Initial accessibility support for the GTK platform v7Colomban Wendling5-289/+1736
2016-10-09GTK: Avoid theoretical access to a destroyed object on async pasteColomban Wendling1-7/+58
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.
2016-09-06GTK: Fix autoc font size on GTK >= 3.21.0Colomban Wendling1-1/+9
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
2016-08-30Regenerate deps.mak to include LexJSON.Neil1-0/+4
2016-08-27Feature [feature-requests:#1154]. GTK: Allow out-of-sources build.Colomban Wendling1-8/+11
Allow out-of-sources build by setting Make variable srcdir. This still generates the scintilla.a library in the source directory, though.
2016-08-11Bug [#1846]. Allow setting ARFLAGS for make.Van de Bugger1-1/+2
2016-08-11Bug [#1845]. Allow recreating deps.mak if ever deleted.Van de Bugger1-2/+3
2016-08-11Bug [#1844]. Allow setting CFLAGS for make.Neil Hodgson1-2/+1
2016-08-10Bug [#1851]. Fix scroll bar size warnings.Chris Mayo1-1/+1
2016-05-22Bug [#1831]. Fix GTK+ error due to not allocating enough space for scrollbars.Johannes Sasongko1-5/+12
2016-05-18Normalized formatting.Neil Hodgson1-7/+5
2016-05-17Enable g-ir-scanner to scan ScintillaObject signalsThomas Martitz4-32/+96
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).
2016-05-17GTK: Add makefile rules to auto-generate marshallersColomban Wendling2-9/+19
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.
2016-05-17Backed out changeset: 89cda794d0dd as fixed changeset will be sent by author.Neil6-13/+120
2016-04-26Enable g-ir-scanner to scan ScintillaObject signalsThomas Martitz6-120/+13
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).
2016-05-11Bug [#1827]. GTK: Avoid possible IdleWork() calls on destructed objectsColomban Wendling1-5/+16
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.
2016-05-05Remove template adaptor as only g_iconv is used now. Use glib's gsize type as itNeil Hodgson3-32/+23
matches g_iconv exactly. Make character set name buffer dynamically sized.
2016-05-03Avoid use of const_cast when retrieving window positions.Neil1-1/+1
2016-05-01Do not call deprecated functions on newer GTK+.Neil Hodgson1-0/+6
2016-04-30Move function braces for consistency.Neil Hodgson1-4/+2
2016-04-27GTK: Get border for the exact current style's state on GTK 3Colomban Wendling1-3/+4
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.