aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-05-01 08:09:22 +1000
committerNeil <nyamatongwe@gmail.com>2020-05-01 08:09:22 +1000
commit0f8507cf83173fb4a6a715a4784fde4bb3001959 (patch)
treecfed2dbc3d5c6dceb1908586b99f4ee5454dc5a5
parentad96afd4e24d87a87c0d8f0a7875ba4b162aba9f (diff)
downloadscintilla-mirror-0f8507cf83173fb4a6a715a4784fde4bb3001959.tar.gz
Replace deprecated function pango_script_for_unichar with g_unichar_get_script.
-rwxr-xr-xgtk/ScintillaGTK.cxx10
-rwxr-xr-xgtk/ScintillaGTK.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 5cf567966..e040c3f00 100755
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -157,7 +157,7 @@ ScintillaGTK::ScintillaGTK(_ScintillaObject *sci_) :
atomSought(nullptr),
preeditInitialized(false),
im_context(nullptr),
- lastNonCommonScript(PANGO_SCRIPT_INVALID_CODE),
+ lastNonCommonScript(G_UNICODE_SCRIPT_INVALID_CODE),
lastWheelMouseTime(0),
lastWheelMouseDirection(0),
wheelMouseIntensity(0),
@@ -413,13 +413,13 @@ public:
gboolean validUTF8;
glong uniStrLen;
gunichar *uniStr;
- PangoScript pscript;
+ GUnicodeScript pscript;
explicit PreEditString(GtkIMContext *im_context) noexcept {
gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos);
validUTF8 = g_utf8_validate(str, strlen(str), nullptr);
uniStr = g_utf8_to_ucs4_fast(str, strlen(str), &uniStrLen);
- pscript = pango_script_for_unichar(uniStr[0]);
+ pscript = g_unichar_get_script(uniStr[0]);
}
// Deleted so PreEditString objects can not be copied.
PreEditString(const PreEditString&) = delete;
@@ -2235,9 +2235,9 @@ gboolean ScintillaGTK::ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, Sci
bool ScintillaGTK::KoreanIME() {
PreEditString pes(im_context);
- if (pes.pscript != PANGO_SCRIPT_COMMON)
+ if (pes.pscript != G_UNICODE_SCRIPT_COMMON)
lastNonCommonScript = pes.pscript;
- return lastNonCommonScript == PANGO_SCRIPT_HANGUL;
+ return lastNonCommonScript == G_UNICODE_SCRIPT_HANGUL;
}
void ScintillaGTK::MoveImeCarets(int pos) {
diff --git a/gtk/ScintillaGTK.h b/gtk/ScintillaGTK.h
index f70c285eb..4a446ec99 100755
--- a/gtk/ScintillaGTK.h
+++ b/gtk/ScintillaGTK.h
@@ -50,7 +50,7 @@ class ScintillaGTK : public ScintillaBase {
Window wPreedit;
Window wPreeditDraw;
GtkIMContext *im_context;
- PangoScript lastNonCommonScript;
+ GUnicodeScript lastNonCommonScript;
// Wheel mouse support
unsigned int linesPerScroll;