Page 1 of 1

Need preference to disable more new windows in jEdit

Posted: Sat Feb 20, 2010 7:26 pm
by duanemoody
Create a preference under Launcher Options:Text editor for letting the developer choose whether config.editor_transient passes -reuseview or -newplainview to jEdit (and yes, I understand this is currently the only difference between config.editor and config.editor_transient).

When I'm debugging, I don't actually find my desktop being littered with identical windows helpful, but if it serves a purpose let the developer choose.

This is currently my largest annoyance during development. If I knew how Ren'Py manages its own preferences I would have replaced the argument with a variable and patched opts.rpy myself by now.

As it is, I'm hacking jEdit.Editor.py as follows:

Code: Select all

# Name: jEdit
# Version: 1
# Description: jEdit requires Java be installed on your computer.

import os
import os.path
import sys

editor = os.path.normpath(base + "/../jedit/jedit.jar")
editor = renpy.shell_escape(editor)
editor_exec = 'javaw.exe' if (sys.platform == 'win32') else 'java'

config.editor = editor_exec + ' -jar "' + editor + '" -reuseview "%(filename)s" +line:%(line)d "%(otherfiles)s"'
#config.editor_transient = editor_exec + ' -ar "' + editor + '" -newplainview "%(filename)s" +line:%(line)d "%(otherfiles)s"'
config.editor_transient = config.editor

Re: Need preference to disable more new windows in jEdit

Posted: Sat Feb 20, 2010 7:30 pm
by PyTom
Editing the editor.py file is the right way to make editor-specific changes like this.