[gnome-photos] base-item: Don't open items without a default app
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Don't open items without a default app
- Date: Fri, 11 Dec 2015 16:22:32 +0000 (UTC)
commit c6363defff652727cdd196e6e9f4ce75c53da0e6
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Dec 11 16:25:52 2015 +0100
base-item: Don't open items without a default app
It can happen that a LocalItem didn't set a default application either
because the MIME type was unknown, or because no application could be
found. Don't try to force it open if that happens.
Original patch from Bastien Nocera for gnome-documents.
https://bugzilla.gnome.org/show_bug.cgi?id=740434
src/photos-base-item.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index eb9a05d..98cef17 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -387,6 +387,9 @@ photos_base_item_default_open (PhotosBaseItem *self, GdkScreen *screen, guint32
PhotosBaseItemPrivate *priv = self->priv;
GError *error;
+ if (priv->default_app_name == NULL)
+ return;
+
error = NULL;
gtk_show_uri (screen, priv->uri, timestamp, &error);
if (error != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]