diff --git a/internal/resources/assistant.blp b/internal/resources/assistant.blp
new file mode 100644
index 0000000..e89ea76
--- /dev/null
+++ b/internal/resources/assistant.blp
@@ -0,0 +1,213 @@
+using Gtk 4.0;
+using Adw 1;
+
+Adw.ApplicationWindow main-window {
+ default-width: 960;
+ default-height: 540;
+ title: 'Multiplex';
+
+ [content]
+ Adw.ToastOverlay toast-overlay {
+ Box {
+ orientation: vertical;
+
+ Adw.HeaderBar {
+ styles [
+ "flat",
+ ]
+
+ show-end-title-buttons: false;
+
+ [start]
+ Button previous-button {
+ label: 'Previous';
+ visible: false;
+ valign: start;
+ }
+
+ [title]
+ Box {
+ Box media-info-display {
+ orientation: vertical;
+ halign: center;
+ valign: center;
+
+ Label {
+ styles [
+ "title",
+ ]
+
+ label: 'Welcome';
+ }
+ }
+
+ Button media-info-button {
+ styles [
+ "flat",
+ ]
+
+ visible: false;
+ tooltip-text: 'Open media details';
+
+ Box {
+ Box {
+ orientation: vertical;
+ halign: center;
+ valign: center;
+
+ Label button-headerbar-title {
+ styles [
+ "title",
+ ]
+
+ label: 'Welcome';
+ }
+
+ Label button-headerbar-subtitle {
+ styles [
+ "subtitle",
+ ]
+
+ visible: false;
+ }
+ }
+ }
+ }
+ }
+
+ [end]
+ Box {
+ orientation: horizontal;
+ spacing: 12;
+ valign: start;
+
+ Spinner headerbar-spinner {
+ tooltip-text: 'Getting metadata ...';
+ }
+
+ Button next-button {
+ styles [
+ "suggested-action",
+ ]
+
+ label: 'Next';
+ sensitive: false;
+ }
+
+ MenuButton menu-button {
+ icon-name: 'open-menu-symbolic';
+ primary: true;
+ }
+
+ WindowControls {
+ side: end;
+ }
+ }
+ }
+
+ Adw.ToastOverlay {
+ Stack stack {
+ transition-type: slide_left_right;
+
+ StackPage {
+ name: 'welcome-page';
+
+ child: Adw.Clamp {
+ maximum-size: 295;
+ vexpand: true;
+ valign: fill;
+
+ Adw.StatusPage {
+ margin-start: 12;
+ margin-end: 12;
+ icon-name: 'com.pojtinger.felicitas.Multiplex';
+ title: 'Multiplex';
+ description: 'Enter a magnet link or stream code to start streaming';
+
+ Entry magnet-link-entry {
+ placeholder-text: 'Magnet link or stream code';
+ }
+ }
+ };
+ }
+
+ StackPage {
+ name: 'media-page';
+
+ child: Adw.Clamp {
+ maximum-size: 600;
+ vexpand: true;
+ valign: fill;
+
+ Adw.StatusPage {
+ margin-start: 12;
+ margin-end: 12;
+ icon-name: 'applications-multimedia-symbolic';
+ title: 'Media';
+ description: 'Select the file you want to play';
+
+ Adw.PreferencesGroup media-selection-group {}
+ }
+ };
+ }
+
+ StackPage {
+ name: 'ready-page';
+
+ child: Adw.Clamp {
+ maximum-size: 295;
+ vexpand: true;
+ valign: fill;
+
+ Adw.StatusPage {
+ margin-start: 12;
+ margin-end: 12;
+ icon-name: 'emblem-ok-symbolic';
+ title: 'You\'re all set!';
+
+ Box {
+ orientation: vertical;
+ spacing: 36;
+ halign: center;
+ valign: center;
+
+ CheckButton rights-confirmation-button {
+ label: 'I have the right to stream the selected media';
+ }
+
+ Adw.SplitButton download-and-play-button {
+ styles [
+ "pill",
+ ]
+
+ label: 'Download and Play';
+ sensitive: false;
+ halign: center;
+ popover: stream-popover;
+ }
+ }
+ }
+ };
+ }
+ }
+ }
+ }
+ }
+}
+
+Popover stream-popover {
+ Box {
+ orientation: vertical;
+ halign: center;
+ valign: center;
+ spacing: 12;
+
+ Button stream-without-downloading-button {
+ styles [
+ "flat",
+ ]
+
+ label: 'Stream without Downloading';
+ }
+ }
+}
diff --git a/internal/resources/assistant.ui b/internal/resources/assistant.ui
index 6484a5a..7bf20d6 100644
--- a/internal/resources/assistant.ui
+++ b/internal/resources/assistant.ui
@@ -1,282 +1,241 @@
-
+
-
-
-
-
+
+
+
+
+
+ 1
+ 3
+ 3
+ 12
+
+
+
+ Stream without Downloading
+
-
+
+
+
\ No newline at end of file
diff --git a/internal/resources/controls.blp b/internal/resources/controls.blp
new file mode 100644
index 0000000..fd23449
--- /dev/null
+++ b/internal/resources/controls.blp
@@ -0,0 +1,222 @@
+using Gtk 4.0;
+using Adw 1;
+
+Adw.ApplicationWindow main-window {
+ default-width: 700;
+ default-height: 0;
+ title: 'Multiplex';
+ resizable: false;
+
+ content: Adw.ToastOverlay toast-overlay {
+ WindowHandle {
+ Box {
+ orientation: vertical;
+
+ Adw.HeaderBar {
+ styles [
+ "flat",
+ ]
+
+ show-end-title-buttons: false;
+
+ [title]
+ Button media-info-button {
+ styles [
+ "flat",
+ ]
+
+ tooltip-text: 'Open media details';
+
+ Box {
+ Box {
+ orientation: vertical;
+ halign: center;
+ valign: center;
+
+ Label button-headerbar-title {
+ styles [
+ "title",
+ ]
+ }
+
+ Label button-headerbar-subtitle {
+ styles [
+ "subtitle",
+ ]
+ }
+ }
+ }
+ }
+
+ [end]
+ Box {
+ orientation: horizontal;
+ spacing: 12;
+ valign: start;
+
+ Spinner headerbar-spinner {
+ tooltip-text: 'Preparing stream ...';
+ }
+
+ MenuButton {
+ styles [
+ "flat",
+ ]
+
+ icon-name: 'system-users-symbolic';
+ popover: users-popover;
+ tooltip-text: 'Show peers';
+ }
+
+ MenuButton menu-button {
+ icon-name: 'open-menu-symbolic';
+ primary: true;
+ tooltip-text: 'Open primary menu';
+ }
+
+ WindowControls {
+ side: end;
+ }
+ }
+ }
+
+ Box {
+ spacing: 6;
+ halign: fill;
+ valign: center;
+ vexpand: true;
+ margin-top: 6;
+ margin-start: 18;
+ margin-end: 18;
+ margin-bottom: 24;
+
+ Button play-button {
+ styles [
+ "flat",
+ ]
+
+ icon-name: 'media-playback-start-symbolic';
+ tooltip-text: 'Toggle playback';
+ }
+
+ Button stop-button {
+ styles [
+ "flat",
+ ]
+
+ icon-name: 'media-playback-stop-symbolic';
+ tooltip-text: 'Stop playback';
+ }
+
+ Separator {
+ styles [
+ "spacer",
+ ]
+ }
+
+ Label elapsed-track-label {
+ styles [
+ "tabular-nums",
+ ]
+
+ label: '00:00:00';
+ tooltip-text: 'Elapsed time';
+ }
+
+ Scale seeker {
+ hexpand: true;
+ tooltip-text: 'Playback progress';
+ }
+
+ Label remaining-track-label {
+ styles [
+ "tabular-nums",
+ ]
+
+ label: '-00:00:00';
+ tooltip-text: 'Remaining playback time';
+ }
+
+ Separator {
+ styles [
+ "spacer",
+ ]
+ }
+
+ VolumeButton volume-button {
+ value: 1;
+ }
+
+ Button audiotracks-button {
+ styles [
+ "flat",
+ ]
+
+ icon-name: 'media-optical-cd-audio-symbolic';
+ tooltip-text: 'Change audio track';
+ }
+
+ Button subtitle-button {
+ styles [
+ "flat",
+ ]
+
+ icon-name: 'media-view-subtitles-symbolic';
+ tooltip-text: 'Change subtitles';
+ }
+
+ ToggleButton fullscreen-button {
+ styles [
+ "flat",
+ ]
+
+ icon-name: 'view-fullscreen-symbolic';
+ tooltip-text: 'Toggle fullscreen';
+ }
+ }
+ }
+ }
+ };
+}
+
+Popover users-popover {
+ Box {
+ orientation: vertical;
+ halign: center;
+ valign: center;
+ spacing: 12;
+ margin-top: 8;
+ margin-start: 8;
+ margin-end: 8;
+ margin-bottom: 8;
+
+ Label watching-with-title-label {
+ styles [
+ "title",
+ ]
+
+ label: 'You\'re currently watching alone.';
+ }
+
+ Label {
+ justify: center;
+ label: 'Ask the people you want to watch with to enter the following stream code:';
+ }
+
+ Box {
+ styles [
+ "linked",
+ ]
+
+ Entry stream-code-input {
+ editable: false;
+ hexpand: true;
+ }
+
+ Button copy-stream-code-button {
+ icon-name: 'edit-copy-symbolic';
+ tooltip-text: 'Copy stream code to clipboard';
+ }
+ }
+ }
+}
diff --git a/internal/resources/controls.ui b/internal/resources/controls.ui
deleted file mode 100644
index a31044d..0000000
--- a/internal/resources/controls.ui
+++ /dev/null
@@ -1,288 +0,0 @@
-
-
-
-
-
-
- 700
- 0
- Multiplex
- false
-
-
-
-
-
-
-
- vertical
-
-
-
-
-
-
-
- 6
- fill
- center
- true
- 6
- 18
- 18
- 24
-
-
-
-
-
- media-playback-start-symbolic
- Toggle playback
-
-
-
-
-
-
-
- media-playback-stop-symbolic
- Stop playback
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00:00:00
- Elapsed time
-
-
-
-
-
- true
- Playback progress
-
-
-
-
-
-
-
- -00:00:00
- Remaining playback time
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- media-optical-cd-audio-symbolic
- Change audio track
-
-
-
-
-
-
-
- media-view-subtitles-symbolic
- Change subtitles
-
-
-
-
-
-
-
- view-fullscreen-symbolic
- Toggle fullscreen
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- vertical
- center
- center
- 12
- 8
- 8
- 8
- 8
-
-
-
-
-
- You're currently watching alone.
-
-
-
-
-
- center
- Ask the people you want to watch with to enter the following stream code:
-
-
-
-
-
-
-
-
-
- false
- true
-
-
-
-
-
- edit-copy-symbolic
- Copy stream code to clipboard
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/internal/resources/description.blp b/internal/resources/description.blp
new file mode 100644
index 0000000..f6b2e1b
--- /dev/null
+++ b/internal/resources/description.blp
@@ -0,0 +1,71 @@
+using Gtk 4.0;
+using Adw 1;
+
+Adw.Window description-window {
+ default-width: 450;
+ default-height: 250;
+ modal: true;
+
+ [content]
+ Box {
+ orientation: vertical;
+
+ Adw.HeaderBar {
+ styles [
+ "flat",
+ ]
+
+ [title]
+ Box {
+ orientation: vertical;
+ halign: center;
+ valign: center;
+
+ Label headerbar-title {
+ styles [
+ "title",
+ ]
+ }
+
+ Label headerbar-subtitle {
+ styles [
+ "subtitle",
+ ]
+
+ visible: false;
+ }
+ }
+ }
+
+ ScrolledWindow {
+ margin-start: 12;
+ margin-end: 12;
+ margin-bottom: 12;
+
+ Box {
+ orientation: vertical;
+
+ ProgressBar preparing-progress-bar {
+ styles [
+ "preparing-progress-bar",
+ ]
+
+ show-text: true;
+ margin-bottom: 12;
+ visible: false;
+ }
+
+ TextView description-text {
+ styles [
+ "rounded-corners",
+ ]
+
+ editable: false;
+ cursor-visible: false;
+ vexpand: true;
+ hexpand: true;
+ }
+ }
+ }
+ }
+}
diff --git a/internal/resources/description.ui b/internal/resources/description.ui
deleted file mode 100644
index d3974b9..0000000
--- a/internal/resources/description.ui
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
- 450
- 250
- true
-
-
-
- vertical
-
-
-
-
-
-
-
- 12
- 12
- 12
-
-
-
- vertical
-
-
-
-
-
- true
- 12
- false
-
-
-
-
-
-
-
- false
- false
- true
- true
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/internal/resources/error.blp b/internal/resources/error.blp
new file mode 100644
index 0000000..7ff892b
--- /dev/null
+++ b/internal/resources/error.blp
@@ -0,0 +1,22 @@
+using Gtk 4.0;
+
+MessageDialog error-dialog {
+ modal: true;
+ text: 'A Fatal Error Occured';
+ secondary-text: '';
+ message-type: error;
+
+ [action]
+ Button report-error-button {
+ label: 'Report Error';
+ }
+
+ [action]
+ Button close-multiplex-button {
+ styles [
+ "destructive-action",
+ ]
+
+ label: 'Close Multiplex';
+ }
+}
diff --git a/internal/resources/error.ui b/internal/resources/error.ui
deleted file mode 100644
index c458f54..0000000
--- a/internal/resources/error.ui
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
- true
- A Fatal Error Occured
-
- error
-
-
-
- Report Error
-
-
-
-
-
-
-
- Close Multiplex
-
-
-
-
\ No newline at end of file
diff --git a/internal/resources/menu.blp b/internal/resources/menu.blp
new file mode 100644
index 0000000..7e2c85a
--- /dev/null
+++ b/internal/resources/menu.blp
@@ -0,0 +1,26 @@
+using Gtk 4.0;
+
+menu main-menu {
+ section {
+ item {
+ label: _('Open Downloads');
+ action: 'win.opendownloads';
+ }
+
+ item {
+ label: _('Copy Magnet Link');
+ action: 'win.copymagnetlink';
+ }
+
+ item {
+ label: _('Preferences');
+ action: 'win.preferences';
+ accel: 'comma';
+ }
+
+ item {
+ label: _('About Multiplex');
+ action: 'win.about';
+ }
+ }
+}
diff --git a/internal/resources/menu.ui b/internal/resources/menu.ui
deleted file mode 100644
index 1dbafbf..0000000
--- a/internal/resources/menu.ui
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/internal/resources/preferences.blp b/internal/resources/preferences.blp
new file mode 100644
index 0000000..043f35d
--- /dev/null
+++ b/internal/resources/preferences.blp
@@ -0,0 +1,218 @@
+using Gtk 4.0;
+using Adw 1;
+
+Adw.PreferencesDialog preferences-dialog {
+ Adw.PreferencesPage {
+ title: _('Playback');
+ icon-name: 'multimedia-player-symbolic';
+
+ Adw.PreferencesGroup {
+ title: _('General');
+
+ Adw.ActionRow {
+ title: _('Storage location');
+ subtitle: _('Path to store downloaded torrents in');
+ activatable-widget: storage-location-input;
+
+ Button storage-location-input {
+ styles [
+ "flat",
+ ]
+
+ icon-name: 'folder-symbolic';
+ valign: center;
+ }
+ }
+
+ Adw.EntryRow mpv-command-input {
+ title: _('Player command');
+
+ MenuButton {
+ styles [
+ "flat",
+ "circular",
+ ]
+
+ icon-name: 'help-about';
+ tooltip-text: 'Show help';
+ valign: center;
+ popover: mpv-command-input-help-popover;
+ }
+ }
+ }
+
+ Adw.PreferencesGroup {
+ title: _('Advanced');
+
+ Adw.SpinRow verbosity-level-input {
+ title: _('Verbosity level');
+ subtitle: _('Verbosity level (0 is disabled, default is info, 7 is trace)');
+
+ adjustment: Adjustment {};
+ }
+
+ Adw.ExpanderRow {
+ title: _('Remoting');
+
+ Adw.ActionRow {
+ title: _('Use remote gateway');
+ subtitle: _('Use a remote hTorrent gateway instead of the local one');
+ activatable-widget: htorrent-remote-gateway-switch;
+
+ Switch htorrent-remote-gateway-switch {
+ valign: center;
+ }
+ }
+
+ Adw.EntryRow htorrent-url-input {
+ title: _('URL');
+ editable: false;
+
+ MenuButton {
+ styles [
+ "flat",
+ "circular",
+ ]
+
+ icon-name: 'help-about';
+ tooltip-text: 'Show help';
+ valign: center;
+ popover: htorrent-url-input-popover;
+ }
+ }
+
+ Adw.EntryRow htorrent-username-input {
+ title: _('Username');
+ editable: false;
+
+ MenuButton {
+ styles [
+ "flat",
+ "circular",
+ ]
+
+ icon-name: 'help-about';
+ tooltip-text: 'Show help';
+ valign: center;
+ popover: htorrent-username-input-popover;
+ }
+ }
+
+ Adw.PasswordEntryRow htorrent-password-input {
+ title: _('Password');
+ editable: false;
+
+ MenuButton {
+ styles [
+ "flat",
+ "circular",
+ ]
+
+ icon-name: 'help-about';
+ tooltip-text: 'Show help';
+ valign: center;
+ popover: htorrent-password-input-popover;
+ }
+ }
+ }
+ }
+ }
+
+ Adw.PreferencesPage {
+ title: _('Synchronization');
+ icon-name: 'video-joined-displays-symbolic';
+
+ Adw.PreferencesGroup {
+ title: _('General');
+
+ Adw.EntryRow weron-url-input {
+ title: _('Signaling server URL');
+
+ MenuButton {
+ styles [
+ "flat",
+ "circular",
+ ]
+
+ icon-name: 'help-about';
+ tooltip-text: 'Show help';
+ valign: center;
+ popover: weron-url-input-popover;
+ }
+ }
+
+ Adw.EntryRow weron-ice-input {
+ title: _('STUN/TURN servers');
+
+ MenuButton {
+ styles [
+ "flat",
+ "circular",
+ ]
+
+ icon-name: 'help-about';
+ tooltip-text: 'Show help';
+ valign: center;
+ popover: weron-ice-input-popover;
+ }
+ }
+ }
+
+ Adw.PreferencesGroup {
+ title: _('Advanced');
+
+ Adw.SpinRow weron-timeout-input {
+ title: _('Connection timeout');
+ subtitle: _('Time to wait to connect to the weron signaling server');
+
+ adjustment: Adjustment {};
+ }
+
+ Adw.ActionRow {
+ title: _('Relay mode');
+ subtitle: _('Force usage of TURN servers for weron');
+ activatable-widget: weron-force-relay-input;
+
+ Switch weron-force-relay-input {
+ valign: center;
+ }
+ }
+ }
+ }
+}
+
+Popover mpv-command-input-help-popover {
+ Label {
+ label: 'Command to launch mpv with';
+ }
+}
+
+Popover htorrent-url-input-popover {
+ Label {
+ label: 'API address of the remote gateway';
+ }
+}
+
+Popover htorrent-username-input-popover {
+ Label {
+ label: 'The remote gateway\'s username';
+ }
+}
+
+Popover htorrent-password-input-popover {
+ Label {
+ label: 'The remote gateway\'s password';
+ }
+}
+
+Popover weron-url-input-popover {
+ Label {
+ label: 'URL for the weron signaling server';
+ }
+}
+
+Popover weron-ice-input-popover {
+ Label {
+ label: 'Comma-separated list of weron STUN (in format stun:host:port) and TURN servers (in format username:credential@turn:host:port)';
+ }
+}
diff --git a/internal/resources/preferences.ui b/internal/resources/preferences.ui
index 0989856..77749df 100644
--- a/internal/resources/preferences.ui
+++ b/internal/resources/preferences.ui
@@ -1,292 +1,248 @@
-
+
-
-
-
-
+
+
+
+
+ Playback
+ multimedia-player-symbolic
-
- Playback
- multimedia-player-symbolic
-
+
+ General
+
+
+ Storage location
+ Path to store downloaded torrents in
+ storage-location-input
-
- General
-
-
-
- Storage location
- Path to store downloaded torrents in
- storage-location-input
-
-
-
-
-
- folder-symbolic
- center
-
-
-
-
-
-
-
- Player command
-
-
-
-
-
-
-
+
+
+ folder-symbolic
+ 3
+
-
+
+
+
+
+ Player command
-
- Advanced
-
-
-
- Verbosity level
- Verbosity level (0 is disabled, default is info, 7 is trace)
-
-
-
-
-
-
-
-
-
- Remoting
-
-
-
- Use remote gateway
- Use a remote hTorrent gateway instead of the local one
- htorrent-remote-gateway-switch
-
-
-
- center
-
-
-
-
-
-
-
- URL
- false
-
-
-
-
-
-
-
-
-
- Username
- false
-
-
-
-
-
-
-
-
-
- Password
- false
-
-
-
-
-
-
-
-
-
+
-
+
+
+
-
-
- Synchronization
- video-joined-displays-symbolic
-
+
+ Advanced
+
+
+ Verbosity level
+ Verbosity level (0 is disabled, default is info, 7 is trace)
+
+
+
+
+
+
+
+ Remoting
-
- General
-
-
-
- Signaling server URL
-
-
-
-
-
-
-
-
-
- STUN/TURN servers
-
-
-
-
-
-
-
+
+ Use remote gateway
+ Use a remote hTorrent gateway instead of the local one
+ htorrent-remote-gateway-switch
+
+
+ 3
+
+
+
-
-
- Advanced
-
-
-
- Connection timeout
- Time to wait to connect to the weron signaling server
-
-
-
-
-
-
-
-
-
- Relay mode
- Force usage of TURN servers for weron
- weron-force-relay-input
-
-
-
- center
-
-
-
-
-
+
+ URL
+ false
+
+
+
+
-
-
-
-
-
-
-
-
- Command to launch mpv with
-
-
-
-
-
-
-
- API address of the remote gateway
-
-
-
-
-
-
-
- The remote gateway's username
-
-
-
-
-
-
-
- The remote gateway's password
-
+
+
+ Username
+ false
+
+
+
+
+
+
+
+ Password
+ false
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+ Synchronization
+ video-joined-displays-symbolic
-
- URL for the weron signaling server
-
+
+ General
+
+
+ Signaling server URL
+
+
+
+
+
+
+
+ STUN/TURN servers
+
+
+
+
+
+
-
-
-
-
- Comma-separated list of weron STUN (in format stun:host:port) and TURN servers (in format username:credential@turn:host:port)
-
+
+ Advanced
+
+
+ Connection timeout
+ Time to wait to connect to the weron signaling server
+
+
+
+
+
+
+
+ Relay mode
+ Force usage of TURN servers for weron
+ weron-force-relay-input
+
+
+ 3
+
+
+
+
+
-
+
+
+
+
+
+
+ Command to launch mpv with
+
+
+
+
+
+
+ API address of the remote gateway
+
+
+
+
+
+
+ The remote gateway's username
+
+
+
+
+
+
+ The remote gateway's password
+
+
+
+
+
+
+ URL for the weron signaling server
+
+
+
+
+
+
+ Comma-separated list of weron STUN (in format stun:host:port) and TURN servers (in format username:credential@turn:host:port)
+
+
+
\ No newline at end of file
diff --git a/internal/resources/preparing.blp b/internal/resources/preparing.blp
new file mode 100644
index 0000000..d4790d0
--- /dev/null
+++ b/internal/resources/preparing.blp
@@ -0,0 +1,47 @@
+using Gtk 4.0;
+using Adw 1;
+
+Adw.Window preparing-window {
+ modal: true;
+
+ [content]
+ WindowHandle {
+ Box {
+ orientation: vertical;
+ valign: center;
+ halign: center;
+ margin-top: 12;
+ margin-start: 12;
+ margin-end: 12;
+ margin-bottom: 12;
+
+ Label {
+ styles [
+ "title",
+ ]
+
+ label: 'Preparing stream ...';
+ margin-bottom: 12;
+ }
+
+ ProgressBar preparing-progress-bar {
+ styles [
+ "preparing-progress-bar",
+ ]
+
+ show-text: true;
+ margin-bottom: 8;
+ }
+
+ [action]
+ Button cancel-preparing-button {
+ styles [
+ "destructive-action",
+ ]
+
+ margin-top: 8;
+ label: 'Cancel';
+ }
+ }
+ }
+}
diff --git a/internal/resources/preparing.ui b/internal/resources/preparing.ui
deleted file mode 100644
index 0315eb8..0000000
--- a/internal/resources/preparing.ui
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
- true
-
-
-
-
-
- vertical
- center
- center
- 12
- 12
- 12
- 12
-
-
-
-
-
- Preparing stream ...
- 12
-
-
-
-
-
-
-
- true
- 8
-
-
-
-
-
-
-
- 8
- Cancel
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/internal/resources/resources.go b/internal/resources/resources.go
index 8adae11..04530e4 100644
--- a/internal/resources/resources.go
+++ b/internal/resources/resources.go
@@ -7,10 +7,6 @@ import (
const GAppID = "com.pojtinger.felicitas.Multiplex"
-//go:generate glib-compile-schemas .
-//go:embed gschemas.compiled
-var GSchema []byte
-
const (
GSchemaVerboseKey = "verbose"
GSchemaStorageKey = "storage"
@@ -27,23 +23,45 @@ const (
GSchemaWeronForceRelayKey = "weronforcerelay"
)
+//go:generate glib-compile-schemas .
+//go:embed gschemas.compiled
+var GSchema []byte
+
+const gResourceAppPath = "/com/pojtinger/felicitas/Multiplex/"
+
+//go:generate blueprint-compiler compile --output assistant.ui assistant.blp
+var GResourceAssistantPath = path.Join(gResourceAppPath, "assistant.ui")
+
+//go:generate blueprint-compiler compile --output assistant.ui assistant.blp
+var GResourceControlsPath = path.Join(gResourceAppPath, "controls.ui")
+
+//go:generate blueprint-compiler compile --output assistant.ui assistant.blp
+var GResourceDescriptionPath = path.Join(gResourceAppPath, "description.ui")
+
+//go:generate blueprint-compiler compile --output assistant.ui assistant.blp
+var GResourceWarningPath = path.Join(gResourceAppPath, "warning.ui")
+
+//go:generate blueprint-compiler compile --output error.ui error.blp
+var GResourceErrorPath = path.Join(gResourceAppPath, "error.ui")
+
+//go:generate blueprint-compiler compile --output menu.ui menu..blp
+var GResourceMenuPath = path.Join(gResourceAppPath, "menu.ui")
+
+//go:generate blueprint-compiler compile --output preferences.ui preferences.blp
+var GResourcePreferencesPath = path.Join(gResourceAppPath, "preferences.ui")
+
+//go:generate blueprint-compiler compile --output subtitles.ui subtitles.blp
+var GResourceSubtitlesPath = path.Join(gResourceAppPath, "subtitles.ui")
+
+//go:generate blueprint-compiler compile --output audiotracks.ui audiotracks.blp
+var GResourceAudiotracksPath = path.Join(gResourceAppPath, "audiotracks.ui")
+
+//go:generate blueprint-compiler compile --output preparing.ui preparing.blp
+var GResourcePreparingPath = path.Join(gResourceAppPath, "preparing.ui")
+
+var GResourceStyleCSSPath = path.Join(gResourceAppPath, "style.css")
+var GResourceMetainfoPath = path.Join(gResourceAppPath, "com.pojtinger.felicitas.Multiplex.metainfo.xml")
+
//go:generate glib-compile-resources com.pojtinger.felicitas.Multiplex.gresource.xml
//go:embed com.pojtinger.felicitas.Multiplex.gresource
var GResource []byte
-
-var (
- gResourceAppPath = "/com/pojtinger/felicitas/Multiplex/"
-
- GResourceAssistantPath = path.Join(gResourceAppPath, "assistant.ui")
- GResourceControlsPath = path.Join(gResourceAppPath, "controls.ui")
- GResourceDescriptionPath = path.Join(gResourceAppPath, "description.ui")
- GResourceWarningPath = path.Join(gResourceAppPath, "warning.ui")
- GResourceErrorPath = path.Join(gResourceAppPath, "error.ui")
- GResourceMenuPath = path.Join(gResourceAppPath, "menu.ui")
- GResourcePreferencesPath = path.Join(gResourceAppPath, "preferences.ui")
- GResourceSubtitlesPath = path.Join(gResourceAppPath, "subtitles.ui")
- GResourceAudiotracksPath = path.Join(gResourceAppPath, "audiotracks.ui")
- GResourcePreparingPath = path.Join(gResourceAppPath, "preparing.ui")
- GResourceStyleCSSPath = path.Join(gResourceAppPath, "style.css")
- GResourceMetainfoPath = path.Join(gResourceAppPath, "com.pojtinger.felicitas.Multiplex.metainfo.xml")
-)
diff --git a/internal/resources/warning.blp b/internal/resources/warning.blp
new file mode 100644
index 0000000..819eb80
--- /dev/null
+++ b/internal/resources/warning.blp
@@ -0,0 +1,23 @@
+using Gtk 4.0;
+
+MessageDialog warning-dialog {
+ modal: true;
+ text: 'No Media Player Could Be Found';
+ secondary-text: 'Please install mpv or configure the exisiting installation to able to play media.';
+
+ [action]
+ Button mpv-download-flathub-button {
+ label: 'Get from Flathub';
+ visible: false;
+ }
+
+ [action]
+ Button mpv-download-website-button {
+ label: 'Get from mpv.io';
+ }
+
+ [action]
+ Button mpv-manual-configuration-button {
+ label: 'Manual configuration';
+ }
+}
diff --git a/internal/resources/warning.ui b/internal/resources/warning.ui
deleted file mode 100644
index 276875e..0000000
--- a/internal/resources/warning.ui
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
- true
- No Media Player Could Be Found
- Please install mpv or configure the exisiting installation to able to play media.
-
-
-
- Get from Flathub
- false
-
-
-
-
-
- Get from mpv.io
-
-
-
-
-
- Manual configuration
-
-
-
-
\ No newline at end of file