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

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