Make a middle click open items in a new instance

This commit is contained in:
2021-11-20 12:45:05 +01:00
parent 3e9a388537
commit 75994cd85a
2 changed files with 26 additions and 14 deletions

View File

@@ -265,13 +265,6 @@ on_next(void)
}
}
static void
on_item_activated(G_GNUC_UNUSED FastivBrowser *browser, const char *path,
G_GNUC_UNUSED gpointer data)
{
open(path);
}
static void
spawn_path(const char *path)
{
@@ -282,6 +275,16 @@ spawn_path(const char *path)
g_clear_error(&error);
}
static void
on_item_activated(G_GNUC_UNUSED FastivBrowser *browser, const char *path,
GtkPlacesOpenFlags flags, G_GNUC_UNUSED gpointer data)
{
if (flags == GTK_PLACES_OPEN_NEW_WINDOW)
spawn_path(path);
else
open(path);
}
static gboolean
open_any_path(const char *path)
{