From b4c1d1942a868568f4959dbdb4536b3ca4786be1 Mon Sep 17 00:00:00 2001 From: John Knox Date: Fri, 6 Sep 2019 04:12:58 -0700 Subject: [PATCH] Make File > Open more self-explanatory Summary: Yesterday I saw someone try to open the xcode executable with the File > Open function. This made me realise it's not clear what this is for, and you might think it can open all kinds of things. Reviewed By: danielbuechele Differential Revision: D17225496 fbshipit-source-id: 893360a1f450a8db25be34fce6c288e8db8f9626 --- src/MenuBar.tsx | 2 +- src/utils/exportData.tsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MenuBar.tsx b/src/MenuBar.tsx index 15ea91cfa..d18c0dfd6 100644 --- a/src/MenuBar.tsx +++ b/src/MenuBar.tsx @@ -209,7 +209,7 @@ function getTemplate( label: 'File', submenu: [ { - label: 'Open File...', + label: 'Import Flipper File...', accelerator: 'CommandOrControl+O', click: function() { showOpenDialog(store); diff --git a/src/utils/exportData.tsx b/src/utils/exportData.tsx index 27aea7643..d73784d94 100644 --- a/src/utils/exportData.tsx +++ b/src/utils/exportData.tsx @@ -521,6 +521,9 @@ export function showOpenDialog(store: Store) { remote.dialog.showOpenDialog( { properties: ['openFile'], + filters: [ + {extensions: ['flipper', 'json', 'txt'], name: 'Flipper files'}, + ], }, (files: Array) => { if (files !== undefined && files.length > 0) {