summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2015-12-11 11:07:52 +0100
committerCarlos Soriano <csoriano@gnome.org>2015-12-11 11:07:52 +0100
commit2beb9cdd9794b2604b70469c660be908cf9d7383 (patch)
treea90023f5f306c697587385dccaa7930493ea0c49
parent19730073499fcd71ccfd1622e15d94e648f1e844 (diff)
downloadnautilus-2beb9cdd9794b2604b70469c660be908cf9d7383.tar.gz
mime-actions: use explicit slot for opening locations
Even if we wanted to always use the active window as the default action to open locations, seems gtk_get_active_windows doesn't work as expected for us. Until we figure out the problem, pass explicitly the target slot that the caller provides so users don't experience the location opening in a different window than the expected.
-rw-r--r--src/nautilus-mime-actions.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 9237cd5b9..c5cae5c0e 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1550,8 +1550,12 @@ activate_files (ActivateParameters *parameters)
uri = nautilus_file_get_activation_uri (file);
f = g_file_new_for_uri (uri);
+ /* FIXME: we need to pass the parent_window, but we only use it for the current active window,
+ * which nautilus-application should take care of. However is not working and creating regressions
+ * in some cases. Until we figure out what's going on, continue to use the parameters->slot
+ * to make splicit the window we want to use for activating the files */
nautilus_application_open_location_full (NAUTILUS_APPLICATION (g_application_get_default ()),
- f, flags, NULL, NULL, NULL);
+ f, flags, NULL, NULL, parameters->slot);
g_object_unref (f);
g_free (uri);
}