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