summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@libreoffice.org>2016-01-19 18:34:56 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-19 18:04:52 +0100
commit11a3449429c5853c5feedce6ac3f8f3829d1bbf9 (patch)
treeda1c4da080f43841e593ef7c5b6ff77fb98a5886 /libreofficekit
parent2737a187a6a7c2e04aa1c6b519a712cfb989c592 (diff)
lokdocview: Package and install selection handles
Now since, LOKDocView has started to get clients, we need to ship all of its dependencies with the widget. Reviewed on: https://gerrit.libreoffice.org/21605 Change-Id: I874eb416587a80b7760c5f00183d6004dfca4cce
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/Module_libreofficekit.mk1
-rw-r--r--libreofficekit/Package_selectionhandles.mk19
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx12
3 files changed, 26 insertions, 6 deletions
diff --git a/libreofficekit/Module_libreofficekit.mk b/libreofficekit/Module_libreofficekit.mk
index 70cf40b6384e..cc842b2f3f2c 100644
--- a/libreofficekit/Module_libreofficekit.mk
+++ b/libreofficekit/Module_libreofficekit.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,libreofficekit,\
Library_libreofficekitgtk \
Executable_gtktiledviewer \
Executable_tilebench \
+ Package_selectionhandles \
))
endif # ($(ENABLE_GTK3),)
diff --git a/libreofficekit/Package_selectionhandles.mk b/libreofficekit/Package_selectionhandles.mk
new file mode 100644
index 000000000000..5d87805c2c28
--- /dev/null
+++ b/libreofficekit/Package_selectionhandles.mk
@@ -0,0 +1,19 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,libreofficekit_selectionhandles,$(SRCDIR)/android/source/res/drawable))
+
+$(eval $(call gb_Package_add_files,libreofficekit_selectionhandles,$(LIBO_SHARE_FOLDER)/libreofficekit,\
+ handle_image_start.png \
+ handle_image_middle.png \
+ handle_image_end.png \
+ handle_graphic.png \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index bca54bd9d94f..f70b15f3aa18 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -34,8 +34,8 @@
#define g_info(...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__)
#endif
-// Cursor bitmaps from the Android app.
-#define CURSOR_HANDLE_DIR "/android/source/res/drawable/"
+// Cursor bitmaps from the installation set.
+#define CURSOR_HANDLE_DIR "/../share/libreofficekit/"
// Number of handles around a graphic selection.
#define GRAPHIC_HANDLE_COUNT 8
// Maximum Zoom allowed
@@ -1311,7 +1311,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
if (priv->m_bEdit && priv->m_bCursorVisible && !isEmptyRectangle(priv->m_aVisibleCursor) && priv->m_aTextSelectionRectangles.empty())
{
// Have a cursor, but no selection: we need the middle handle.
- gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_middle.png", nullptr);
+ gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_image_middle.png", nullptr);
if (!priv->m_pHandleMiddle)
{
priv->m_pHandleMiddle = cairo_image_surface_create_from_png(handleMiddlePath);
@@ -1339,7 +1339,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
if (!isEmptyRectangle(priv->m_aTextSelectionStart))
{
// Have a start position: we need a start handle.
- gchar* handleStartPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_start.png", nullptr);
+ gchar* handleStartPath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_image_start.png", nullptr);
if (!priv->m_pHandleStart)
{
priv->m_pHandleStart = cairo_image_surface_create_from_png(handleStartPath);
@@ -1351,7 +1351,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
if (!isEmptyRectangle(priv->m_aTextSelectionEnd))
{
// Have a start position: we need an end handle.
- gchar* handleEndPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_end.png", nullptr);
+ gchar* handleEndPath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_image_end.png", nullptr);
if (!priv->m_pHandleEnd)
{
priv->m_pHandleEnd = cairo_image_surface_create_from_png(handleEndPath);
@@ -1364,7 +1364,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
if (!isEmptyRectangle(priv->m_aGraphicSelection))
{
- gchar* handleGraphicPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_graphic.png", nullptr);
+ gchar* handleGraphicPath = g_strconcat (priv->m_aLOPath, CURSOR_HANDLE_DIR, "handle_graphic.png", nullptr);
if (!priv->m_pGraphicHandle)
{
priv->m_pGraphicHandle = cairo_image_surface_create_from_png(handleGraphicPath);