Add example shortcut
This commit is contained in:
parent
ac33aaf194
commit
9dce2cc503
|
@ -436,7 +436,7 @@ if TYPE_EXTENSION == 3:
|
||||||
FILE_MANIFEST = f"""<?xml version="1.0" encoding="UTF-8"?>
|
FILE_MANIFEST = f"""<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<manifest:manifest>
|
<manifest:manifest>
|
||||||
<manifest:file-entry manifest:full-path="{FILES['py']}" manifest:media-type="application/vnd.sun.star.uno-component;type=Python"/>
|
<manifest:file-entry manifest:full-path="{FILES['py']}" manifest:media-type="application/vnd.sun.star.uno-component;type=Python"/>
|
||||||
<manifest:file-entry manifest:full-path="Office/Accelerators.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>{NODE_ADDONS}
|
<manifest:file-entry manifest:full-path="Office/{FILES['shortcut']}" manifest:media-type="application/vnd.sun.star.configuration-data"/>{NODE_ADDONS}
|
||||||
</manifest:manifest>
|
</manifest:manifest>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ if TYPE_EXTENSION == 1:
|
||||||
node_global = []
|
node_global = []
|
||||||
node_module = {}
|
node_module = {}
|
||||||
for m in MENUS:
|
for m in MENUS:
|
||||||
if not m['shortcut']:
|
if not m.get('shortcut', ''):
|
||||||
continue
|
continue
|
||||||
if m['context']:
|
if m['context']:
|
||||||
for c in m['context'].split(','):
|
for c in m['context'].split(','):
|
||||||
|
|
|
@ -173,10 +173,12 @@ def debug(info):
|
||||||
# ~ doc = app.newDoc(WRITER)
|
# ~ doc = app.newDoc(WRITER)
|
||||||
# ~ out = OutputDoc(doc)
|
# ~ out = OutputDoc(doc)
|
||||||
# ~ sys.stdout = out
|
# ~ sys.stdout = out
|
||||||
pprint(info)
|
# ~ pprint(info)
|
||||||
|
doc = LogWin(new_doc('writer').obj)
|
||||||
|
doc.write(info)
|
||||||
return
|
return
|
||||||
|
|
||||||
log.debug(info)
|
log.debug(str(info))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -200,6 +202,11 @@ def run_in_thread(fn):
|
||||||
return run
|
return run
|
||||||
|
|
||||||
|
|
||||||
|
def sleep(sec):
|
||||||
|
time.sleep(sec)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def _(msg):
|
def _(msg):
|
||||||
L = LANGUAGE.split('-')[0]
|
L = LANGUAGE.split('-')[0]
|
||||||
if L == 'en':
|
if L == 'en':
|
||||||
|
@ -244,7 +251,10 @@ def get_dispatch():
|
||||||
|
|
||||||
|
|
||||||
def get_temp_file():
|
def get_temp_file():
|
||||||
return tempfile.NamedTemporaryFile()
|
delete = True
|
||||||
|
if IS_WIN:
|
||||||
|
delete = False
|
||||||
|
return tempfile.NamedTemporaryFile(delete=delete)
|
||||||
|
|
||||||
|
|
||||||
def _path_url(path):
|
def _path_url(path):
|
||||||
|
|
|
@ -46,7 +46,7 @@ def _join(*paths):
|
||||||
|
|
||||||
|
|
||||||
def _mkdir(path):
|
def _mkdir(path):
|
||||||
return os.mkdir(path)
|
return Path(path).mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
def _save(path, data):
|
def _save(path, data):
|
||||||
|
@ -225,6 +225,8 @@ def _update_files():
|
||||||
path = _join(path_source, DIRS['meta'], FILES['manifest'])
|
path = _join(path_source, DIRS['meta'], FILES['manifest'])
|
||||||
_save(path, DATA['manifest'])
|
_save(path, DATA['manifest'])
|
||||||
|
|
||||||
|
path = _join(path_source, DIRS['office'])
|
||||||
|
_mkdir(path)
|
||||||
path = _join(path_source, DIRS['office'], FILES['shortcut'])
|
path = _join(path_source, DIRS['office'], FILES['shortcut'])
|
||||||
_save(path, DATA['shortcut'])
|
_save(path, DATA['shortcut'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue