#NEWLINE# def appendDefinitions( menuDefinition , prefix = '' ) : #NEWLINE# #INDENT# menuDefinition . append ( ( prefix + '/New' ) , { #NEWLINE# #INDENT# 'command' : new , #NEWLINE# 'shortCut' : 'Ctrl+N' , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Open...' ) , { #NEWLINE# #INDENT# 'command' : open , #NEWLINE# 'shortCut' : 'Ctrl+O' , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Open Recent' ) , { #NEWLINE# #INDENT# 'subMenu' : openRecent , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/OpenDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Save' ) , { #NEWLINE# #INDENT# 'command' : save , #NEWLINE# 'shortCut' : 'Ctrl+S' , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Save As...' ) , { #NEWLINE# #INDENT# 'command' : saveAs , #NEWLINE# 'shortCut' : 'Shift+Ctrl+S' , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Revert To Saved' ) , { #NEWLINE# #INDENT# 'command' : revertToSaved , #NEWLINE# 'active' : __revertToSavedAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/SaveDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Export Selection...' ) , { #NEWLINE# #INDENT# 'command' : exportSelection , #NEWLINE# 'active' : __selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Import...' ) , { #NEWLINE# #INDENT# 'command' : importFile , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/ImportExportDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Settings...' ) , { #NEWLINE# #INDENT# 'command' : showSettings , #NEWLINE# #UNINDENT# } )