[bijiben] import-dialog: check application paths for import
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] import-dialog: check application paths for import
- Date: Tue, 14 Nov 2017 00:36:34 +0000 (UTC)
commit 1587d8ec7f0ddbcdb09fdc23acfda0e9e917b9a0
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Mon Nov 13 18:08:03 2017 +0530
import-dialog: check application paths for import
Now, the presence of application icons of Tomboy and Gnote are checked
to see if we have some note to import.
Instead it would be better to check if those application have some
notes in their data directory.
This commit checks for the presence of data path for import.
https://bugzilla.gnome.org/show_bug.cgi?id=790288
src/bjb-import-dialog.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/bjb-import-dialog.c b/src/bjb-import-dialog.c
index 90357b2..9d76828 100644
--- a/src/bjb-import-dialog.c
+++ b/src/bjb-import-dialog.c
@@ -425,15 +425,21 @@ bjb_import_dialog_constructed (GObject *obj)
* these are only packed if app is installed */
path = g_build_filename (g_get_user_data_dir (), "tomboy", NULL);
- child = add_application ("tomboy", _("Tomboy application"), path);
- if (child)
- gtk_container_add (GTK_CONTAINER (self->box), child->overlay);
+ if (g_file_test (path, G_FILE_TEST_EXISTS))
+ {
+ child = add_application ("tomboy", _("Tomboy application"), path);
+ if (child)
+ gtk_container_add (GTK_CONTAINER (self->box), child->overlay);
+ }
path = g_build_filename (g_get_user_data_dir (), "gnote", NULL);
- child = add_application ("gnote", _("Gnote application"), path);
- if (child)
- gtk_container_add (GTK_CONTAINER (self->box), child->overlay);
+ if (g_file_test (path, G_FILE_TEST_EXISTS))
+ {
+ child = add_application ("gnote", _("Gnote application"), path);
+ if (child)
+ gtk_container_add (GTK_CONTAINER (self->box), child->overlay);
+ }
/* User decides path */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]