gui: add org- and app-name to QtApplication
for a better path name of stored configuration
This commit is contained in:
parent
ebcf95e31e
commit
f7f77b168f
@ -69,7 +69,7 @@ def main(argv=None):
|
|||||||
console.setLevel(loglevel)
|
console.setLevel(loglevel)
|
||||||
logger.addHandler(console)
|
logger.addHandler(console)
|
||||||
|
|
||||||
app = QApplication(argv)
|
app = QApplication(argv, organizationName='frappy', applicationName='frappy_gui')
|
||||||
|
|
||||||
win = MainWindow(args, logger)
|
win = MainWindow(args, logger)
|
||||||
app.aboutToQuit.connect(win._onQuit)
|
app.aboutToQuit.connect(win._onQuit)
|
||||||
|
@ -498,7 +498,7 @@ class Console(code.InteractiveConsole):
|
|||||||
history = None
|
history = None
|
||||||
if readline:
|
if readline:
|
||||||
try:
|
try:
|
||||||
history = expanduser(f'~/.frappy-{name}-history')
|
history = expanduser(f'~/.config/frappy/{name}-history')
|
||||||
readline.read_history_file(history)
|
readline.read_history_file(history)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
@ -538,10 +538,10 @@ def init(*nodes):
|
|||||||
return success
|
return success
|
||||||
|
|
||||||
|
|
||||||
def interact(usage_tail=''):
|
def interact(usage_tail='', appname=None):
|
||||||
empty = '_c0' not in clientenv.namespace
|
empty = '_c0' not in clientenv.namespace
|
||||||
print(USAGE.format(
|
print(USAGE.format(
|
||||||
client_name='cli' if empty else '_c0',
|
client_name='cli' if empty else '_c0',
|
||||||
client_assign="\ncli = Client('localhost:5000')\n" if empty else '',
|
client_assign="\ncli = Client('localhost:5000')\n" if empty else '',
|
||||||
tail=usage_tail))
|
tail=usage_tail))
|
||||||
Console()
|
Console(name=f'cli-{appname}' if appname else 'cli')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user