X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=utils%2Fmacos_dmg%2Fjalview_customise_dsstore.py;fp=utils%2Fmacos_dmg%2Fjalview_customise_dsstore.py;h=27d68f97efc8a27f0d694da360b40e1005ef0ef1;hb=b0f894660c05056490bf14ada8c64106d842ee17;hp=f5f559f8b2d3194c3b1d503dafefb7f6ba0390f3;hpb=20432ca28c59b733a0b2c25577701a50800aab86;p=jalview.git diff --git a/utils/macos_dmg/jalview_customise_dsstore.py b/utils/macos_dmg/jalview_customise_dsstore.py index f5f559f..27d68f9 100755 --- a/utils/macos_dmg/jalview_customise_dsstore.py +++ b/utils/macos_dmg/jalview_customise_dsstore.py @@ -94,8 +94,11 @@ outputds = ds_store.DSStore.open(args.output, 'w+') bwsp = {} for key in "ShowStatusBar SidebarWidthTenElevenOrLater ShowToolbar ShowTabView ContainerShowSidebar WindowBounds ShowSidebar ShowPathbar".split(): - bwsp[key] = inputds['.']['bwsp'][key] - myprint(f"Setting bwsp['{key}'] to '"+str(inputds['.']['bwsp'][key])+"'") + if key in inputds['.']['bwsp']: + bwsp[key] = inputds['.']['bwsp'][key] + myprint(f"Setting bwsp['{key}'] to '"+str(inputds['.']['bwsp'][key])+"'") + else: + myprint(f"Did not find '{key}' in input bwsp") outputds['.']['bwsp'] = bwsp @@ -122,8 +125,11 @@ alias.target.posix_path = f'/{args.backgrounddir}/{args.backgroundfile}' icvp['backgroundImageAlias'] = alias.to_bytes() for key in "backgroundColorRed backgroundColorBlue backgroundColorGreen gridSpacing gridOffsetX gridOffsetY showItemInfo viewOptionsVersion arrangeBy textSize labelOnBottom backgroundType showIconPreview iconSize".split(): - icvp[key] = inputds['.']['icvp'][key] - myprint(f"Setting icvp['{key}'] to '"+str(inputds['.']['icvp'][key])+"'") + if key in inputds['.']['icvp']: + icvp[key] = inputds['.']['icvp'][key] + myprint(f"Setting icvp['{key}'] to '"+str(inputds['.']['icvp'][key])+"'") + else: + myprint(f"Did not find '{key}' in input icvp") outputds['.']['icvp'] = icvp @@ -136,6 +142,7 @@ outputds['.']['vSrn'] = ('long', 1) if config: for fileinfo in config['files']: outputds[fileinfo['name']]['Iloc'] = (fileinfo['xpos'], fileinfo['ypos']) + myprint("Setting icon location for filename '" + fileinfo['name'] + "' to ( " + str(fileinfo['xpos']) + ", " + str(fileinfo['ypos']) + " )") outputds.flush() outputds.close()