summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-10-26 18:31:39 -0700
committerJan Holesovsky <kendy@collabora.com>2017-11-15 17:07:17 +0100
commitdd2c566b29b74d025761df77f5744c5b21e97625 (patch)
treea3533275620da38206e5cc6ce11cbcd9dfbae767 /libreofficekit
parent0968edb21c069c4c91836581a7c29f8e82d533bb (diff)
lokdialog: Tunnel dialog title to lokclient as outparam
Change-Id: I1beb5ab3f06debdca7ebf999af7ac879a41ea47e Reviewed-on: https://gerrit.libreoffice.org/43959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
index 0db80a8ef8f0..677245512821 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
@@ -87,14 +87,20 @@ gtv_lok_dialog_draw(GtkWidget* pDialogDrawingArea, cairo_t* pCairo, gpointer)
GtvLokDialog* pDialog = GTV_LOK_DIALOG(gtk_widget_get_toplevel(pDialogDrawingArea));
GtvLokDialogPrivate* priv = getPrivate(pDialog);
-
g_info("panting dialog");
int nWidth = 1024;
int nHeight = 768;
cairo_surface_t* pSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, nWidth, nHeight);
unsigned char* pBuffer = cairo_image_surface_get_data(pSurface);
LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(priv->lokdocview));
- pDocument->pClass->paintDialog(pDocument, priv->dialogid, pBuffer, &nWidth, &nHeight);
+ char* pDialogTitle = nullptr;
+ pDocument->pClass->paintDialog(pDocument, priv->dialogid, pBuffer, &pDialogTitle, &nWidth, &nHeight);
+ if (pDialogTitle)
+ {
+ gtk_window_set_title(GTK_WINDOW(pDialog), pDialogTitle);
+ free(pDialogTitle);
+ }
+
gtk_widget_set_size_request(GTK_WIDGET(pDialogDrawingArea), nWidth, nHeight);
cairo_surface_flush(pSurface);
@@ -472,7 +478,6 @@ gtv_lok_dialog_invalidate(GtvLokDialog* dialog)
{
GtvLokDialogPrivate* priv = getPrivate(dialog);
- // trigger a draw on the dialog drawing area
gtk_widget_queue_draw(priv->pDialogDrawingArea);
}
@@ -597,7 +602,7 @@ void gtv_lok_dialog_child_invalidate(GtvLokDialog* dialog, int nX, int nY)
g_info("Dialog's floating window invalidate");
GtvLokDialogPrivate* priv = getPrivate(dialog);
- // remove any existing floating windows, for now
+ // create new if doesn't exist
if (!priv->pFloatingWin)
{
priv->pFloatingWin = gtk_window_new(GTK_WINDOW_POPUP);