MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_file_open_containing_folder

Function ghb_file_open_containing_folder

gtk/src/callbacks.c:4992–5012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4990}
4991
4992void
4993ghb_file_open_containing_folder (GFile *file)
4994{
4995 if (!file) return;
4996
4997 GtkApplication *app = GTK_APPLICATION(g_application_get_default());
4998 GtkWindow *parent = gtk_application_get_active_window(app);
4999 if (g_file_test(g_file_peek_path(file), G_FILE_TEST_EXISTS))
5000 {
5001 GtkFileLauncher *launcher = gtk_file_launcher_new(file);
5002 gtk_file_launcher_open_containing_folder(launcher, parent, NULL,
5003 (GAsyncReadyCallback) file_open_containing_folder_finish, NULL);
5004 }
5005 else
5006 {
5007 g_autoptr(GFile) dir = g_file_get_parent(file);
5008 GtkFileLauncher *launcher = gtk_file_launcher_new(dir);
5009 gtk_file_launcher_launch(launcher, parent, NULL,
5010 (GAsyncReadyCallback) file_open_finish, NULL);
5011 }
5012}
5013
5014G_GNUC_END_IGNORE_DEPRECATIONS
5015#else

Callers 3

Calls 1

ghb_browse_uriFunction · 0.85

Tested by

no test coverage detected