Renamed pystuff to python
parent
7b751ede2c
commit
7c2160fd80
|
@ -7,7 +7,7 @@ moopython_plugins_libdir = $(MOO_LIB_DIR)/plugins/lib
|
||||||
|
|
||||||
moopython_plugins_DATA = \
|
moopython_plugins_DATA = \
|
||||||
$(moopython)/plugins/console.py \
|
$(moopython)/plugins/console.py \
|
||||||
$(moopython)/plugins/pystuff.py
|
$(moopython)/plugins/python.py
|
||||||
|
|
||||||
moopython_plugins_lib_DATA = \
|
moopython_plugins_lib_DATA = \
|
||||||
$(moopython)/plugins/pyconsole.py
|
$(moopython)/plugins/pyconsole.py
|
||||||
|
|
|
@ -10,15 +10,13 @@ if os.name == 'nt':
|
||||||
else:
|
else:
|
||||||
PYTHON_COMMAND = 'python'
|
PYTHON_COMMAND = 'python'
|
||||||
|
|
||||||
SHOW_LOG_WINDOW = False
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pyconsole
|
import pyconsole
|
||||||
have_pyconsole = True
|
have_pyconsole = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
have_pyconsole = False
|
have_pyconsole = False
|
||||||
|
|
||||||
PLUGIN_ID = "PyStuff"
|
PLUGIN_ID = "Python"
|
||||||
|
|
||||||
class FileLine(object):
|
class FileLine(object):
|
||||||
def __init__(self, filename, line):
|
def __init__(self, filename, line):
|
||||||
|
@ -32,21 +30,14 @@ class Plugin(moo.edit.Plugin):
|
||||||
|
|
||||||
self.info = {
|
self.info = {
|
||||||
"id" : PLUGIN_ID,
|
"id" : PLUGIN_ID,
|
||||||
"name" : "Python Stuff",
|
"name" : "Python",
|
||||||
"description" : "Python stuff",
|
"description" : "Python support",
|
||||||
"author" : "Yevgen Muntyan <muntyan@math.tamu.edu>",
|
"author" : "Yevgen Muntyan <muntyan@math.tamu.edu>",
|
||||||
"version" : "3.1415926",
|
"version" : "3.1415926",
|
||||||
"enabled" : True,
|
"enabled" : True,
|
||||||
"visible" : True
|
"visible" : True
|
||||||
}
|
}
|
||||||
|
|
||||||
if SHOW_LOG_WINDOW:
|
|
||||||
self.add_window_action(moo.edit.EditWindow, "ShowLogWindow",
|
|
||||||
display_name="Show Log Window",
|
|
||||||
label="Show Log Window",
|
|
||||||
callback=self.show_log_window)
|
|
||||||
self.add_ui("ToolsMenu", "ShowLogWindow")
|
|
||||||
|
|
||||||
if have_pyconsole:
|
if have_pyconsole:
|
||||||
self.add_window_action(moo.edit.EditWindow, "PythonConsole",
|
self.add_window_action(moo.edit.EditWindow, "PythonConsole",
|
||||||
display_name="Python Console",
|
display_name="Python Console",
|
||||||
|
@ -68,9 +59,6 @@ class Plugin(moo.edit.Plugin):
|
||||||
moo.edit.window_set_action_langs("RunFile", "sensitive", ["python"])
|
moo.edit.window_set_action_langs("RunFile", "sensitive", ["python"])
|
||||||
self.add_ui("ToolsMenu", "RunFile")
|
self.add_ui("ToolsMenu", "RunFile")
|
||||||
|
|
||||||
def show_log_window(self, window):
|
|
||||||
moo.app.get_instance().show_python_console()
|
|
||||||
|
|
||||||
def show_console(self, window):
|
def show_console(self, window):
|
||||||
window = gtk.Window()
|
window = gtk.Window()
|
||||||
swin = gtk.ScrolledWindow()
|
swin = gtk.ScrolledWindow()
|
Loading…
Reference in New Issue