Skip to content

Commit

Permalink
shell: Move dbus dependent definitions to meson
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoo committed May 1, 2024
1 parent 76c743d commit 6712098
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 11 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ if ev_platform == 'gnome'
if enable_dbus
# Check for dbus service dir
dbus_service_dir = dependency('dbus-1').get_variable(pkgconfig: 'session_bus_services_dir', pkgconfig_define: ['datadir', ev_datadir])

dbus_app_path = '/@0@/Evince'.format(ev_app_id.replace('.', '/'))
dbus_app_interface = '@[email protected]'.format(ev_app_id)
dbus_evince_daemon = '@[email protected]'.format(ev_app_id)
dbus_evince_daemon_path = '/@0@/Daemon'.format(ev_app_id.replace('.', '/'))

config_h.set_quoted('APPLICATION_DBUS_OBJECT_PATH', dbus_app_path)
config_h.set_quoted('APPLICATION_DBUS_INTERFACE', dbus_app_interface)
config_h.set_quoted('EVINCE_DAEMON_SERVICE', dbus_evince_daemon)
config_h.set_quoted('EVINCE_DAEMON_OBJECT_PATH', dbus_evince_daemon_path)
config_h.set_quoted('EVINCE_DAEMON_INTERFACE', dbus_evince_daemon)
endif
config_h.set('ENABLE_DBUS', enable_dbus)

Expand Down
9 changes: 0 additions & 9 deletions shell/ev-application.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@ struct _EvApplicationClass {

G_DEFINE_TYPE (EvApplication, ev_application, GTK_TYPE_APPLICATION)

#ifdef ENABLE_DBUS
#define APPLICATION_DBUS_OBJECT_PATH "/org/gnome/evince/Evince"
#define APPLICATION_DBUS_INTERFACE "org.gnome.evince.Application"

#define EVINCE_DAEMON_SERVICE "org.gnome.evince.Daemon"
#define EVINCE_DAEMON_OBJECT_PATH "/org/gnome/evince/Daemon"
#define EVINCE_DAEMON_INTERFACE "org.gnome.evince.Daemon"
#endif

static void _ev_application_open_uri_at_dest (EvApplication *application,
const gchar *uri,
GdkScreen *screen,
Expand Down

0 comments on commit 6712098

Please sign in to comment.