Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def destroySelf(self):
QtCore.pyqtRemoveInputHook()
if 'shutdown' in g.app.debug:
g.pr('LeoQtGui.destroySelf: calling qtApp.Quit')
self.qtApp.quit()
#@+node:ekr.20110605121601.18485: *3* qt_gui.Clipboard
def plugin_signon(self, module_name, verbose=False):
'''Print the plugin signon.'''
# This is called from as the result of the imports
# in self.loadOnePlugin
m = self.signonModule
if verbose:
g.es('', "...%s.py v%s: %s" % (
m.__name__, m.__version__, g.plugin_date(m)))
g.pr(m.__name__, m.__version__)
self.signonModule = None # Prevent double signons.
#@+node:ekr.20100908125007.6030: *4* plugins.unloadOnePlugin
def oops(self):
g.pr('BaseScanner oops: %s must be overridden in subclass' % g.callers())
def dumpWidgetList (self,tag):
g.pr("\ncheckWidgetList: %s" % tag)
for w in self.visibleText:
p = w.leo_position
if p:
s = w.getAllText().strip()
h = p.headString().strip()
addr = self.textAddr(w)
g.pr("p:",addr,h)
if h != s:
g.pr("w:",'*' * len(addr),s)
else:
g.pr("w.leo_position == None",w)
#@-node:ekr.20080112145409.381:dumpWidgetList
def doOpenWithSettings (aList):
'''Create an open-with table from a list of dictionaries.'''
table = []
for z in aList:
command = z.get('command')
name = z.get('name')
shortcut = z.get('shortcut')
try:
data = eval(command)
if 0:
g.pr(name,shortcut)
for i in range(len(data)):
g.pr(i,repr(data[i]))
g.pr('')
entry = name,shortcut,data
table.append(entry)
except SyntaxError:
g.pr(g.es_exception())
return None
return table
#@+node:ekr.20070411165142.2: *3* doSubprocessTable
def oops (self):
g.pr("leoMenu oops:", g.callers(2), "should be overridden in subclass")
#@nonl
def report(kind,tag):
i,j,name = tag
g.pr('computeNewTags: *** %-5s %10s %3d %3d' % (kind,name,i,j),repr(self.s[i:j]))
def runMainLoop(self):
'''Start the gtk main loop.'''
if self.script:
log = g.app.log
if log:
g.pr('Start of batch script...\n')
log.c.executeScript(script=self.script)
g.pr('End of batch script')
else:
g.pr('no log, no commander for executeScript in gtkGui.runMainLoop')
else:
gtk.main()
#@-node:ekr.20080112145409.440:runMainLoop (gtkGui)
def oops(self):
g.pr("LeoFrame oops:", g.callers(4), "should be overridden in subclass")
#@+node:ekr.20031218072017.3692: *4* LeoFrame.promptForSave
def commandCallback():
g.pr("command for widget %s" % self)