[gnome-photos/wip/rishi/tracker3: 3/4] utils: Add photos_utils_is_flatpak
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/tracker3: 3/4] utils: Add photos_utils_is_flatpak
- Date: Thu, 11 Mar 2021 23:03:04 +0000 (UTC)
commit f652dd88ce37f8a367b60146724d27c17e334c51
Author: Sam Thursfield <sam afuera me uk>
Date: Sat Mar 6 14:04:26 2021 +0100
utils: Add photos_utils_is_flatpak
A subsequent commit will port to Tracker 3. This function will be used
to start a private instance of Tracker 3's filesystem miner when
running as a Flatpak on hosts without Tracker 3.
https://gitlab.gnome.org/GNOME/gnome-photos/-/issues/152
src/photos-utils.c | 10 ++++++++++
src/photos-utils.h | 2 ++
2 files changed, 12 insertions(+)
---
diff --git a/src/photos-utils.c b/src/photos-utils.c
index 1d7be577..76e8f5e0 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -1132,6 +1132,16 @@ photos_utils_get_version (void)
}
+gboolean
+photos_utils_is_flatpak (void)
+{
+ gboolean ret_val;
+
+ ret_val = g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
+ return ret_val;
+}
+
+
void
photos_utils_launch_online_accounts (const gchar *account_id)
{
diff --git a/src/photos-utils.h b/src/photos-utils.h
index a4d69abf..1e7a4cb7 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -154,6 +154,8 @@ GList *photos_utils_get_urns_from_items (GList *items);
const gchar *photos_utils_get_version (void);
+gboolean photos_utils_is_flatpak (void);
+
void photos_utils_launch_online_accounts (const gchar *account_id);
void photos_utils_list_box_header_func (GtkListBoxRow *row,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]