mirror of
https://github.com/tromey/gdb-gui.git
synced 2026-01-07 00:40:04 +01:00
make Toplevel call start_gtk
This commit is contained in:
@@ -41,8 +41,7 @@ class GuiSourceCommand(gdb.Command):
|
||||
|
||||
def invoke(self, arg, from_tty):
|
||||
self.dont_repeat()
|
||||
gui.startup.start_gtk()
|
||||
gui.startup.send_to_gtk(gui.source.SourceWindow)
|
||||
gui.source.SourceWindow()
|
||||
|
||||
class GuiLogWindowCommand(gdb.Command):
|
||||
"""Create a new log window.
|
||||
@@ -63,7 +62,6 @@ class GuiLogWindowCommand(gdb.Command):
|
||||
|
||||
def invoke(self, arg, from_tty):
|
||||
self.dont_repeat()
|
||||
gui.startup.start_gtk()
|
||||
window = gui.logwindow.LogWindow()
|
||||
print "Created log window %d; now the default" % window.number
|
||||
|
||||
@@ -136,8 +134,6 @@ class GuiDisplayCommand(gdb.Command):
|
||||
|
||||
def invoke(self, arg, from_tty):
|
||||
self.dont_repeat()
|
||||
# FIXME: perhaps Toplevel should be calling startup_gtk
|
||||
gui.startup.start_gtk()
|
||||
gui.display.DisplayWindow(arg)
|
||||
|
||||
def complete(self, text, word):
|
||||
|
||||
@@ -176,7 +176,10 @@ class SourceWindow(Toplevel):
|
||||
|
||||
def __init__(self):
|
||||
super(SourceWindow, self).__init__()
|
||||
gui.startup.send_to_gtk(self._initialize)
|
||||
|
||||
@in_gtk_thread
|
||||
def _initialize(self):
|
||||
self.frame = None
|
||||
|
||||
self.do_step = Invoker("step")
|
||||
|
||||
@@ -21,6 +21,7 @@ import threading
|
||||
|
||||
class _ToplevelState(object):
|
||||
def __init__(self):
|
||||
gui.startup.start_gtk()
|
||||
# This lock must be held when using the other globals here.
|
||||
self.toplevel_lock = threading.Lock()
|
||||
self.next_toplevel = 1
|
||||
|
||||
Reference in New Issue
Block a user