summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2019-03-21 10:14:07 +0100
committerHeiko Tietze <tietze.heiko@gmail.com>2019-04-10 16:54:37 +0200
commita1700d52a47184ee07b91b461a846dc5435f0022 (patch)
tree31e05614ca9133846bef8fd5219ada1191d48414 /vcl
parent3d7a67cdd465956206f881304bbcbaf47ccfcd83 (diff)
tdf#124238 - Show a Tip-Of-The-Day dialog on startup
New dialog Change-Id: If1e501de26eb5a9c20a59e621f9e805c3b5e2cf8 Reviewed-on: https://gerrit.libreoffice.org/69498 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/Module_vcl.mk1
-rw-r--r--vcl/Package_tipoftheday.mk18
-rw-r--r--vcl/source/app/salvtables.cxx5
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx12
4 files changed, 36 insertions, 0 deletions
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 6c7ed89dfb23..7bfd4bed1cc9 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
Library_vcl \
Package_opengl \
Package_theme_definitions \
+ Package_tipoftheday \
UIConfig_vcl \
$(if $(filter WNT,$(OS)), \
Package_opengl_blacklist ) \
diff --git a/vcl/Package_tipoftheday.mk b/vcl/Package_tipoftheday.mk
new file mode 100644
index 000000000000..165249cce491
--- /dev/null
+++ b/vcl/Package_tipoftheday.mk
@@ -0,0 +1,18 @@
+# -*- 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,tipoftheday_images,extras/source/tipoftheday))
+
+$(eval $(call gb_Package_add_files_with_dir,tipoftheday_images,$(LIBO_SHARE_FOLDER)/tipoftheday,\
+ tipoftheday.png \
+ tipoftheday_1.png \
+ tipoftheday_2.png \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 47ab9beab90a..0926dac611fb 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2023,6 +2023,11 @@ public:
{
m_xImage->SetImage(::Image(StockImage::Yes, rIconName));
}
+
+ virtual void set_image(VirtualDevice* pDevice) override
+ {
+ m_xImage->SetImage(createImage(*pDevice));
+ }
};
class SalInstanceCalendar : public SalInstanceWidget, public virtual weld::Calendar
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index d5bf067032d3..7f294bae8c21 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -5109,6 +5109,18 @@ public:
gtk_image_set_from_pixbuf(m_pImage, pixbuf);
g_object_unref(pixbuf);
}
+
+ virtual void set_image(VirtualDevice* pDevice) override
+ {
+ if (gtk_check_version(3, 20, 0) == nullptr)
+ gtk_image_set_from_surface(m_pImage, get_underlying_cairo_surface(*pDevice));
+ else
+ {
+ GdkPixbuf* pixbuf = getPixbuf(*pDevice);
+ gtk_image_set_from_pixbuf(m_pImage, pixbuf);
+ g_object_unref(pixbuf);
+ }
+ }
};
class GtkInstanceCalendar : public GtkInstanceWidget, public virtual weld::Calendar