From 19b59255f7682ab3acf0ce9bdb62de592f69617b Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Tue, 31 Mar 2020 15:14:24 +0100 Subject: [PATCH] Ref #676: Simultaneous runs of geeqie interfere with each other https://github.com/BestImageViewer/geeqie/issues/676 Fix some bugs relating to the way files and folders are handled in a --remote command line. --- src/remote.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/remote.c b/src/remote.c index e89ebb1d..a374cabc 100644 --- a/src/remote.c +++ b/src/remote.c @@ -458,6 +458,7 @@ static void gr_new_window(const gchar *text, GIOChannel *channel, gpointer data) if (!layout_valid(&lw)) return; lw_id = layout_menu_new_window(NULL, lw); + layout_set_path(lw_id, pwd); } static gboolean gr_close_window_cb() @@ -1207,8 +1208,7 @@ static void gr_list_add(const gchar *text, GIOChannel *channel, gpointer data) if (collection_add(remote_data->command_collection, file_data_new_group(text), FALSE) && new) { - layout_image_set_collection(NULL, remote_data->command_collection, - collection_get_first(remote_data->command_collection)); + layout_image_set_collection(lw_id, remote_data->command_collection, collection_get_first(remote_data->command_collection)); } } @@ -1226,8 +1226,15 @@ static void gr_pwd(const gchar *text, GIOChannel *channel, gpointer data) { LayoutWindow *lw = NULL; + lw = layout_find_by_layout_id("main"); + if (!lw) + { + lw = g_list_first(layout_window_list)->data; + } + g_free(pwd); pwd = g_strdup(text); + lw_id = lw; } static void gr_print0(const gchar *text, GIOChannel *channel, gpointer data) @@ -1436,7 +1443,7 @@ GList *remote_build_list(GList *list, gint argc, gchar *argv[], GList **errors) { list = g_list_append(list, argv[i]); } - else if (errors && !isfile(argv[i])) + else if (errors && !isname(argv[i])) { *errors = g_list_append(*errors, argv[i]); } -- 2.20.1