Mercurial Hosting > junotu
changeset 101:50af17182cd8
TabSimpleSearch: Added 'resave all cards' option to the popup menu
author | Fox |
---|---|
date | Wed, 05 Apr 2023 22:07:28 +0200 |
parents | f52a4c112d79 |
children | a313eaea437a |
files | src/junotu/TabSimpleSearch.java |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/junotu/TabSimpleSearch.java Wed Apr 05 21:55:08 2023 +0200 +++ b/src/junotu/TabSimpleSearch.java Wed Apr 05 22:07:28 2023 +0200 @@ -47,6 +47,7 @@ private JScrollPane scroll; private JMenuItem menu_calendar; + private JMenuItem menu_resaveAll; public TabSimpleSearch() { @@ -64,6 +65,7 @@ menu = new JPopupMenu("Menu"); menu_calendar = menu.add("Calendar board"); + menu_resaveAll = menu.add("Resave all cards (developer)"); context.setFont( new Font( "Monospaced", Font.BOLD, 16 ) ); create.setFont( new Font( "Monospaced", Font.BOLD, 16 ) ); @@ -86,6 +88,7 @@ create.addActionListener(this); context.addActionListener(this); menu_calendar.addActionListener(this); + menu_resaveAll.addActionListener(this); field.getDocument().addDocumentListener( new DocumentListener() @@ -117,6 +120,7 @@ create.setToolTipText("Create new card. Shift-click to open it in a new window."); context.setToolTipText("Bring up a menu with more actions."); menu_calendar.setToolTipText("Open calendar board."); + menu_resaveAll.setToolTipText("Resave all cards. Might be useful if you updated program version and database format changed."); } @@ -223,6 +227,9 @@ } else if( source == menu_calendar ) { Window window = (Window)this.getTopLevelAncestor(); window.tabSwitch( Tab.CALENDAR_BOARD ); + } else if( source == menu_resaveAll ) { + Main.database.databaseResaveAll(); + Main.refreshSearches(); } }