mirror of
https://github.com/tromey/gdb-gui.git
synced 2025-12-16 07:10:04 +01:00
add up and down buttons to source window
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
/* XPM */
|
||||
static char * run_to_cursor_xpm[] = {
|
||||
"22 22 15 1",
|
||||
" c None",
|
||||
". c #4A4A4A",
|
||||
"+ c #BABABA",
|
||||
"@ c #C0C0C0",
|
||||
"# c #9C9C9C",
|
||||
"$ c #000000",
|
||||
"% c #CCCCCC",
|
||||
"& c #D4D4D4",
|
||||
"* c #D7D7D8",
|
||||
"= c #DCDCDC",
|
||||
"- c #E3E3E3",
|
||||
"; c #EBEBEB",
|
||||
"> c #F4F3F3",
|
||||
", c #FEFEFE",
|
||||
"' c #B72618",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ........... ",
|
||||
" .++++++++@.# ",
|
||||
" .+++++@@@@.## ",
|
||||
" .++@@$$@%%.... ",
|
||||
" .@@@%$$%&&*==. ",
|
||||
" .%%%%$$&*==--. ",
|
||||
" .%&&*$$=---;;. ",
|
||||
" .&*==$$;;;;>;. ",
|
||||
" .=-$$$$$$>>,,. ",
|
||||
" .;;;$$$$>,,,,. ",
|
||||
" .;;>>$$,,,,,,. ",
|
||||
" .>'''''''''',. ",
|
||||
" .,'''''''''',. ",
|
||||
" .,,,,,,,,,,,,. ",
|
||||
" .,,,,,,,,,,,,. ",
|
||||
" .............. ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -188,7 +188,7 @@ class LRUHandler:
|
||||
|
||||
lru_handler = LRUHandler()
|
||||
|
||||
BUTTON_NAMES = ["step", "next", "continue", "finish", "stop"]
|
||||
BUTTON_NAMES = ["step", "next", "continue", "finish", "stop", "up", "down"]
|
||||
|
||||
class SourceWindow(gui.updatewindow.UpdateWindow):
|
||||
def _get_pixmap(self, filename):
|
||||
@@ -198,6 +198,8 @@ class SourceWindow(gui.updatewindow.UpdateWindow):
|
||||
def __init__(self):
|
||||
super(SourceWindow, self).__init__('source')
|
||||
gdb.events.cont.connect(self._on_cont_event)
|
||||
# Update the buttons.
|
||||
self.on_event()
|
||||
|
||||
@in_gtk_thread
|
||||
def gtk_initialize(self):
|
||||
@@ -208,6 +210,8 @@ class SourceWindow(gui.updatewindow.UpdateWindow):
|
||||
self.do_continue = Invoker("continue")
|
||||
self.do_finish = Invoker("finish")
|
||||
self.do_stop = Invoker("interrupt")
|
||||
self.do_up = Invoker("up")
|
||||
self.do_down = Invoker("down")
|
||||
|
||||
builder = gui.startup.create_builder('sourcewindow.xml')
|
||||
builder.connect_signals(self)
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<requires lib="gtksourceview" version="3.0"/>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="pixbuf">icons/run-to-cursor.xpm</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
@@ -45,7 +40,7 @@
|
||||
<property name="tooltip_text" translatable="yes">Continue execution</property>
|
||||
<property name="label" translatable="yes">Continue</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="icon_widget">image1</property>
|
||||
<property name="stock_id">gtk-media-forward</property>
|
||||
<signal name="clicked" handler="do_continue" swapped="no"/>
|
||||
<accelerator key="c" signal="clicked"/>
|
||||
</object>
|
||||
@@ -118,6 +113,46 @@
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="sep">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="up">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Up one frame</property>
|
||||
<property name="label" translatable="yes">Up</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-go-up</property>
|
||||
<accelerator key="u" signal="clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="down">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Down one frame</property>
|
||||
<property name="label" translatable="yes">Down</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-go-down</property>
|
||||
<accelerator key="d" signal="clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
||||
Reference in New Issue
Block a user