[shotwell] Check for portal on start
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Check for portal on start
- Date: Sat, 12 Mar 2022 13:29:51 +0000 (UTC)
commit f0d5147a7990bd48dd7045891a24500f9e332dad
Author: Jens Georg <mail jensge org>
Date: Sat Mar 12 14:29:29 2022 +0100
Check for portal on start
src/DesktopIntegration.vala | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/DesktopIntegration.vala b/src/DesktopIntegration.vala
index 124b9a43..024bc8b2 100644
--- a/src/DesktopIntegration.vala
+++ b/src/DesktopIntegration.vala
@@ -21,6 +21,12 @@ private bool set_screensaver = false;
public void init() {
if (init_count++ != 0)
return;
+ try{
+ Portal.get_instance();
+ send_to_installed = true;
+ } catch (Error error) {
+ send_to_installed = false;
+ }
}
public void terminate() {
@@ -87,6 +93,7 @@ public string? get_app_open_command(AppInfo app_info) {
}
public bool is_send_to_installed() {
+ // FIXME: Check if portal is available
return send_to_installed;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]