From 1587a78a75f4577f73953d6ba4151c7adf0c087d Mon Sep 17 00:00:00 2001 From: soumyadghosh Date: Mon, 19 Feb 2024 23:17:16 +0530 Subject: [PATCH] Various snap related changes 1. Updated the `quick-add` command when using as a snap 2. Updated gitignore to ignore snap related files 3. Updated README with snap release --- .gitignore | 3 ++- README.md | 4 ++++ src/Dialogs/Preferences/PreferencesWindow.vala | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 05abb2779..1ba5e498c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ build-aux/.flatpak-builder build-aux/io.github.alainm23.planify.Devel.flatpak .flatpak-builder/ subprojects/gxml - +*.snap +planify*txt diff --git a/README.md b/README.md index 37c577b82..bf862cfe6 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ Download on Flathub + + Get it from the Snap Store + + ## 🛠 Compile You'll need the following dependencies: diff --git a/src/Dialogs/Preferences/PreferencesWindow.vala b/src/Dialogs/Preferences/PreferencesWindow.vala index 1b18f0c9c..165149027 100644 --- a/src/Dialogs/Preferences/PreferencesWindow.vala +++ b/src/Dialogs/Preferences/PreferencesWindow.vala @@ -1059,7 +1059,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { private Adw.NavigationPage get_quick_add_page () { var settings_header = new Dialogs.Preferences.SettingsHeader (_("Quick Add")); - string quick_add_command = "flatpak run --command=io.github.alainm23.planify.quick-add %s".printf (Build.APPLICATION_ID); + string quick_add_command = GLib.Environment.get_variable("SNAP") != "" ? "planify.quick-add" : "flatpak run --command=io.github.alainm23.planify.quick-add %s".printf (Build.APPLICATION_ID); var description_label = new Gtk.Label ( _("Use Quick Add to create to-dos from anywhere on your desktop with just a few keystrokes. You don’t even have to leave the app you’re currently in.") // vala-lint=line-length