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

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 7 08:52:48 PST 2015


 include/LibreOfficeKit/LibreOfficeKitGtk.h          |    2 --
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |    9 +++++++++
 libreofficekit/source/gtk/lokdocview.c              |    2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit c5fa5c079e4e609c6dcac543453b8216d687565d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 7 17:19:40 2015 +0100

    gtktiledviewer: react to key presses
    
    Change-Id: Ic9226bc0118482b381eff8d5d777e01c293c4deb

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 8f804f0..6aea0f8 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -124,6 +124,11 @@ void changeQuadView( GtkWidget* /*pButton*/, gpointer /* pItem */ )
     }
 }
 
+/// Receives a key press event.
+static void docViewKeyPress(GtkWidget* /*pWidget*/, GdkEvent* /*pEvent*/, gpointer /*pData*/)
+{
+}
+
 // GtkComboBox requires gtk 2.24 or later
 #if ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION > 2
 void populatePartSelector()
@@ -277,6 +282,10 @@ int main( int argc, char* argv[] )
     // Docview
     pDocView = lok_docview_new( pOffice );
     pDocViewQuad = 0;
+
+    // Input handling.
+    g_signal_connect(pWindow, "key-press-event", G_CALLBACK(docViewKeyPress), NULL);
+
     gtk_container_add( GTK_CONTAINER(pVBox), pDocView );
 
     gtk_widget_show_all( pWindow );
commit 0eec1058774baff3743fd62ad39ec4b22cd23cbe
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 7 16:07:55 2015 +0100

    LibreOfficeKitGtk: lok_docview is never read
    
    Change-Id: Ibb7a6dd46541afe8908b108450e64b91c8830026

diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index 522d74d..111381d 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -46,8 +46,6 @@ struct _LOKDocView
 struct _LOKDocViewClass
 {
   GtkScrolledWindowClass parent_class;
-
-  void (*lok_docview) (LOKDocView* pDocView);
 };
 
 guint           lok_docview_get_type        (void);
diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index 4e13f03..903f7e3 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -52,7 +52,7 @@ SAL_DLLPUBLIC_EXPORT guint lok_docview_get_type()
 
 static void lok_docview_class_init( LOKDocViewClass* pClass )
 {
-    pClass->lok_docview = NULL;
+    (void)pClass;
 }
 
 static void lok_docview_init( LOKDocView* pDocView )


More information about the Libreoffice-commits mailing list