Skip to content

Commit

Permalink
Move import and export plugins to submenus in the main File menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinevez committed Oct 9, 2024
1 parent fcabb52 commit 83f6947
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/mastodon/mamut/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import static org.mastodon.app.MastodonIcons.TAGS_ICON_MEDIUM;
import static org.mastodon.app.MastodonIcons.TRACKSCHEME_ICON_MEDIUM;
import static org.mastodon.app.ui.ViewMenuBuilder.item;
import static org.mastodon.app.ui.ViewMenuBuilder.menu;
import static org.mastodon.app.ui.ViewMenuBuilder.separator;
import static org.mastodon.mamut.MamutMenuBuilder.fileMenu;

Expand Down Expand Up @@ -320,6 +321,9 @@ public static void addMenus( final ViewMenu menu, final ActionMap actionMap )
item( ProjectActions.SAVE_PROJECT ),
item( ProjectActions.SAVE_PROJECT_AS ),
separator(),
menu( "Import" ),
menu( "Export" ),
separator(),
item( ProjectActions.FIX_DATASET_PATH ),
separator(),
// item( ProjectActions.IMPORT_TGMM ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -45,6 +45,7 @@
import org.mastodon.app.MastodonIcons;
import org.mastodon.app.ui.ViewMenuBuilder;
import org.mastodon.mamut.KeyConfigScopes;
import org.mastodon.mamut.MamutMenuBuilder;
import org.mastodon.mamut.ProjectModel;
import org.mastodon.mamut.io.importer.trackmate.MamutExporter;
import org.mastodon.mamut.plugin.MamutPlugin;
Expand Down Expand Up @@ -92,8 +93,8 @@ public Map< String, String > getMenuTexts()
@Override
public List< ViewMenuBuilder.MenuItem > getMenuItems()
{
return Arrays.asList(
menu( "Plugins", menu( "Exports", item( EXPORT_MAMUT ) ) ) );
return Collections.singletonList(
MamutMenuBuilder.fileMenu( menu( "Export", item( EXPORT_MAMUT ) ) ) );
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -43,6 +43,7 @@
import org.mastodon.app.MastodonIcons;
import org.mastodon.app.ui.ViewMenuBuilder;
import org.mastodon.mamut.KeyConfigScopes;
import org.mastodon.mamut.MamutMenuBuilder;
import org.mastodon.mamut.ProjectModel;
import org.mastodon.mamut.plugin.MamutPlugin;
import org.mastodon.ui.keymap.KeyConfigContexts;
Expand Down Expand Up @@ -91,8 +92,8 @@ public Map< String, String > getMenuTexts()
@Override
public List< ViewMenuBuilder.MenuItem > getMenuItems()
{
return Arrays.asList(
menu( "Plugins", menu( "Imports", item( IMPORT_GRAPHML ) ) ) );
return Collections.singletonList(
MamutMenuBuilder.fileMenu( menu( "Import", item( IMPORT_GRAPHML ) ) ) );
}

@Override
Expand Down

0 comments on commit 83f6947

Please sign in to comment.