Skip to content

Commit 15f9c72

Browse files
authored
Remove sandbox detection (#102)
1 parent a84d84d commit 15f9c72

8 files changed

Lines changed: 9 additions & 100 deletions

com.cassidyjames.clairvoyant.Devel.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,6 @@
1111
"--device=dri"
1212
],
1313
"modules": [
14-
{
15-
"name": "libportal",
16-
"buildsystem": "meson",
17-
"config-opts": [
18-
"-Ddocs=false",
19-
"-Dbackend-gtk4=enabled"
20-
],
21-
"sources": [
22-
{
23-
"type": "git",
24-
"url": "https://github.com/flatpak/libportal.git",
25-
"tag": "0.9.1",
26-
"commit": "8f5dc8d192f6e31dafe69e35219e3b707bde71ce",
27-
"x-checker-data": {
28-
"type": "git",
29-
"tag-pattern": "^([\\d.]+)$"
30-
}
31-
}
32-
]
33-
},
3414
{
3515
"name": "clairvoyant",
3616
"buildsystem": "meson",

com.cassidyjames.clairvoyant.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,6 @@
1111
"--device=dri"
1212
],
1313
"modules": [
14-
{
15-
"name": "libportal",
16-
"buildsystem": "meson",
17-
"config-opts": [
18-
"-Ddocs=false",
19-
"-Dbackend-gtk4=enabled"
20-
],
21-
"sources": [
22-
{
23-
"type": "git",
24-
"url": "https://github.com/flatpak/libportal.git",
25-
"tag": "0.9.1",
26-
"commit": "8f5dc8d192f6e31dafe69e35219e3b707bde71ce",
27-
"x-checker-data": {
28-
"type": "git",
29-
"tag-pattern": "^([\\d.]+)$"
30-
}
31-
}
32-
]
33-
},
3414
{
3515
"name": "clairvoyant",
3616
"buildsystem": "meson",

data/gschema.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

data/meson.build

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ install_data(
1010
rename: meson.project_name() + '-symbolic.svg'
1111
)
1212

13-
install_data(
14-
'gschema.xml',
15-
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
16-
rename: meson.project_name() + '.gschema.xml'
17-
)
18-
1913
desktop_file = i18n.merge_file(
2014
input: 'launcher.desktop.in',
2115
output: meson.project_name() + '.desktop',

data/metainfo.appdata.xml.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@
6464
</screenshots>
6565

6666
<releases>
67+
<release version="3.1.12" date="2025-11-01">
68+
<description>
69+
<p>Ubuntu Summit 25.10</p>
70+
<ul>
71+
<li>Removed sandbox detection for Soumya</li>
72+
</ul>
73+
</description>
74+
</release>
6775
<release version="3.1.11" date="2025-10-30">
6876
<description>
6977
<p>GNOME 49 “Brescia”</p>

meson.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'com.cassidyjames.clairvoyant',
33
'vala', 'c',
4-
version: '3.1.11',
4+
version: '3.1.12',
55
meson_version: '>=1.5.2',
66
)
77

@@ -66,7 +66,6 @@ executable(
6666
dependency('glib-2.0', version: '>=2.82.0'),
6767
dependency('gtk4', version: '>=4.19.4'),
6868
dependency('libadwaita-1', version: '>=1.8.1'),
69-
dependency('libportal', version: '>=0.9.1'),
7069
],
7170
c_args: c_args, vala_args: vala_args,
7271
install: true

src/Application.vala

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,19 @@
44
*/
55

66
public class Clairvoyant : Adw.Application {
7-
public static GLib.Settings settings;
8-
97
public Clairvoyant () {
108
Object (
119
application_id: APP_ID,
1210
flags: ApplicationFlags.FLAGS_NONE
1311
);
1412
}
1513

16-
static construct {
17-
settings = new Settings (APP_ID);
18-
}
19-
2014
protected override void activate () {
2115
if (get_windows ().length () > 0) {
2216
get_windows ().data.present ();
2317
return;
2418
}
2519

26-
if (Clairvoyant.settings.get_int64 ("last") == int64.MIN) {
27-
Clairvoyant.settings.set_int64 ("last", new DateTime.now_utc ().to_unix ());
28-
}
29-
3020
var main_window = new MainWindow (this);
3121
main_window.show ();
3222

src/MainWindow.vala

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,30 +56,10 @@ public class MainWindow : Adw.ApplicationWindow {
5656
ask_button.add_css_class ("suggested-action");
5757
ask_button.add_css_class ("pill");
5858

59-
var banner = new Adw.Banner (_("Unsupported version of this app")) {
60-
button_label = _("_Learn More…"),
61-
revealed = true
62-
};
63-
64-
string[] env = Environ.get ();
65-
try {
66-
banner.revealed = (
67-
Clairvoyant.settings.get_int64 ("last") < new DateTime.now_utc ().to_unix () - 86400 && (
68-
! Xdp.Portal.running_under_flatpak () ||
69-
Xdp.Portal.running_under_snap () ||
70-
Environ.get_variable (env, "FLATPAK_ID") != APP_ID ||
71-
Environ.get_variable (env, "APPIMAGE") != null
72-
)
73-
);
74-
} catch (Error e) {
75-
critical ("Unable to detect sandbox");
76-
}
77-
7859
var main_layout = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
7960
main_layout.append (header);
8061
main_layout.append (fortune_label);
8162
main_layout.append (ask_button);
82-
main_layout.append (banner);
8363

8464
var window_handle = new Gtk.WindowHandle () {
8565
child = main_layout
@@ -93,16 +73,6 @@ public class MainWindow : Adw.ApplicationWindow {
9373

9474
about_button.clicked.connect (() => about_window.present () );
9575
ask_button.clicked.connect (() => randomize_fortune (fortune_label) );
96-
97-
banner.button_clicked.connect (() => {
98-
Clairvoyant.settings.set_int64 ("last", new DateTime.now_utc ().to_unix ());
99-
banner.revealed = false;
100-
try {
101-
new Gtk.UriLauncher (about_window.website + "#only-on-flathub").launch.begin (null, null);
102-
} catch (Error e) {
103-
critical ("Unable to open link");
104-
}
105-
});
10676
}
10777

10878
private void randomize_fortune (

0 commit comments

Comments
 (0)