summaryrefslogtreecommitdiff
path: root/libreofficekit/qa/gtktiledviewer
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-04-29 22:21:39 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-26 15:20:28 +0200
commit3cb02bcee8d5f5550952967f9d40475d2f08b61b (patch)
treec42659204bce6b7a91010232d1a9671dbd2e4035 /libreofficekit/qa/gtktiledviewer
parent008d3af39e7339c004b03d40cd865f85e925bf35 (diff)
gtktiledviewer: provide activation function
This fixes the gtktiledviewer on some distros/gtk versions that require an activation function to be provided. Change-Id: I95fb3ed4e92e27d9c725ca38b4cb5a4f8af51771 Reviewed-on: https://gerrit.libreoffice.org/71588 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/76373 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'libreofficekit/qa/gtktiledviewer')
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-application.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-application.cxx b/libreofficekit/qa/gtktiledviewer/gtv-application.cxx
index 15e5f15f1697..7481076778eb 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-application.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-application.cxx
@@ -28,6 +28,12 @@ getPrivate(GtvApplication* app)
}
static void
+gtv_application_activate(GApplication*)
+{
+ // If this isn't provided, some GTK versions fail to run us at all.
+}
+
+static void
gtv_application_open(GApplication* app, GFile** file, gint /*nFiles*/, const gchar* /*hint*/)
{
// TODO: add some option to create a new view for existing document
@@ -145,6 +151,7 @@ gtv_application_handle_local_options(GApplication* app, GVariantDict* options)
static void
gtv_application_class_init(GtvApplicationClass* klass)
{
+ G_APPLICATION_CLASS(klass)->activate = gtv_application_activate;
G_APPLICATION_CLASS(klass)->open = gtv_application_open;
G_APPLICATION_CLASS(klass)->handle_local_options = gtv_application_handle_local_options;
G_OBJECT_CLASS(klass)->dispose = gtv_application_dispose;