From 9b704374c78ad2f860a4dd286512c7ba1ff94b7a Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Mon, 20 Feb 2017 03:40:07 -0800 Subject: [PATCH] Fix calling set_command_line_wait() We were passing the wrong arguments Based on https://github.com/GNOME/gedit/commit/2e3b5aea0e8810e6946ce4daf64fceea9a9f47a9 Fixes: https://github.com/linuxmint/xed/issues/90 --- xed/xed-app.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xed/xed-app.c b/xed/xed-app.c index ffb202c..1ecc587 100644 --- a/xed/xed-app.c +++ b/xed/xed-app.c @@ -388,6 +388,15 @@ set_command_line_wait (XedApp *app, (GDestroyNotify)g_object_unref); } +static void +set_command_line_wait_doc (XedDocument *doc, + XedApp *app) +{ + XedTab *tab = xed_tab_get_from_document (doc); + + set_command_line_wait (app, tab); +} + static void open_files (GApplication *application, gboolean new_window, @@ -451,7 +460,7 @@ open_files (GApplication *application, if (command_line) { - g_slist_foreach (loaded, (GFunc)set_command_line_wait, NULL); + g_slist_foreach (loaded, (GFunc)set_command_line_wait_doc, XED_APP (application)); } g_slist_free (loaded); }