Blame SOURCES/evince-3.28.4-application-id.patch

79d870
From 9363553a3087c7dbfa93e1d342283600ceb5993b Mon Sep 17 00:00:00 2001
79d870
From: Marek Kasik <mkasik@redhat.com>
79d870
Date: Fri, 22 Jun 2018 17:00:20 +0200
79d870
Subject: shell: Set application-id
79d870
79d870
Set "application-id" property for evince's GApplication
79d870
to "org.gnome.evince.Application".
79d870
An assertion warning is shown in shell if it is not set.
79d870
79d870
Even though we use G_APPLICATION_NON_UNIQUE, the application
79d870
ID is still required. See:
79d870
https://bugzilla.gnome.org/show_bug.cgi?id=646985#c2
79d870
79d870
Closes: https://gitlab.gnome.org/GNOME/evince/issues/918
79d870
79d870
diff --git a/shell/ev-application.c b/shell/ev-application.c
79d870
index 7d546933..f173d7a4 100644
79d870
--- a/shell/ev-application.c
79d870
+++ b/shell/ev-application.c
79d870
@@ -65,6 +65,7 @@ struct _EvApplicationClass {
79d870
 G_DEFINE_TYPE (EvApplication, ev_application, GTK_TYPE_APPLICATION)
79d870
 
79d870
 #ifdef ENABLE_DBUS
79d870
+#define APPLICATION_DBUS_NAME        "org.gnome.evince.Application"
79d870
 #define APPLICATION_DBUS_OBJECT_PATH "/org/gnome/evince/Evince"
79d870
 #define APPLICATION_DBUS_INTERFACE   "org.gnome.evince.Application"
79d870
 
79d870
@@ -102,7 +103,7 @@ ev_application_new (void)
79d870
   const GApplicationFlags flags = G_APPLICATION_NON_UNIQUE;
79d870
 
79d870
   return g_object_new (EV_TYPE_APPLICATION,
79d870
-                       "application-id", NULL,
79d870
+                       "application-id", APPLICATION_DBUS_NAME,
79d870
                        "flags", flags,
79d870
                        NULL);
79d870
 }