mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-06-30 23:46:35 +00:00
mime-actions: Open locations directly on slot
While the FileChooser will not want to launch files in handler apps on activation, it still needs to activate items that open in view. For regular folders it would be trivial, but for mountables it would have to reimplement logic that's already present in mime-actions.c In order to make it possible to use `nautilus_mime_activate_files()` from the FileChooser to open items in view, we need to stop relying a NautilusApplication method, because the upcoming FileChooser will not be a NautilusApplication window. Since we already pass the slot as a pointer, we can just use the slot method directly, which produces the same effect here anyway.
This commit is contained in:
parent
a01c4f3ce8
commit
210a260fc9
|
@ -38,6 +38,7 @@
|
|||
#include "nautilus-scheme.h"
|
||||
#include "nautilus-signaller.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-window-slot.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -1644,12 +1645,10 @@ activate_files_internal (ActivateParameters *parameters)
|
|||
}
|
||||
|
||||
location_with_permissions = 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 ()),
|
||||
location_with_permissions, parameters->flags, NULL, NULL, parameters->slot);
|
||||
nautilus_window_slot_open_location_full (parameters->slot,
|
||||
location_with_permissions,
|
||||
parameters->flags,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user