Skip to content

Commit

Permalink
Remove export submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
lisham2000 committed Oct 4, 2024
1 parent 54ca9eb commit 41715b2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
8 changes: 4 additions & 4 deletions nion/swift/DocumentController.py
Original file line number Diff line number Diff line change
Expand Up @@ -2638,8 +2638,8 @@ def create_context_menu_for_display(self, display_items: typing.List[DisplayItem

def populate_context_menu(self, menu: UserInterface.Menu, action_context: DocumentController.ActionContext) -> None:
self.add_action_to_menu_if_enabled(menu, "display.reveal", action_context)
self.add_action_to_menu_if_enabled(menu, "export.export", action_context)
self.add_action_to_menu_if_enabled(menu, "export.export_batch", action_context)
self.add_action_to_menu_if_enabled(menu, "file.export", action_context)
self.add_action_to_menu_if_enabled(menu, "file.export_batch", action_context)
data_item = action_context.data_item
if data_item:
source_data_items = self.document_model.get_source_data_items(data_item)
Expand Down Expand Up @@ -3013,7 +3013,7 @@ def get_action_name(self, context: Window.ActionContext) -> str:


class ExportAction(Window.Action):
action_id = "export.export"
action_id = "file.export"
action_name = _("Single Export...")

def execute(self, context: Window.ActionContext) -> Window.ActionResult:
Expand All @@ -3033,7 +3033,7 @@ def is_enabled(self, context: Window.ActionContext) -> bool:


class ExportBatchAction(Window.Action):
action_id = "export.export_batch"
action_id = "file.export_batch"
action_name = _("Batch Export...")

def execute(self, context: Window.ActionContext) -> Window.ActionResult:
Expand Down
29 changes: 12 additions & 17 deletions nion/swift/resources/menu_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,20 @@
"type": "item",
"action_id": "file.import_data"
},

{
"type": "sub_menu",
"menu_id": "file_export",
"title": "Export...",
"items":[
{
"type": "item",
"action_id":"export.export"
},
{
"type": "item",
"action_id":"export.export_batch"
},
{
"type": "item",
"action_id": "file.export_svg"
}
]
"type": "item",
"action_id":"file.export"
},
{
"type": "item",
"action_id":"file.export_batch"
},
{
"type": "item",
"action_id": "file.export_svg"
},

{
"type": "separator"
},
Expand Down

0 comments on commit 41715b2

Please sign in to comment.