Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
95632939
Kaydet (Commit)
95632939
authored
Ock 09, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtktiledviewer: invoke paintTile() on the main thread from the callback
Change-Id: Id910c1905d23f16cae5b6b551c74193d46cff256
üst
e9c69494
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
lokdocview.c
libreofficekit/source/gtk/lokdocview.c
+12
-3
No files found.
libreofficekit/source/gtk/lokdocview.c
Dosyayı görüntüle @
95632939
...
@@ -149,7 +149,16 @@ void renderDocument( LOKDocView* pDocView )
...
@@ -149,7 +149,16 @@ void renderDocument( LOKDocView* pDocView )
gtk_image_set_from_pixbuf
(
GTK_IMAGE
(
pDocView
->
pCanvas
),
pDocView
->
pPixBuf
);
gtk_image_set_from_pixbuf
(
GTK_IMAGE
(
pDocView
->
pCanvas
),
pDocView
->
pPixBuf
);
}
}
static
void
lok_docview_callback
(
int
nType
,
const
char
*
pPayload
,
void
*
pData
)
/// Invoked on the main thread if lok_docview_callback_worker() requests so.
static
gboolean
lok_docview_callback
(
gpointer
pData
)
{
LOKDocView
*
pDocView
=
pData
;
renderDocument
(
pDocView
);
return
G_SOURCE_REMOVE
;
}
/// Our LOK callback, runs on the LO thread.
static
void
lok_docview_callback_worker
(
int
nType
,
const
char
*
pPayload
,
void
*
pData
)
{
{
LOKDocView
*
pDocView
=
pData
;
LOKDocView
*
pDocView
=
pData
;
...
@@ -158,7 +167,7 @@ static void lok_docview_callback(int nType, const char* pPayload, void* pData)
...
@@ -158,7 +167,7 @@ static void lok_docview_callback(int nType, const char* pPayload, void* pData)
case
LOK_CALLBACK_INVALIDATE_TILES
:
case
LOK_CALLBACK_INVALIDATE_TILES
:
// TODO for now just always render the document.
// TODO for now just always render the document.
(
void
)
pPayload
;
(
void
)
pPayload
;
renderDocument
(
pDocView
);
gdk_threads_add_idle
(
lok_docview_callback
,
pDocView
);
break
;
break
;
default:
default:
break
;
break
;
...
@@ -185,7 +194,7 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, c
...
@@ -185,7 +194,7 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, c
else
else
{
{
renderDocument
(
pDocView
);
renderDocument
(
pDocView
);
pDocView
->
pDocument
->
pClass
->
registerCallback
(
pDocView
->
pDocument
,
&
lok_docview_callback
,
pDocView
);
pDocView
->
pDocument
->
pClass
->
registerCallback
(
pDocView
->
pDocument
,
&
lok_docview_callback
_worker
,
pDocView
);
}
}
return
TRUE
;
return
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment