Kaydet (Commit) e0536720 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst c3f1a338
......@@ -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.
......@@ -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)
{
......
......@@ -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,
......@@ -287,6 +288,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
......@@ -368,7 +370,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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment