diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-15 15:22:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-21 07:30:19 +0200 |
commit | c1d72145314be0e53d5f93e3b639715c9fbba8b0 (patch) | |
tree | 845d883ae7dc04305dc288bc1d9baedff10573c5 /libreofficekit | |
parent | 8d8a8e1a2ea26df6d676495af7f017baa071153d (diff) |
gtktiledviewer: set up a new GtkWindow for a new view
Change-Id: I9dcb5871c231a49bcd65a1187df6c3c81f92bd55
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 47d349b9493b..74a46499a81a 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -77,6 +77,9 @@ public: static std::map<GtkWidget*, TiledWindow> g_aWindows; +static void setupDocView(GtkWidget* pDocView); +static GtkWidget* createWindow(TiledWindow& rWindow); + static TiledWindow& lcl_getTiledWindow(GtkWidget* pWidget) { GtkWidget* pToplevel = gtk_widget_get_toplevel(pWidget); @@ -193,9 +196,11 @@ static void toggleFindbar(GtkWidget* pButton, gpointer /*pItem*/) static void createView(GtkWidget* pButton, gpointer /*pItem*/) { TiledWindow& rWindow = lcl_getTiledWindow(pButton); - LOKDocView* pLOKDocView = LOK_DOC_VIEW(rWindow.m_pDocView); - LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(pLOKDocView); - pDocument->pClass->createView(pDocument); + GtkWidget* pDocView = lok_doc_view_new_from_widget(LOK_DOC_VIEW(rWindow.m_pDocView)); + setupDocView(pDocView); + TiledWindow aWindow; + aWindow.m_pDocView = pDocView; + createWindow(aWindow); } /// Our GtkClipboardGetFunc implementation for HTML. |