[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 18 09:26:20 UTC 2021


 vcl/unx/gtk3/gtkinst.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 8d56760cb71229b157db0249991a30c1a8cf6e21
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 17 20:06:07 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 18 11:25:41 2021 +0200

    gtk[3|4] these provide a GtkEditable* arg
    
    Change-Id: Ic4a537389da8397de72e50dd623decee045a7257
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115721
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 096d5b09bf3f..35591173a482 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10064,22 +10064,22 @@ private:
     gulong m_nSelectionPosSignalId;
     gulong m_nActivateSignalId;
 
-    static void signalChanged(GtkEntry*, gpointer widget)
+    static void signalChanged(GtkEditable*, gpointer widget)
     {
         GtkInstanceEntry* pThis = static_cast<GtkInstanceEntry*>(widget);
         SolarMutexGuard aGuard;
         pThis->signal_changed();
     }
 
-    static void signalInsertText(GtkEntry* pEntry, const gchar* pNewText, gint nNewTextLength,
+    static void signalInsertText(GtkEditable* pEditable, const gchar* pNewText, gint nNewTextLength,
                                  gint* position, gpointer widget)
     {
         GtkInstanceEntry* pThis = static_cast<GtkInstanceEntry*>(widget);
         SolarMutexGuard aGuard;
-        pThis->signal_insert_text(pEntry, pNewText, nNewTextLength, position);
+        pThis->signal_insert_text(pEditable, pNewText, nNewTextLength, position);
     }
 
-    void signal_insert_text(GtkEntry* pEntry, const gchar* pNewText, gint nNewTextLength, gint* position)
+    void signal_insert_text(GtkEditable* pEditable, const gchar* pNewText, gint nNewTextLength, gint* position)
     {
         if (!m_aInsertTextHdl.IsSet())
             return;
@@ -10088,11 +10088,11 @@ private:
         if (bContinue && !sText.isEmpty())
         {
             OString sFinalText(OUStringToOString(sText, RTL_TEXTENCODING_UTF8));
-            g_signal_handlers_block_by_func(pEntry, reinterpret_cast<gpointer>(signalInsertText), this);
-            gtk_editable_insert_text(GTK_EDITABLE(pEntry), sFinalText.getStr(), sFinalText.getLength(), position);
-            g_signal_handlers_unblock_by_func(pEntry, reinterpret_cast<gpointer>(signalInsertText), this);
+            g_signal_handlers_block_by_func(pEditable, reinterpret_cast<gpointer>(signalInsertText), this);
+            gtk_editable_insert_text(pEditable, sFinalText.getStr(), sFinalText.getLength(), position);
+            g_signal_handlers_unblock_by_func(pEditable, reinterpret_cast<gpointer>(signalInsertText), this);
         }
-        g_signal_stop_emission_by_name(pEntry, "insert-text");
+        g_signal_stop_emission_by_name(pEditable, "insert-text");
     }
 
     static void signalCursorPosition(GtkEntry*, GParamSpec*, gpointer widget)


More information about the Libreoffice-commits mailing list