From 5dc46533d0ea2f87d8d34eb7a5178a3d616d71ae Mon Sep 17 00:00:00 2001 From: Fabien Roger Date: Sat, 15 Jan 2022 10:15:30 +0100 Subject: [PATCH 1/2] :beetle: Change file dialog settings --- pyflow/graphics/window.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyflow/graphics/window.py b/pyflow/graphics/window.py index 14d94cab..887c0612 100644 --- a/pyflow/graphics/window.py +++ b/pyflow/graphics/window.py @@ -292,7 +292,14 @@ def onFileNew(self): def onFileOpen(self): """Open a file.""" - filename, _ = QFileDialog.getOpenFileName(self, "Open ipygraph from file") + + filename, _ = QFileDialog.getOpenFileName( + self, + "Open ipygraph from file", + "", + "Ipygraph or Juyter notebook (*.ipyg *.ipynb)", + ) + if filename == "": return if os.path.isfile(filename): From 85c02c8bbd095bb93327254a1e69ac74aed79816 Mon Sep 17 00:00:00 2001 From: Fabien Roger Date: Sun, 16 Jan 2022 10:11:58 +0100 Subject: [PATCH 2/2] :art: Improve the displayed file name --- pyflow/graphics/window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyflow/graphics/window.py b/pyflow/graphics/window.py index 887c0612..d10a7690 100644 --- a/pyflow/graphics/window.py +++ b/pyflow/graphics/window.py @@ -297,7 +297,7 @@ def onFileOpen(self): self, "Open ipygraph from file", "", - "Ipygraph or Juyter notebook (*.ipyg *.ipynb)", + "Interactive python graph or notebook (*.ipyg *.ipynb)", ) if filename == "":