|
369 | 369 | "icon": {
|
370 | 370 | "light": "resources/light/export_to_python.svg",
|
371 | 371 | "dark": "resources/dark/export_to_python.svg"
|
372 |
| - } |
| 372 | + }, |
| 373 | + "enablement": "notebookViewType == jupyter-notebook && python.datascience.isnotebooktrusted" |
373 | 374 | },
|
374 | 375 | {
|
375 | 376 | "command": "python.datascience.exportAsPythonScript",
|
|
702 | 703 | "light": "resources/light/un-trusted.svg",
|
703 | 704 | "dark": "resources/dark/un-trusted.svg"
|
704 | 705 | },
|
705 |
| - "enablement": "notebookEditorFocused && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled" |
706 |
| - }, |
707 |
| - { |
708 |
| - "command": "python.datascience.notebookeditor.trusted", |
709 |
| - "title": "%DataScience.notebookIsTrusted%", |
710 |
| - "category": "Python", |
711 |
| - "icon": { |
712 |
| - "light": "resources/light/trusted.svg", |
713 |
| - "dark": "resources/dark/trusted.svg" |
714 |
| - } |
| 706 | + "enablement": "notebookViewType == jupyter-notebook && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled" |
715 | 707 | },
|
716 | 708 | {
|
717 | 709 | "command": "python.datascience.notebookeditor.runallcells",
|
|
877 | 869 | "command": "python.datascience.notebookeditor.restartkernel",
|
878 | 870 | "title": "%python.command.python.datascience.restartkernel.title%",
|
879 | 871 | "group": "navigation",
|
880 |
| - "when": "notebookEditorFocused" |
| 872 | + "when": "notebookViewType == jupyter-notebook" |
881 | 873 | },
|
882 | 874 | {
|
883 | 875 | "command": "python.datascience.notebookeditor.trust",
|
884 | 876 | "title": "%DataScience.trustNotebookCommandTitle%",
|
885 | 877 | "group": "navigation@1",
|
886 |
| - "when": "notebookEditorFocused && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled" |
887 |
| - }, |
888 |
| - { |
889 |
| - "command": "python.datascience.notebookeditor.trusted", |
890 |
| - "title": "%DataScience.notebookIsTrusted%", |
891 |
| - "group": "navigation@1", |
892 |
| - "when": "notebookEditorFocused && python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled" |
| 878 | + "when": "notebookViewType == jupyter-notebook && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled" |
893 | 879 | },
|
894 | 880 | {
|
895 | 881 | "command": "python.datascience.export",
|
896 | 882 | "title": "%DataScience.notebookExportAs%",
|
897 | 883 | "group": "navigation",
|
898 |
| - "when": "notebookEditorFocused" |
| 884 | + "when": "notebookViewType == jupyter-notebook" |
899 | 885 | }
|
900 | 886 | ],
|
901 | 887 | "explorer/context": [
|
|
940 | 926 | "command": "python.datascience.exportAsPythonScript",
|
941 | 927 | "title": "%python.command.python.datascience.exportAsPythonScript.title%",
|
942 | 928 | "category": "Python",
|
943 |
| - "when": "python.datascience.isnativeactive && python.datascience.featureenabled" |
| 929 | + "when": "python.datascience.isnativeactive && python.datascience.featureenabled && python.datascience.isnotebooktrusted" |
944 | 930 | },
|
945 | 931 | {
|
946 | 932 | "command": "python.datascience.exportToHTML",
|
947 | 933 | "title": "%python.command.python.datascience.exportToHTML.title%",
|
948 | 934 | "category": "Python",
|
949 |
| - "when": "python.datascience.isnativeactive && python.datascience.featureenabled" |
| 935 | + "when": "python.datascience.isnativeactive && python.datascience.featureenabled && python.datascience.isnotebooktrusted" |
950 | 936 | },
|
951 | 937 | {
|
952 | 938 | "command": "python.datascience.exportToPDF",
|
953 | 939 | "title": "%python.command.python.datascience.exportToPDF.title%",
|
954 | 940 | "category": "Python",
|
955 |
| - "when": "python.datascience.isnativeactive && python.datascience.featureenabled" |
| 941 | + "when": "python.datascience.isnativeactive && python.datascience.featureenabled && python.datascience.isnotebooktrusted" |
956 | 942 | },
|
957 | 943 | {
|
958 | 944 | "command": "python.switchOffInsidersChannel",
|
|
1175 | 1161 | "category": "Python",
|
1176 | 1162 | "when": "python.datascience.featureenabled && notebookEditorFocused && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled"
|
1177 | 1163 | },
|
1178 |
| - { |
1179 |
| - "command": "python.datascience.notebookeditor.trusted", |
1180 |
| - "title": "%DataScience.notebookIsTrusted%", |
1181 |
| - "category": "Python", |
1182 |
| - "when": "config.noExists" |
1183 |
| - }, |
1184 | 1164 | {
|
1185 | 1165 | "command": "python.datascience.notebookeditor.runallcells",
|
1186 | 1166 | "title": "%python.command.python.datascience.notebookeditor.runallcells.title%",
|
|
0 commit comments