Skip to content

Commit

Permalink
added menu based on branch by @moehrlich #32
Browse files Browse the repository at this point in the history
  • Loading branch information
EliDeh committed Jul 30, 2019
1 parent 558d580 commit 84708c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ Der Adobe Acrobat Reader DC wird für den Druck benötigt. Ist dieser nicht das
- Es wurden einige Verbesserungen beim erstellen/bearbeiten von Modi/Untermodi umgesetzt (issue #56, #50)
- Es ist nun möglich den Sofortdruck via Konfigeintrag automatisch auszuwählen (issue #58)
- .json Konfigurationsdateien werden nun formatiert angelegt (issue #37)
- Ein Menü mit den Optionen 'Schließen', 'Format', 'Modus wurde hinzugefügt. Der entsprechende Konfigeintrag ist 'showMenu', Standardwert ist 'false' (issue #32)
- Optimierungen:
- main.js: Funktion 'checkConfig' überarbeitet
- npm update ausgeführt
Expand Down
7 changes: 5 additions & 2 deletions signaturenDruck/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const configNew = {
defaultDownloadPath: 'C:/Export/download.dnl',
sortByPPN: false,
useK10plus: true,
showMenu: false,
example: {
shelfmark: 'PÄD:TG:1420:Dan::2017',
location: 'MAG',
Expand Down Expand Up @@ -70,7 +71,7 @@ const template = [
label: 'Bearbeiten',
submenu: [
{
label: 'Konfiguration',
label: 'Format',
accelerator: 'Control+Shift+C',
click () {
createConfigWindow()
Expand All @@ -88,7 +89,6 @@ const template = [
]

const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)

// name of signature storage json
const sigJSONFile = 'signaturen.json'
Expand Down Expand Up @@ -244,6 +244,9 @@ function createWindow () {
} else {
mainWindow = new BrowserWindow({ width: 850, height: 600, backgroundColor: '#f0f0f0' })
}
if (config.store.showMenu) {
Menu.setApplicationMenu(menu)
}
// set the mainwindow title (name + version from package.json)
mainWindow.setTitle('Signaturendruck v' + app.getVersion())
// and load the index.html of the app.
Expand Down

0 comments on commit 84708c0

Please sign in to comment.