Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Wed, 17 Apr 2019 21:15:19 UTC
Commit: acebc2d6db11b7ba05a4fecbfbddb511ab9d8114
https://github.com/geany/geany/commit/acebc2d6db11b7ba05a4fecbfbddb511ab9d8…
Log Message:
-----------
scintilla: Accessible: emit the text deletion signal before deletion
This allows the accessibility layer to request detail, such as which
characters have been deleted. ATK will query the deleted range to
report the data that was removed, so it must still be available for
the query to give a correct answer.
So, emit the signal in BEFOREDELETE instead of DELETETEXT.
X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/2095/
X-Scintilla-Commit-ID: 0a937b4c0b2be02042473baed62543ff73d90807
Modified Paths:
--------------
scintilla/gtk/ScintillaGTKAccessible.cxx
scintilla/gtk/ScintillaGTKAccessible.h
Modified: scintilla/gtk/ScintillaGTKAccessible.cxx
10 lines changed, 3 insertions(+), 7 deletions(-)
===================================================================
@@ -156,7 +156,6 @@ ScintillaGTKAccessible *ScintillaGTKAccessible::FromAccessible(GtkAccessible *ac
ScintillaGTKAccessible::ScintillaGTKAccessible(GtkAccessible *accessible_, GtkWidget *widget_) :
accessible(accessible_),
sci(ScintillaGTK::FromWidget(widget_)),
- deletionLengthChar(0),
old_pos(-1) {
SetAccessibility(true);
g_signal_connect(widget_, "sci-notify", G_CALLBACK(SciNotify), this);
@@ -882,14 +881,11 @@ void ScintillaGTKAccessible::Notify(GtkWidget *, gint, SCNotification *nt) {
UpdateCursor();
}
if (nt->modificationType & SC_MOD_BEFOREDELETE) {
- // We cannot compute the deletion length in DELETETEXT as it requires accessing the
- // buffer, so that the character are still present. So, we cache the value here,
- // and use it in DELETETEXT that fires quickly after.
- deletionLengthChar = sci->pdoc->CountCharacters(nt->position, nt->position + nt->length);
+ int startChar = CharacterOffsetFromByteOffset(nt->position);
+ int lengthChar = sci->pdoc->CountCharacters(nt->position, nt->position + nt->length);
+ g_signal_emit_by_name(accessible, "text-changed::delete", startChar, lengthChar);
}
if (nt->modificationType & SC_MOD_DELETETEXT) {
- int startChar = CharacterOffsetFromByteOffset(nt->position);
- g_signal_emit_by_name(accessible, "text-changed::delete", startChar, deletionLengthChar);
UpdateCursor();
}
if (nt->modificationType & SC_MOD_CHANGESTYLE) {
Modified: scintilla/gtk/ScintillaGTKAccessible.h
2 lines changed, 0 insertions(+), 2 deletions(-)
===================================================================
@@ -18,8 +18,6 @@ class ScintillaGTKAccessible {
GtkAccessible *accessible;
ScintillaGTK *sci;
- // cached length of the deletion, in characters (see Notify())
- int deletionLengthChar;
// local state for comparing
Sci::Position old_pos;
std::vector<SelectionRange> old_sels;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Wed, 17 Apr 2019 17:22:48 UTC
Commit: b6a132bc12df47bc92994792572ea962fd6f4aa6
https://github.com/geany/geany/commit/b6a132bc12df47bc92994792572ea962fd6f4…
Log Message:
-----------
Small update of the French translation
Modified Paths:
--------------
po/fr.po
Modified: po/fr.po
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -2298,6 +2298,8 @@ msgid ""
"Copyright (c) 2005\n"
"The Geany contributors"
msgstr ""
+"Copyright (c) 2005\n"
+"Les contributeurs de Geany"
#: ../src/about.c:169
msgid "About Geany"
@@ -4009,10 +4011,10 @@ msgid "Configuration directory could not be created (%s)."
msgstr "Le dossier de configuration n'a pas pu être créé (%s)."
#: ../src/libmain.c:1184
-#, fuzzy
msgid "IPC socket could not be created, see Help->Debug Messages for details."
msgstr ""
-"La recherche a échoué (voir Aide->Messages de débogage pour plus de détails)."
+"Le socket IPC n'a pas pu être créé, voyez Aide->Messages de débogage pour "
+"plus de détails."
#: ../src/libmain.c:1413
msgid "Do you really want to quit?"
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).