[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - libreofficekit/qa libreofficekit/README libreofficekit/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Jan 16 09:58:16 PST 2015


 libreofficekit/README                               |    5 ++---
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |    3 +++
 libreofficekit/source/gtk/lokdocview.c              |    5 +++++
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 0d67a74adbb7d54536adf71bc026498b44c6875e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Jan 16 18:53:45 2015 +0100

    libreofficekit: update README, deploy a couple of g_info() calls
    
    As we can't use SAL_INFO in C code (not to mention that the widget
    doesn't link to LO code, either).
    
    Change-Id: I71b925ab3c18c2e0afebe84cdaefd5c01fc91872

diff --git a/libreofficekit/README b/libreofficekit/README
index 8b18b36..eb29106 100644
--- a/libreofficekit/README
+++ b/libreofficekit/README
@@ -43,6 +43,5 @@ LibreOfficeKitGtk
 
 Currently consists of only a very basic GTK+ document viewer widget.
 
-Currently this simply renders the entire document as one large tile (for
-Writer) and/or entire sheet for Calc, which can be somewhat slow with
-larger documents.
+The widget uses g_info() instead of SAL_INFO(), use the 'G_MESSAGES_DEBUG=all'
+environment variable to display those messages.
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 2be201f..c24755b 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -134,7 +134,10 @@ static void signalKey(GtkWidget* /*pWidget*/, GdkEventKey* pEvent, gpointer /*pD
     int nCode = 0;
 
     if (!pLOKDocView->m_bEdit)
+    {
+        g_info("signalKey: not in edit mode, ignore");
         return;
+    }
 
     switch (pEvent->keyval)
     {
diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index 4a317e4..60ca589 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -191,6 +191,7 @@ void renderDocument(LOKDocView* pDocView, GdkRectangle* pPartial)
 
                 pPixBuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, aTileRectanglePixels.width, aTileRectanglePixels.height);
                 pBuffer = gdk_pixbuf_get_pixels(pPixBuf);
+                g_info("renderDocument: paintTile(%d, %d)", nRow, nColumn);
                 pDocView->pDocument->pClass->paintTile(pDocView->pDocument,
                                                        // Buffer and its size, depends on the position only.
                                                        pBuffer,
@@ -284,6 +285,7 @@ static void lok_docview_callback_worker(int nType, const char* pPayload, void* p
     pCallback->m_nType = nType;
     pCallback->m_pPayload = g_strdup(pPayload);
     pCallback->m_pDocView = pDocView;
+    g_info("lok_docview_callback_worker: %d, '%s'", nType, pPayload);
 #if GTK_CHECK_VERSION(2,12,0)
     gdk_threads_add_idle(lok_docview_callback, pCallback);
 #else
@@ -365,7 +367,10 @@ SAL_DLLPUBLIC_EXPORT void lok_docview_set_edit( LOKDocView* pDocView,
                                                 gboolean bEdit )
 {
     if (!pDocView->m_bEdit && bEdit)
+    {
+        g_info("lok_docview_set_edit: entering edit mode, registering callback");
         pDocView->pDocument->pClass->registerCallback(pDocView->pDocument, &lok_docview_callback_worker, pDocView);
+    }
     pDocView->m_bEdit = bEdit;
 }
 


More information about the Libreoffice-commits mailing list