Skip to content

Commit

Permalink
portals: Move portal implementations to new directory
Browse files Browse the repository at this point in the history
  • Loading branch information
swick committed Nov 1, 2024
1 parent 8c4caf0 commit d15811b
Show file tree
Hide file tree
Showing 62 changed files with 82 additions and 76 deletions.
14 changes: 7 additions & 7 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# List of source files containing translatable strings.
src/background.c
src/camera.c
src/dynamic-launcher.c
src/location.c
src/screenshot.c
src/settings.c
src/wallpaper.c
src/portals/background.c
src/portals/camera.c
src/portals/dynamic-launcher.c
src/portals/location.c
src/portals/screenshot.c
src/portals/settings.c
src/portals/wallpaper.c
2 changes: 1 addition & 1 deletion src/helpers/rewrite-launchers.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <glib.h>
#include <gio/gdesktopappinfo.h>

#include "dynamic-launcher.h"
#include "portals/dynamic-launcher.h"
#include "xdp-utils.h"

static char *
Expand Down
82 changes: 43 additions & 39 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ background_monitor_built_sources = gnome.gdbus_codegen(
if have_geoclue
geoclue_built_sources = gnome.gdbus_codegen(
'geoclue-dbus',
sources: 'org.freedesktop.GeoClue2.Client.xml',
sources: 'portals/org.freedesktop.GeoClue2.Client.xml',
interface_prefix: 'org.freedesktop.GeoClue2',
namespace: 'Geoclue',
)
Expand Down Expand Up @@ -52,50 +52,59 @@ xdp_method_info_sources = files('xdp-method-info.c') + xdp_method_info_built_sou
xdp_utils_deps = []
xdp_utils_includes = include_directories('.')
xdp_utils_sources = files(
'xdp-utils.c',
'xdp-app-info.c',
'xdp-sealed-fd.c',
'xdp-app-info-host.c',
'xdp-app-info-flatpak.c',
'xdp-app-info-snap.c',
'xdp-app-info-test.c',
'xdp-sealed-fd.c',
'xdp-utils.c',
)

if have_libsystemd
xdp_utils_sources += sd_escape_sources
xdp_utils_deps += [libsystemd_dep]
endif

xdg_desktop_portal_sources = files(
'account.c',
'background.c',
'camera.c',
'clipboard.c',
'dynamic-launcher.c',
'email.c',
'file-chooser.c',
xdp_portals_sources = files(
'portals/account.c',
'portals/background.c',
'portals/camera.c',
'portals/clipboard.c',
'portals/dynamic-launcher.c',
'portals/email.c',
'portals/file-chooser.c',
'portals/gamemode.c',
'portals/global-shortcuts.c',
'portals/inhibit.c',
'portals/input-capture.c',
'portals/memory-monitor.c',
'portals/network-monitor.c',
'portals/notification.c',
'portals/open-uri.c',
'portals/pipewire.c',
'portals/power-profile-monitor.c',
'portals/print.c',
'portals/proxy-resolver.c',
'portals/realtime.c',
'portals/remote-desktop.c',
'portals/screenshot.c',
'portals/screen-cast.c',
'portals/secret.c',
'portals/settings.c',
'portals/trash.c',
'portals/wallpaper.c',
)

if have_geoclue
xdp_portals_sources += files(
'portals/location.c',
)
endif

xdp_sources = files(
'flatpak-instance.c',
'gamemode.c',
'glib-backports.c',
'global-shortcuts.c',
'inhibit.c',
'input-capture.c',
'memory-monitor.c',
'network-monitor.c',
'notification.c',
'open-uri.c',
'pipewire.c',
'power-profile-monitor.c',
'print.c',
'proxy-resolver.c',
'realtime.c',
'remote-desktop.c',
'screen-cast.c',
'screenshot.c',
'secret.c',
'settings.c',
'trash.c',
'wallpaper.c',
'xdg-desktop-portal.c',
'xdp-app-launch-context.c',
'xdp-background-monitor.c',
Expand All @@ -108,7 +117,8 @@ xdg_desktop_portal_sources = files(
'xdp-session-persistence.c',
)

xdg_desktop_portal_sources += [
xdp_sources += [
xdp_portals_sources,
xdp_utils_sources,
xdp_method_info_sources,
portal_built_sources,
Expand All @@ -118,12 +128,6 @@ xdg_desktop_portal_sources += [
built_resources,
]

if have_geoclue
xdg_desktop_portal_sources += files(
'location.c',
)
endif

common_deps = [
glib_dep,
gio_dep,
Expand All @@ -145,7 +149,7 @@ incs_xdg_desktop_portal = [

xdg_desktop_portal = executable(
'xdg-desktop-portal',
xdg_desktop_portal_sources,
xdp_sources,
dependencies: xdg_desktop_portal_deps,
include_directories: incs_xdg_desktop_portal,
install: true,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 29 additions & 29 deletions src/xdg-desktop-portal.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,38 @@
#include "xdp-documents.h"
#include "xdp-impl-dbus.h"
#include "xdp-method-info.h"
#include "xdp-permissions.h"
#include "xdp-portal-impl.h"
#include "xdp-request.h"
#include "xdp-session-persistence.h"

#include "account.h"
#include "background.h"
#include "camera.h"
#include "clipboard.h"
#include "dynamic-launcher.h"
#include "email.h"
#include "file-chooser.h"
#include "gamemode.h"
#include "global-shortcuts.h"
#include "inhibit.h"
#include "input-capture.h"
#include "location.h"
#include "memory-monitor.h"
#include "network-monitor.h"
#include "notification.h"
#include "open-uri.h"
#include "xdp-permissions.h"
#include "power-profile-monitor.h"
#include "print.h"
#include "proxy-resolver.h"
#include "realtime.h"
#include "remote-desktop.h"
#include "xdp-request.h"
#include "screen-cast.h"
#include "screenshot.h"
#include "secret.h"
#include "settings.h"
#include "trash.h"
#include "wallpaper.h"
#include "portals/account.h"
#include "portals/background.h"
#include "portals/camera.h"
#include "portals/clipboard.h"
#include "portals/dynamic-launcher.h"
#include "portals/email.h"
#include "portals/file-chooser.h"
#include "portals/gamemode.h"
#include "portals/global-shortcuts.h"
#include "portals/inhibit.h"
#include "portals/input-capture.h"
#include "portals/location.h"
#include "portals/memory-monitor.h"
#include "portals/network-monitor.h"
#include "portals/notification.h"
#include "portals/open-uri.h"
#include "portals/power-profile-monitor.h"
#include "portals/print.h"
#include "portals/proxy-resolver.h"
#include "portals/realtime.h"
#include "portals/remote-desktop.h"
#include "portals/screen-cast.h"
#include "portals/screenshot.h"
#include "portals/secret.h"
#include "portals/settings.h"
#include "portals/trash.h"
#include "portals/wallpaper.h"

static int global_exit_status = 0;
static GMainLoop *loop = NULL;
Expand Down
2 changes: 2 additions & 0 deletions src/xdp-documents.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include <gio/gio.h>

#include "xdp-app-info.h"

typedef enum {
XDP_DOCUMENT_FLAG_NONE = 0,
XDP_DOCUMENT_FLAG_FOR_SAVE = (1 << 0),
Expand Down

0 comments on commit d15811b

Please sign in to comment.