[atril] 01/02: debian/patches: Add 0001_open-multiple-files.patch. Allow selecting multiple files and opening them in Atril. (Closes: #772014).

Mike Gabriel sunweaver at debian.org
Thu Dec 4 11:37:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository atril.

commit cf9e8c2f345fc5c5c47c48d2a7584858b3e85ee9
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Dec 4 12:31:58 2014 +0100

    debian/patches: Add 0001_open-multiple-files.patch. Allow selecting multiple files and opening them in Atril. (Closes: #772014).
---
 debian/patches/0001_open-multiple-files.patch | 48 +++++++++++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 49 insertions(+)

diff --git a/debian/patches/0001_open-multiple-files.patch b/debian/patches/0001_open-multiple-files.patch
new file mode 100644
index 0000000..fb93646
--- /dev/null
+++ b/debian/patches/0001_open-multiple-files.patch
@@ -0,0 +1,48 @@
+From cee6caa16804a4c4b539518b37d81c1470ca9270 Mon Sep 17 00:00:00 2001
+From: Stefano Karapetsas <stefano at karapetsas.com>
+Date: Mon, 13 Oct 2014 16:20:51 +0200
+Subject: [PATCH] Uses g_app_info_launch_uris instead of g_app_info_launch to
+ spawn other sessions
+
+Closes https://github.com/mate-desktop/atril/issues/86
+
+Solution comes from evince code
+---
+ shell/ev-application.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/shell/ev-application.c b/shell/ev-application.c
+index 220519d..da6366f 100644
+--- a/shell/ev-application.c
++++ b/shell/ev-application.c
+@@ -282,12 +282,13 @@ ev_spawn (const char     *uri,
+ 		break;
+ 	}
+ 
+-	g_string_append_printf (cmd, " %s", uri);
+-
+ 	cmdline = g_string_free (cmd, FALSE);
+ 	app = g_app_info_create_from_commandline (cmdline, NULL, 0, &error);
+ 
+ 	if (app != NULL) {
++		GList uri_list;
++		GList *uris = NULL;
++
+ #if GTK_CHECK_VERSION (3, 0, 0)
+ 		ctx = gdk_display_get_app_launch_context (gdk_screen_get_display (screen));
+ #else
+@@ -297,7 +298,12 @@ ev_spawn (const char     *uri,
+ 		gdk_app_launch_context_set_screen (ctx, screen);
+ 		gdk_app_launch_context_set_timestamp (ctx, timestamp);
+ 
+-		g_app_info_launch (app, NULL, G_APP_LAUNCH_CONTEXT (ctx), &error);
++		if (uri) {
++			uri_list.data = (gchar *)uri;
++			uri_list.prev = uri_list.next = NULL;
++			uris = &uri_list;
++		}
++		g_app_info_launch_uris (app, uris, G_APP_LAUNCH_CONTEXT (ctx), &error);
+ 
+ 		g_object_unref (app);
+ 		g_object_unref (ctx);
+
diff --git a/debian/patches/series b/debian/patches/series
index 83b110e..586cb5d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+0001_open-multiple-files.patch
 2001_omit-gfdl-licensed-help-files.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/atril.git



More information about the pkg-mate-commits mailing list