Only create menu at startup and not every time the recent list is populated
This commit is contained in:
parent
ed55845ac3
commit
6cfd4bfe2b
@ -509,7 +509,7 @@ void buildSubMenu(NSMenu* menu, MenuDescriptor menuDesc[])
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void buildMenu()
|
||||
void Window_buildMenu()
|
||||
{
|
||||
NSMenu* fileMenu = [[[NSApp mainMenu] itemWithTitle:@"File"] submenu];
|
||||
NSMenu* editMenu = [[[NSApp mainMenu] itemWithTitle:@"Edit"] submenu];
|
||||
@ -524,8 +524,6 @@ void buildMenu()
|
||||
|
||||
void Window_populateRecentList(const char** files)
|
||||
{
|
||||
buildMenu();
|
||||
|
||||
NSMenu* fileMenu = [[[NSApp mainMenu] itemWithTitle:@"File"] submenu];
|
||||
NSMenu* recentItems = [[fileMenu itemWithTitle:@"Recent Files"] submenu];
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include "rlog.h"
|
||||
|
||||
void Window_populateRecentList(char** files);
|
||||
void Window_buildMenu();
|
||||
|
||||
@implementation RocketAppDelegate
|
||||
|
||||
@ -58,6 +59,7 @@ void Window_populateRecentList(char** files);
|
||||
}
|
||||
}
|
||||
|
||||
Window_buildMenu();
|
||||
Window_populateRecentList(recent_list);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user