cpu select in memory view
This commit is contained in:
parent
744081ab76
commit
26a25f0126
|
@ -32,7 +32,7 @@ enum SHOW {
|
|||
|
||||
static BOOL init=FALSE;
|
||||
static enum SHOW packmode=Bit8;
|
||||
static u32 address=0, tmpaddr=0, bpl=0;
|
||||
static u32 address=0, tmpaddr=0, bpl=0; int cpu=0;
|
||||
static PangoAttrList *attr_Address, *attr_Pattern1, *attr_Pattern2, *attr_Text;
|
||||
|
||||
static GtkEntry *wAddress;
|
||||
|
@ -40,6 +40,13 @@ static GtkDrawingArea *wPaint;
|
|||
void refresh();
|
||||
|
||||
|
||||
void on_wtools_2_cpu_changed (GtkComboBox *widget, gpointer user_data) {
|
||||
/* c == 0 means ARM9 */
|
||||
cpu=gtk_combo_box_get_active(widget);
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
||||
/* how to pack bytes */
|
||||
|
||||
void on_wtools_2_r8_toggled (GtkToggleButton *togglebutton, gpointer user_data) { packmode=Bit8; refresh(); }
|
||||
|
@ -61,9 +68,13 @@ void on_wtools_2_GotoButton_clicked (GtkButton *button, gpointer user_data) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void on_wtools_2_MemView_show (GtkWidget *widget, gpointer user_data) {
|
||||
GtkWidget * combo = glade_xml_get_widget(xml_tools, "wtools_2_cpu");
|
||||
wAddress = (GtkEntry*)glade_xml_get_widget(xml_tools, "wtools_2_GotoAddress");
|
||||
wPaint = (GtkDrawingArea*)glade_xml_get_widget(xml_tools, "wtools_2_draw");
|
||||
gtk_combo_box_set_active((GtkComboBox*)combo, 0);
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
@ -89,7 +100,7 @@ void refresh() {
|
|||
GtkWidget * area = (GtkWidget*)wPaint;
|
||||
PangoLayout* playout = gtk_widget_create_pango_layout(area, NULL);
|
||||
GdkGC * GC = area->style->fg_gc[area->state];
|
||||
int i,j,addr, w,h,x,y, cpu=0; u8 c;
|
||||
int i,j,addr, w,h,x,y; u8 c;
|
||||
char txt[80],*ptxt;
|
||||
char words[4][13];
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ void on_wtools_1_r_dispb_winout_toggled(GtkToggleButton *togglebutton, gpointer
|
|||
|
||||
/* ***** ***** MEMORY VIEWER ***** ***** */
|
||||
|
||||
void on_wtools_2_cpu_changed (GtkComboBox *widget, gpointer user_data);
|
||||
void on_wtools_2_MemView_show (GtkWidget *widget, gpointer user_data);
|
||||
void on_wtools_2_r8_toggled (GtkToggleButton *togglebutton, gpointer user_data);
|
||||
void on_wtools_2_r16_toggled (GtkToggleButton *togglebutton, gpointer user_data);
|
||||
|
|
|
@ -640,7 +640,7 @@ cpu : ARM9</property>
|
|||
<widget class="GtkTable" id="table2">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">6</property>
|
||||
<property name="n_columns">7</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
|
@ -813,12 +813,31 @@ cpu : ARM9</property>
|
|||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">6</property>
|
||||
<property name="right_attach">7</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="wtools_2_cpu">
|
||||
<property name="visible">True</property>
|
||||
<property name="items" translatable="yes">ARM9 cpu
|
||||
ARM7 cpu</property>
|
||||
<property name="add_tearoffs">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="changed" handler="on_wtools_2_cpu_changed" last_modification_time="Fri, 12 Jan 2007 18:36:24 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">6</property>
|
||||
<property name="right_attach">7</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
|
Loading…
Reference in New Issue